mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
cefclient: Move StringResourceMap to ClientHandler (see issue #2586)
Fixes a DCHECK when creating multiple windows in cefclient due to the creation of multiple StringResourceProvider objects.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "include/wrapper/cef_message_router.h"
|
||||
#include "include/wrapper/cef_resource_manager.h"
|
||||
#include "tests/cefclient/browser/client_types.h"
|
||||
#include "tests/cefclient/browser/test_runner.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include "tests/cefclient/browser/dialog_handler_gtk.h"
|
||||
@@ -293,6 +294,9 @@ class ClientHandler : public CefClient,
|
||||
// Show SSL information for the current site.
|
||||
void ShowSSLInformation(CefRefPtr<CefBrowser> browser);
|
||||
|
||||
// Set a string resource for loading via StringResourceProvider.
|
||||
void SetStringResource(const std::string& page, const std::string& data);
|
||||
|
||||
// Returns the Delegate.
|
||||
Delegate* delegate() const { return delegate_; }
|
||||
|
||||
@@ -367,6 +371,10 @@ class ClientHandler : public CefClient,
|
||||
// Manages the registration and delivery of resources.
|
||||
CefRefPtr<CefResourceManager> resource_manager_;
|
||||
|
||||
// Used to manage string resources in combination with StringResourceProvider.
|
||||
// Only accessed on the IO thread.
|
||||
test_runner::StringResourceMap string_resource_map_;
|
||||
|
||||
// MAIN THREAD MEMBERS
|
||||
// The following members will only be accessed on the main thread. This will
|
||||
// be the same as the CEF UI thread except when using multi-threaded message
|
||||
|
Reference in New Issue
Block a user