refactor: remove redundant CreateExtensionsClient() (#45159)
refactor: remove redundant CreateExtensionsClient() (#45135)
This commit is contained in:
parent
3f60b86559
commit
9dccc9f4b4
2 changed files with 1 additions and 14 deletions
|
@ -240,7 +240,7 @@ void RendererClientBase::RenderThreadStarted() {
|
|||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
auto* thread = content::RenderThread::Get();
|
||||
|
||||
extensions_client_.reset(CreateExtensionsClient());
|
||||
extensions_client_ = std::make_unique<ElectronExtensionsClient>();
|
||||
extensions::ExtensionsClient::Set(extensions_client_.get());
|
||||
|
||||
extensions_renderer_client_ =
|
||||
|
@ -573,12 +573,6 @@ v8::Local<v8::Context> RendererClientBase::GetContext(
|
|||
return frame->MainWorldScriptContext();
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions::ExtensionsClient* RendererClientBase::CreateExtensionsClient() {
|
||||
return new ElectronExtensionsClient;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool RendererClientBase::IsWebViewFrame(
|
||||
v8::Local<v8::Context> context,
|
||||
content::RenderFrame* render_frame) const {
|
||||
|
|
|
@ -141,13 +141,6 @@ class RendererClientBase : public content::ContentRendererClient
|
|||
bool was_created_by_renderer,
|
||||
const url::Origin* outermost_origin) override;
|
||||
|
||||
protected:
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
// app_shell embedders may need custom extensions client interfaces.
|
||||
// This class takes ownership of the returned object.
|
||||
virtual extensions::ExtensionsClient* CreateExtensionsClient();
|
||||
#endif
|
||||
|
||||
private:
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
std::unique_ptr<extensions::ExtensionsClient> extensions_client_;
|
||||
|
|
Loading…
Reference in a new issue