Move the ability to create BrowserContext to embedder
This commit is contained in:
parent
240b5c42b4
commit
6413a4c516
2 changed files with 11 additions and 10 deletions
|
@ -30,13 +30,14 @@ class BrowserContext : public base::RefCounted<BrowserContext>,
|
|||
public content::BrowserContext,
|
||||
public brightray::URLRequestContextGetter::Delegate {
|
||||
public:
|
||||
// Get or Create the BrowserContext according to its |partition| and |in_memory|.
|
||||
static scoped_refptr<BrowserContext> From(
|
||||
// Get the BrowserContext according to its |partition| and |in_memory|,
|
||||
// empty pointer when be returned when there is no matching BrowserContext.
|
||||
static scoped_refptr<BrowserContext> Get(
|
||||
const std::string& partition, bool in_memory);
|
||||
|
||||
// Create a new BrowserContext, embedders should implement it on their own.
|
||||
static scoped_refptr<BrowserContext> Create(
|
||||
const std::string& partition, bool in_memory);
|
||||
base::WeakPtr<BrowserContext> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
// content::BrowserContext:
|
||||
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue