Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: override content::ContentMainDelegate::CreateContentClient() #35965

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions shell/app/electron_main_delegate.cc
Expand Up @@ -316,9 +316,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 @@ -437,6 +434,11 @@ base::StringPiece ElectronMainDelegate::GetBrowserV8SnapshotFilename() {
return ContentMainDelegate::GetBrowserV8SnapshotFilename();
}

content::ContentClient* ElectronMainDelegate::CreateContentClient() {
content_client_ = std::make_unique<ElectronContentClient>();
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