mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Support client-created request contexts (see issue #2969)
RequestContextTest and URLRequestTest suites now pass with the Chrome runtime enabled.
This commit is contained in:
@@ -8,22 +8,32 @@
|
||||
|
||||
#include "libcef/browser/browser_context.h"
|
||||
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
|
||||
// See CefBrowserContext documentation for usage. Only accessed on the UI thread
|
||||
// unless otherwise indicated.
|
||||
class ChromeBrowserContext : public CefBrowserContext {
|
||||
public:
|
||||
explicit ChromeBrowserContext(const CefRequestContextSettings& settings);
|
||||
|
||||
void InitializeAsync(base::OnceClosure initialized_cb);
|
||||
|
||||
// CefBrowserContext overrides.
|
||||
content::BrowserContext* AsBrowserContext() override;
|
||||
Profile* AsProfile() override;
|
||||
void Initialize() override;
|
||||
void Shutdown() override;
|
||||
|
||||
private:
|
||||
~ChromeBrowserContext() override;
|
||||
|
||||
void ProfileCreated(Profile* profile, Profile::CreateStatus status);
|
||||
|
||||
base::OnceClosure initialized_cb_;
|
||||
Profile* profile_ = nullptr;
|
||||
bool should_destroy_ = false;
|
||||
|
||||
base::WeakPtrFactory<ChromeBrowserContext> weak_ptr_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserContext);
|
||||
};
|
||||
|
Reference in New Issue
Block a user