Move the ability to create BrowserContext to embedder
This commit is contained in:
parent
400bb8d0f3
commit
00804e5f98
5 changed files with 22 additions and 17 deletions
|
@ -18,8 +18,10 @@ class WebViewManager;
|
|||
|
||||
class AtomBrowserContext : public brightray::BrowserContext {
|
||||
public:
|
||||
AtomBrowserContext(const std::string& partition, bool in_memory);
|
||||
~AtomBrowserContext() override;
|
||||
// Get or create the BrowserContext according to its |partition| and
|
||||
// |in_memory|.
|
||||
static scoped_refptr<AtomBrowserContext> From(
|
||||
const std::string& partition, bool in_memory);
|
||||
|
||||
void SetUserAgent(const std::string& user_agent);
|
||||
|
||||
|
@ -43,6 +45,10 @@ class AtomBrowserContext : public brightray::BrowserContext {
|
|||
|
||||
AtomNetworkDelegate* network_delegate() const { return network_delegate_; }
|
||||
|
||||
protected:
|
||||
AtomBrowserContext(const std::string& partition, bool in_memory);
|
||||
~AtomBrowserContext() override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<AtomDownloadManagerDelegate> download_manager_delegate_;
|
||||
std::unique_ptr<WebViewManager> guest_manager_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue