mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Wait for CefBrowserContext initialization (see issue #2969)
With the Chrome runtime, Profile initialization may be asynchronous. Code that waited on CefBrowserContext creation now needs to wait on CefBrowserContext initialization instead.
This commit is contained in:
@@ -22,6 +22,8 @@ class ChromeBrowserContext : public CefBrowserContext {
|
||||
// CefBrowserContext overrides.
|
||||
content::BrowserContext* AsBrowserContext() override;
|
||||
Profile* AsProfile() override;
|
||||
bool IsInitialized() const override;
|
||||
void StoreOrTriggerInitCallback(base::OnceClosure callback) override;
|
||||
void Shutdown() override;
|
||||
|
||||
private:
|
||||
@@ -33,6 +35,8 @@ class ChromeBrowserContext : public CefBrowserContext {
|
||||
Profile* profile_ = nullptr;
|
||||
bool should_destroy_ = false;
|
||||
|
||||
std::vector<base::OnceClosure> init_callbacks_;
|
||||
|
||||
base::WeakPtrFactory<ChromeBrowserContext> weak_ptr_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserContext);
|
||||
|
Reference in New Issue
Block a user