mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: override content::ContentMainDelegate::CreateContentClient() (#35965)
* fix: override content::ContentMainDelegate::CreateContentClient() Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: remove extra call Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user