Skip to content

Commit

Permalink
fix: override content::ContentMainDelegate::CreateContentClient()
Browse files Browse the repository at this point in the history
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
2 people authored and deepak1556 committed Oct 11, 2022
1 parent bf8dec7 commit 943a67b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions shell/app/electron_main_delegate.cc
Expand Up @@ -317,9 +317,6 @@ absl::optional<int> ElectronMainDelegate::BasicStartupComplete() {
::switches::kDisableGpuMemoryBufferCompositorResources);
#endif

content_client_ = std::make_unique<ElectronContentClient>();
SetContentClient(content_client_.get());

return absl::nullopt;
}

Expand Down Expand Up @@ -440,6 +437,12 @@ base::StringPiece ElectronMainDelegate::GetBrowserV8SnapshotFilename() {
return ContentMainDelegate::GetBrowserV8SnapshotFilename();
}

content::ContentClient* ElectronMainDelegate::CreateContentClient() {
content_client_ = std::make_unique<ElectronContentClient>();
SetContentClient(content_client_.get());
return content_client_.get();
}

content::ContentBrowserClient*
ElectronMainDelegate::CreateContentBrowserClient() {
browser_client_ = std::make_unique<ElectronBrowserClient>();
Expand Down
1 change: 1 addition & 0 deletions shell/app/electron_main_delegate.h
Expand Up @@ -38,6 +38,7 @@ class ElectronMainDelegate : public content::ContentMainDelegate {
void PreSandboxStartup() override;
void SandboxInitialized(const std::string& process_type) override;
absl::optional<int> PreBrowserMain() override;
content::ContentClient* CreateContentClient() override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
content::ContentGpuClient* CreateContentGpuClient() override;
content::ContentRendererClient* CreateContentRendererClient() override;
Expand Down

0 comments on commit 943a67b

Please sign in to comment.