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:
Marshall Greenblatt
2021-02-15 16:40:07 -05:00
parent bf3b7b2c62
commit ec7067c55e
6 changed files with 41 additions and 6 deletions

View File

@@ -13,13 +13,13 @@ class SimpleApp : public CefApp, public CefBrowserProcessHandler {
SimpleApp();
// CefApp methods:
virtual CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler()
OVERRIDE {
CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler() OVERRIDE {
return this;
}
// CefBrowserProcessHandler methods:
virtual void OnContextInitialized() OVERRIDE;
void OnContextInitialized() OVERRIDE;
CefRefPtr<CefClient> GetDefaultClient() OVERRIDE;
private:
// Include the default reference counting implementation.