mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Fix callbacks for different Profile types (see issue #2969)
- Only install network intercepts for Profiles that have an associated CefBrowserContext. For incognito windows the CefBrowserContext is associated with the OffTheRecordProfileImpl's original Profile. - cefsimple: Return the default CefClient instance for browser windows created via the Chrome UI, and allow Chrome to show error pages.
This commit is contained in:
@@ -85,8 +85,7 @@ void SimpleApp::OnContextInitialized() {
|
||||
CefRefPtr<CefCommandLine> command_line =
|
||||
CefCommandLine::GetGlobalCommandLine();
|
||||
|
||||
const bool enable_chrome_runtime =
|
||||
command_line->HasSwitch("enable-chrome-runtime");
|
||||
const bool enable_chrome_runtime = SimpleHandler::IsChromeRuntimeEnabled();
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_LINUX)
|
||||
// Create the browser using the Views framework if "--use-views" is specified
|
||||
@@ -135,3 +134,8 @@ void SimpleApp::OnContextInitialized() {
|
||||
nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
CefRefPtr<CefClient> SimpleApp::GetDefaultClient() {
|
||||
// Called when a new browser window is created via the Chrome runtime UI.
|
||||
return SimpleHandler::GetInstance();
|
||||
}
|
||||
|
Reference in New Issue
Block a user