Unfork chome code related to extensions and pepper plugins (issue #1947)

This commit is contained in:
Marshall Greenblatt
2016-08-04 15:37:53 +03:00
parent 98f59f47fd
commit 5444c389fd
21 changed files with 175 additions and 710 deletions

View File

@@ -5,6 +5,7 @@
#include "libcef/browser/chrome_browser_process_stub.h"
#include "libcef/browser/browser_context_impl.h"
#include "libcef/browser/chrome_profile_manager_stub.h"
#include "libcef/browser/component_updater/cef_component_updater_configurator.h"
#include "libcef/browser/content_browser_client.h"
@@ -37,11 +38,13 @@ ChromeBrowserProcessStub::ChromeBrowserProcessStub()
: initialized_(false),
shutdown_(false),
locale_("en-US") {
chrome::SetBrowserContextIncognitoHelper(this);
}
ChromeBrowserProcessStub::~ChromeBrowserProcessStub() {
DCHECK(!initialized_ || shutdown_);
g_browser_process = NULL;
chrome::SetBrowserContextIncognitoHelper(nullptr);
}
void ChromeBrowserProcessStub::Initialize() {
@@ -355,3 +358,15 @@ memory::TabManager* ChromeBrowserProcessStub::GetTabManager() {
NOTIMPLEMENTED();
return NULL;
}
content::BrowserContext*
ChromeBrowserProcessStub::GetBrowserContextRedirectedInIncognito(
content::BrowserContext* context) {
return CefBrowserContextImpl::GetForContext(context).get();
}
content::BrowserContext*
ChromeBrowserProcessStub::GetBrowserContextOwnInstanceInIncognito(
content::BrowserContext* context) {
return GetBrowserContextRedirectedInIncognito(context);
}