diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 46a3bcc1d605..b70ace445c95 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -317,9 +317,6 @@ absl::optional ElectronMainDelegate::BasicStartupComplete() { ::switches::kDisableGpuMemoryBufferCompositorResources); #endif - content_client_ = std::make_unique(); - SetContentClient(content_client_.get()); - return absl::nullopt; } @@ -440,6 +437,11 @@ base::StringPiece ElectronMainDelegate::GetBrowserV8SnapshotFilename() { return ContentMainDelegate::GetBrowserV8SnapshotFilename(); } +content::ContentClient* ElectronMainDelegate::CreateContentClient() { + content_client_ = std::make_unique(); + return content_client_.get(); +} + content::ContentBrowserClient* ElectronMainDelegate::CreateContentBrowserClient() { browser_client_ = std::make_unique(); diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index 4b51f5ba2a95..15cff1cc76ce 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -38,6 +38,7 @@ class ElectronMainDelegate : public content::ContentMainDelegate { void PreSandboxStartup() override; void SandboxInitialized(const std::string& process_type) override; absl::optional PreBrowserMain() override; + content::ContentClient* CreateContentClient() override; content::ContentBrowserClient* CreateContentBrowserClient() override; content::ContentGpuClient* CreateContentGpuClient() override; content::ContentRendererClient* CreateContentRendererClient() override;