2017-03-27 21:19:34 +00:00
|
|
|
// Copyright (c) 2017 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/renderer/renderer_client_base.h"
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2018-09-13 00:25:56 +00:00
|
|
|
#include <memory>
|
2017-03-27 21:19:34 +00:00
|
|
|
#include <string>
|
2019-10-31 20:11:51 +00:00
|
|
|
#include <utility>
|
2017-03-27 21:19:34 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "base/command_line.h"
|
|
|
|
#include "base/strings/string_split.h"
|
2018-07-19 04:29:47 +00:00
|
|
|
#include "base/strings/stringprintf.h"
|
2019-11-05 23:41:20 +00:00
|
|
|
#include "components/network_hints/renderer/web_prescient_networking_impl.h"
|
2019-04-19 19:55:20 +00:00
|
|
|
#include "content/common/buildflags.h"
|
2017-03-27 21:19:34 +00:00
|
|
|
#include "content/public/common/content_constants.h"
|
2018-09-11 18:18:10 +00:00
|
|
|
#include "content/public/common/content_switches.h"
|
2018-08-16 22:57:40 +00:00
|
|
|
#include "content/public/renderer/render_frame.h"
|
2019-07-24 23:01:08 +00:00
|
|
|
#include "content/public/renderer/render_thread.h"
|
2018-10-01 20:00:53 +00:00
|
|
|
#include "electron/buildflags/buildflags.h"
|
2023-11-09 18:23:52 +00:00
|
|
|
#include "electron/fuses.h"
|
2018-10-13 01:57:04 +00:00
|
|
|
#include "printing/buildflags/buildflags.h"
|
2021-06-01 01:45:23 +00:00
|
|
|
#include "shell/browser/api/electron_api_protocol.h"
|
2021-05-15 07:42:07 +00:00
|
|
|
#include "shell/common/api/electron_api_native_image.h"
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/common/color_util.h"
|
2019-09-08 15:10:18 +00:00
|
|
|
#include "shell/common/gin_helper/dictionary.h"
|
2021-05-15 07:42:07 +00:00
|
|
|
#include "shell/common/node_includes.h"
|
|
|
|
#include "shell/common/node_util.h"
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/common/options_switches.h"
|
2024-08-12 08:28:33 +00:00
|
|
|
#include "shell/common/plugin.mojom.h"
|
2020-02-24 04:33:58 +00:00
|
|
|
#include "shell/common/world_ids.h"
|
2021-05-15 07:42:07 +00:00
|
|
|
#include "shell/renderer/api/context_bridge/object_cache.h"
|
|
|
|
#include "shell/renderer/api/electron_api_context_bridge.h"
|
2020-02-03 17:49:37 +00:00
|
|
|
#include "shell/renderer/browser_exposed_renderer_interfaces.h"
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/renderer/content_settings_observer.h"
|
|
|
|
#include "shell/renderer/electron_api_service_impl.h"
|
|
|
|
#include "shell/renderer/electron_autofill_agent.h"
|
2024-08-12 08:28:33 +00:00
|
|
|
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
2019-04-02 22:38:16 +00:00
|
|
|
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
2020-11-10 17:06:03 +00:00
|
|
|
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
|
2024-02-14 17:33:32 +00:00
|
|
|
#include "third_party/blink/public/platform/web_runtime_features.h"
|
2018-07-20 16:08:18 +00:00
|
|
|
#include "third_party/blink/public/web/blink.h"
|
|
|
|
#include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha)
|
|
|
|
#include "third_party/blink/public/web/web_frame_widget.h"
|
2021-07-02 00:51:37 +00:00
|
|
|
#include "third_party/blink/public/web/web_local_frame.h"
|
2018-07-20 16:08:18 +00:00
|
|
|
#include "third_party/blink/public/web/web_plugin_params.h"
|
|
|
|
#include "third_party/blink/public/web/web_script_source.h"
|
|
|
|
#include "third_party/blink/public/web/web_security_policy.h"
|
2019-01-21 20:43:17 +00:00
|
|
|
#include "third_party/blink/public/web/web_view.h"
|
2022-03-25 01:39:03 +00:00
|
|
|
#include "third_party/blink/renderer/platform/media/multi_buffer_data_source.h" // nogncheck
|
2019-03-05 05:08:55 +00:00
|
|
|
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h" // nogncheck
|
2022-07-12 07:48:51 +00:00
|
|
|
#include "third_party/widevine/cdm/buildflags.h"
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2024-07-29 17:42:57 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
|
|
|
#include "components/pdf/renderer/internal_plugin_renderer_helpers.h"
|
|
|
|
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
|
|
|
|
2022-02-10 02:58:52 +00:00
|
|
|
#if BUILDFLAG(IS_MAC)
|
2017-03-27 21:19:34 +00:00
|
|
|
#include "base/strings/sys_string_conversions.h"
|
|
|
|
#endif
|
|
|
|
|
2022-02-10 02:58:52 +00:00
|
|
|
#if BUILDFLAG(IS_WIN)
|
2017-03-27 21:19:34 +00:00
|
|
|
#include <shlobj.h>
|
|
|
|
#endif
|
|
|
|
|
2022-07-12 07:48:51 +00:00
|
|
|
#if BUILDFLAG(ENABLE_WIDEVINE)
|
2022-03-25 01:39:03 +00:00
|
|
|
#include "chrome/renderer/media/chrome_key_systems.h" // nogncheck
|
|
|
|
#endif
|
|
|
|
|
2019-10-31 20:11:51 +00:00
|
|
|
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
|
|
|
#include "components/spellcheck/renderer/spellcheck.h"
|
|
|
|
#include "components/spellcheck/renderer/spellcheck_provider.h"
|
|
|
|
#endif
|
|
|
|
|
2018-10-01 20:00:53 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
2024-05-01 00:32:11 +00:00
|
|
|
#include "components/pdf/common/constants.h" // nogncheck
|
|
|
|
#include "components/pdf/common/pdf_util.h" // nogncheck
|
2022-03-30 18:55:38 +00:00
|
|
|
#include "components/pdf/renderer/pdf_internal_plugin_delegate.h"
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/common/electron_constants.h"
|
2018-10-01 20:00:53 +00:00
|
|
|
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
2018-03-15 08:51:48 +00:00
|
|
|
|
2019-11-04 17:50:31 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PLUGINS)
|
2022-10-27 16:37:04 +00:00
|
|
|
#include "shell/common/plugin_info.h"
|
2019-11-04 17:50:31 +00:00
|
|
|
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
2018-06-20 00:44:24 +00:00
|
|
|
|
2018-10-13 01:57:04 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
|
#include "components/printing/renderer/print_render_frame_helper.h"
|
2021-10-21 18:51:36 +00:00
|
|
|
#include "printing/metafile_agent.h" // nogncheck
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/renderer/printing/print_render_frame_helper_delegate.h"
|
2018-10-13 01:57:04 +00:00
|
|
|
#endif // BUILDFLAG(ENABLE_PRINTING)
|
|
|
|
|
2019-07-24 23:01:08 +00:00
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
2020-02-13 00:39:12 +00:00
|
|
|
#include "base/strings/utf_string_conversions.h"
|
|
|
|
#include "content/public/common/webplugininfo.h"
|
|
|
|
#include "extensions/common/constants.h"
|
2019-07-24 23:01:08 +00:00
|
|
|
#include "extensions/common/extensions_client.h"
|
2024-03-15 18:03:42 +00:00
|
|
|
#include "extensions/renderer/api/core_extensions_renderer_api_provider.h"
|
2019-07-24 23:01:08 +00:00
|
|
|
#include "extensions/renderer/dispatcher.h"
|
|
|
|
#include "extensions/renderer/extension_frame_helper.h"
|
2022-10-03 20:21:00 +00:00
|
|
|
#include "extensions/renderer/extension_web_view_helper.h"
|
2020-02-13 00:39:12 +00:00
|
|
|
#include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h"
|
2020-02-03 22:01:10 +00:00
|
|
|
#include "shell/common/extensions/electron_extensions_client.h"
|
2024-03-12 09:15:41 +00:00
|
|
|
#include "shell/renderer/extensions/electron_extensions_renderer_api_provider.h"
|
2020-02-03 22:01:10 +00:00
|
|
|
#include "shell/renderer/extensions/electron_extensions_renderer_client.h"
|
2019-07-24 23:01:08 +00:00
|
|
|
#endif // BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
|
2017-03-27 21:19:34 +00:00
|
|
|
namespace electron {
|
|
|
|
|
2021-05-24 02:32:55 +00:00
|
|
|
content::RenderFrame* GetRenderFrame(v8::Local<v8::Object> value);
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2021-05-24 02:32:55 +00:00
|
|
|
namespace {
|
2021-05-15 07:42:07 +00:00
|
|
|
|
|
|
|
void SetIsWebView(v8::Isolate* isolate, v8::Local<v8::Object> object) {
|
|
|
|
gin_helper::Dictionary dict(isolate, object);
|
|
|
|
dict.SetHidden("isWebView", true);
|
|
|
|
}
|
|
|
|
|
2018-09-11 18:18:10 +00:00
|
|
|
std::vector<std::string> ParseSchemesCLISwitch(base::CommandLine* command_line,
|
|
|
|
const char* switch_name) {
|
2017-03-27 21:19:34 +00:00
|
|
|
std::string custom_schemes = command_line->GetSwitchValueASCII(switch_name);
|
2018-04-18 01:55:30 +00:00
|
|
|
return base::SplitString(custom_schemes, ",", base::TRIM_WHITESPACE,
|
|
|
|
base::SPLIT_WANT_NONEMPTY);
|
2017-03-27 21:19:34 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 18:55:38 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
|
|
|
class ChromePdfInternalPluginDelegate final
|
|
|
|
: public pdf::PdfInternalPluginDelegate {
|
|
|
|
public:
|
|
|
|
ChromePdfInternalPluginDelegate() = default;
|
|
|
|
ChromePdfInternalPluginDelegate(const ChromePdfInternalPluginDelegate&) =
|
|
|
|
delete;
|
|
|
|
ChromePdfInternalPluginDelegate& operator=(
|
|
|
|
const ChromePdfInternalPluginDelegate&) = delete;
|
|
|
|
~ChromePdfInternalPluginDelegate() override = default;
|
|
|
|
|
|
|
|
// `pdf::PdfInternalPluginDelegate`:
|
|
|
|
bool IsAllowedOrigin(const url::Origin& origin) const override {
|
|
|
|
return origin.scheme() == extensions::kExtensionScheme &&
|
|
|
|
origin.host() == extension_misc::kPdfExtensionId;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
|
|
|
|
2021-05-10 12:19:23 +00:00
|
|
|
// static
|
|
|
|
RendererClientBase* g_renderer_client_base = nullptr;
|
|
|
|
|
2022-06-13 06:58:27 +00:00
|
|
|
bool IsDevTools(content::RenderFrame* render_frame) {
|
|
|
|
return render_frame->GetWebFrame()->GetDocument().Url().ProtocolIs(
|
|
|
|
"devtools");
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsDevToolsExtension(content::RenderFrame* render_frame) {
|
|
|
|
return render_frame->GetWebFrame()->GetDocument().Url().ProtocolIs(
|
|
|
|
"chrome-extension");
|
|
|
|
}
|
|
|
|
|
2017-03-27 21:19:34 +00:00
|
|
|
} // namespace
|
|
|
|
|
|
|
|
RendererClientBase::RendererClientBase() {
|
2018-09-11 18:18:10 +00:00
|
|
|
auto* command_line = base::CommandLine::ForCurrentProcess();
|
2021-06-01 01:45:23 +00:00
|
|
|
// Parse --service-worker-schemes=scheme1,scheme2
|
|
|
|
std::vector<std::string> service_worker_schemes_list =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kServiceWorkerSchemes);
|
|
|
|
for (const std::string& scheme : service_worker_schemes_list)
|
|
|
|
electron::api::AddServiceWorkerScheme(scheme);
|
2017-03-27 21:19:34 +00:00
|
|
|
// Parse --standard-schemes=scheme1,scheme2
|
|
|
|
std::vector<std::string> standard_schemes_list =
|
2018-09-11 18:18:10 +00:00
|
|
|
ParseSchemesCLISwitch(command_line, switches::kStandardSchemes);
|
2017-03-27 21:19:34 +00:00
|
|
|
for (const std::string& scheme : standard_schemes_list)
|
2018-07-21 15:40:06 +00:00
|
|
|
url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST);
|
2020-04-01 02:33:16 +00:00
|
|
|
// Parse --cors-schemes=scheme1,scheme2
|
|
|
|
std::vector<std::string> cors_schemes_list =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kCORSSchemes);
|
|
|
|
for (const std::string& scheme : cors_schemes_list)
|
|
|
|
url::AddCorsEnabledScheme(scheme.c_str());
|
2020-06-08 16:49:36 +00:00
|
|
|
// Parse --streaming-schemes=scheme1,scheme2
|
|
|
|
std::vector<std::string> streaming_schemes_list =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kStreamingSchemes);
|
|
|
|
for (const std::string& scheme : streaming_schemes_list)
|
2021-07-26 16:02:16 +00:00
|
|
|
blink::AddStreamingScheme(scheme.c_str());
|
2021-01-25 16:46:00 +00:00
|
|
|
// Parse --secure-schemes=scheme1,scheme2
|
|
|
|
std::vector<std::string> secure_schemes_list =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kSecureSchemes);
|
|
|
|
for (const std::string& scheme : secure_schemes_list)
|
|
|
|
url::AddSecureScheme(scheme.data());
|
2018-09-11 18:18:10 +00:00
|
|
|
// We rely on the unique process host id which is notified to the
|
|
|
|
// renderer process via command line switch from the content layer,
|
|
|
|
// if this switch is removed from the content layer for some reason,
|
|
|
|
// we should define our own.
|
|
|
|
DCHECK(command_line->HasSwitch(::switches::kRendererClientId));
|
|
|
|
renderer_client_id_ =
|
|
|
|
command_line->GetSwitchValueASCII(::switches::kRendererClientId);
|
2021-05-10 12:19:23 +00:00
|
|
|
|
|
|
|
g_renderer_client_base = this;
|
2017-03-27 21:19:34 +00:00
|
|
|
}
|
|
|
|
|
2021-05-10 12:19:23 +00:00
|
|
|
RendererClientBase::~RendererClientBase() {
|
|
|
|
g_renderer_client_base = nullptr;
|
|
|
|
}
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2021-05-10 12:19:23 +00:00
|
|
|
// static
|
|
|
|
RendererClientBase* RendererClientBase::Get() {
|
|
|
|
DCHECK(g_renderer_client_base);
|
|
|
|
return g_renderer_client_base;
|
|
|
|
}
|
|
|
|
|
2021-03-17 18:23:29 +00:00
|
|
|
void RendererClientBase::BindProcess(v8::Isolate* isolate,
|
|
|
|
gin_helper::Dictionary* process,
|
|
|
|
content::RenderFrame* render_frame) {
|
2021-05-24 07:51:54 +00:00
|
|
|
auto context_id = base::StringPrintf(
|
|
|
|
"%s-%" PRId64, renderer_client_id_.c_str(), ++next_context_id_);
|
|
|
|
|
2021-03-17 18:23:29 +00:00
|
|
|
process->SetReadOnly("isMainFrame", render_frame->IsMainFrame());
|
2021-03-18 21:00:19 +00:00
|
|
|
process->SetReadOnly("contextIsolated",
|
2021-03-17 18:23:29 +00:00
|
|
|
render_frame->GetBlinkPreferences().context_isolation);
|
2021-05-24 07:51:54 +00:00
|
|
|
process->SetReadOnly("contextId", context_id);
|
2021-03-17 18:23:29 +00:00
|
|
|
}
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2022-06-13 06:58:27 +00:00
|
|
|
bool RendererClientBase::ShouldLoadPreload(
|
2024-07-24 23:24:07 +00:00
|
|
|
v8::Local<v8::Context> context,
|
2022-06-13 06:58:27 +00:00
|
|
|
content::RenderFrame* render_frame) const {
|
|
|
|
auto prefs = render_frame->GetBlinkPreferences();
|
|
|
|
bool is_main_frame = render_frame->IsMainFrame();
|
|
|
|
bool is_devtools =
|
|
|
|
IsDevTools(render_frame) || IsDevToolsExtension(render_frame);
|
|
|
|
bool allow_node_in_sub_frames = prefs.node_integration_in_sub_frames;
|
|
|
|
|
|
|
|
return (is_main_frame || is_devtools || allow_node_in_sub_frames) &&
|
|
|
|
!IsWebViewFrame(context, render_frame);
|
|
|
|
}
|
|
|
|
|
2017-03-27 21:19:34 +00:00
|
|
|
void RendererClientBase::RenderThreadStarted() {
|
2018-09-11 18:18:10 +00:00
|
|
|
auto* command_line = base::CommandLine::ForCurrentProcess();
|
|
|
|
|
2024-02-14 17:33:32 +00:00
|
|
|
// Enable MessagePort close event by default.
|
|
|
|
// The feature got reverted from stable to test in
|
|
|
|
// https://chromium-review.googlesource.com/c/chromium/src/+/5276821
|
|
|
|
// We had the event supported through patch before upstream support,
|
|
|
|
// this is an alternative option than restoring our patch.
|
|
|
|
blink::WebRuntimeFeatures::EnableFeatureFromString("MessagePortCloseEvent",
|
|
|
|
true);
|
|
|
|
|
2019-07-24 23:01:08 +00:00
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
auto* thread = content::RenderThread::Get();
|
|
|
|
|
|
|
|
extensions_client_.reset(CreateExtensionsClient());
|
|
|
|
extensions::ExtensionsClient::Set(extensions_client_.get());
|
|
|
|
|
2021-06-08 02:00:05 +00:00
|
|
|
extensions_renderer_client_ =
|
|
|
|
std::make_unique<ElectronExtensionsRendererClient>();
|
2024-03-15 18:03:42 +00:00
|
|
|
extensions_renderer_client_->AddAPIProvider(
|
|
|
|
std::make_unique<extensions::CoreExtensionsRendererAPIProvider>());
|
2024-03-12 09:15:41 +00:00
|
|
|
extensions_renderer_client_->AddAPIProvider(
|
|
|
|
std::make_unique<ElectronExtensionsRendererAPIProvider>());
|
|
|
|
extensions_renderer_client_->RenderThreadStarted();
|
2019-07-24 23:01:08 +00:00
|
|
|
extensions::ExtensionsRendererClient::Set(extensions_renderer_client_.get());
|
|
|
|
|
2020-05-04 20:56:50 +00:00
|
|
|
thread->AddObserver(extensions_renderer_client_->GetDispatcher());
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2021-01-25 16:46:00 +00:00
|
|
|
WTF::String extension_scheme(extensions::kExtensionScheme);
|
2017-09-15 07:48:55 +00:00
|
|
|
// Extension resources are HTTP-like and safe to expose to the fetch API. The
|
|
|
|
// rules for the fetch API are consistent with XHR.
|
|
|
|
blink::SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI(
|
|
|
|
extension_scheme);
|
|
|
|
// Extension resources, when loaded as the top-level document, should bypass
|
|
|
|
// Blink's strict first-party origin checks.
|
|
|
|
blink::SchemeRegistry::RegisterURLSchemeAsFirstPartyWhenTopLevel(
|
|
|
|
extension_scheme);
|
|
|
|
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
|
|
|
|
extension_scheme);
|
2023-10-04 08:40:01 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
|
|
|
spellcheck_ = std::make_unique<SpellCheck>(this);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
blink::WebCustomElement::AddEmbedderCustomElementName("webview");
|
|
|
|
blink::WebCustomElement::AddEmbedderCustomElementName("browserplugin");
|
2017-09-15 07:48:55 +00:00
|
|
|
|
2019-01-29 07:11:01 +00:00
|
|
|
std::vector<std::string> fetch_enabled_schemes =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kFetchSchemes);
|
|
|
|
for (const std::string& scheme : fetch_enabled_schemes) {
|
|
|
|
blink::WebSecurityPolicy::RegisterURLSchemeAsSupportingFetchAPI(
|
|
|
|
blink::WebString::FromASCII(scheme));
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<std::string> service_worker_schemes =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kServiceWorkerSchemes);
|
|
|
|
for (const std::string& scheme : service_worker_schemes)
|
|
|
|
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers(
|
|
|
|
blink::WebString::FromASCII(scheme));
|
|
|
|
|
|
|
|
std::vector<std::string> csp_bypassing_schemes =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kBypassCSPSchemes);
|
|
|
|
for (const std::string& scheme : csp_bypassing_schemes)
|
|
|
|
blink::SchemeRegistry::RegisterURLSchemeAsBypassingContentSecurityPolicy(
|
|
|
|
WTF::String::FromUTF8(scheme.data(), scheme.length()));
|
|
|
|
|
2023-12-06 02:22:41 +00:00
|
|
|
std::vector<std::string> code_cache_schemes_list =
|
|
|
|
ParseSchemesCLISwitch(command_line, switches::kCodeCacheSchemes);
|
|
|
|
for (const auto& scheme : code_cache_schemes_list) {
|
|
|
|
blink::WebSecurityPolicy::RegisterURLSchemeAsCodeCacheWithHashing(
|
|
|
|
blink::WebString::FromASCII(scheme));
|
|
|
|
}
|
|
|
|
|
2017-12-17 20:56:53 +00:00
|
|
|
// Allow file scheme to handle service worker by default.
|
|
|
|
// FIXME(zcbenz): Can this be moved elsewhere?
|
2023-11-09 18:23:52 +00:00
|
|
|
if (electron::fuses::IsGrantFileProtocolExtraPrivilegesEnabled()) {
|
|
|
|
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file");
|
|
|
|
blink::SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI("file");
|
|
|
|
}
|
2017-12-17 20:56:53 +00:00
|
|
|
|
2022-02-10 02:58:52 +00:00
|
|
|
#if BUILDFLAG(IS_WIN)
|
2017-03-27 21:19:34 +00:00
|
|
|
// Set ApplicationUserModelID in renderer process.
|
2021-03-18 19:55:51 +00:00
|
|
|
std::wstring app_id =
|
2017-03-27 21:19:34 +00:00
|
|
|
command_line->GetSwitchValueNative(switches::kAppUserModelId);
|
|
|
|
if (!app_id.empty()) {
|
|
|
|
SetCurrentProcessExplicitAppUserModelID(app_id.c_str());
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2020-02-03 17:49:37 +00:00
|
|
|
void RendererClientBase::ExposeInterfacesToBrowser(mojo::BinderMap* binders) {
|
|
|
|
// NOTE: Do not add binders directly within this method. Instead, modify the
|
|
|
|
// definition of |ExposeElectronRendererInterfacesToBrowser()| to ensure
|
|
|
|
// security review coverage.
|
|
|
|
ExposeElectronRendererInterfacesToBrowser(this, binders);
|
|
|
|
}
|
|
|
|
|
2017-03-27 21:19:34 +00:00
|
|
|
void RendererClientBase::RenderFrameCreated(
|
|
|
|
content::RenderFrame* render_frame) {
|
2018-04-05 00:53:51 +00:00
|
|
|
#if defined(TOOLKIT_VIEWS)
|
2019-06-12 22:08:22 +00:00
|
|
|
new AutofillAgent(render_frame,
|
|
|
|
render_frame->GetAssociatedInterfaceRegistry());
|
2018-06-20 00:44:24 +00:00
|
|
|
#endif
|
2017-03-27 21:19:34 +00:00
|
|
|
new ContentSettingsObserver(render_frame);
|
2018-10-13 01:57:04 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
|
new printing::PrintRenderFrameHelper(
|
2018-11-09 03:42:34 +00:00
|
|
|
render_frame,
|
|
|
|
std::make_unique<electron::PrintRenderFrameHelperDelegate>());
|
2018-10-13 01:57:04 +00:00
|
|
|
#endif
|
2017-03-27 21:19:34 +00:00
|
|
|
|
2019-08-12 17:38:41 +00:00
|
|
|
// Note: ElectronApiServiceImpl has to be created now to capture the
|
|
|
|
// DidCreateDocumentElement event.
|
2021-02-09 20:16:21 +00:00
|
|
|
new ElectronApiServiceImpl(render_frame, this);
|
2019-04-02 22:38:16 +00:00
|
|
|
|
2019-07-24 23:01:08 +00:00
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
auto* dispatcher = extensions_renderer_client_->GetDispatcher();
|
|
|
|
// ExtensionFrameHelper destroys itself when the RenderFrame is destroyed.
|
|
|
|
new extensions::ExtensionFrameHelper(render_frame, dispatcher);
|
|
|
|
|
|
|
|
dispatcher->OnRenderFrameCreated(render_frame);
|
2020-02-13 00:39:12 +00:00
|
|
|
|
2022-09-07 07:46:37 +00:00
|
|
|
render_frame->GetAssociatedInterfaceRegistry()
|
|
|
|
->AddInterface<extensions::mojom::MimeHandlerViewContainerManager>(
|
|
|
|
base::BindRepeating(
|
|
|
|
&extensions::MimeHandlerViewContainerManager::BindReceiver,
|
2023-11-28 21:40:12 +00:00
|
|
|
base::Unretained(render_frame)));
|
2019-07-24 23:01:08 +00:00
|
|
|
#endif
|
2019-10-31 20:11:51 +00:00
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
2024-01-03 08:52:49 +00:00
|
|
|
if (render_frame->GetBlinkPreferences().enable_spellcheck) {
|
|
|
|
new SpellCheckProvider(render_frame, spellcheck_.get());
|
|
|
|
}
|
2019-10-31 20:11:51 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
|
|
|
|
void RendererClientBase::GetInterface(
|
|
|
|
const std::string& interface_name,
|
|
|
|
mojo::ScopedMessagePipeHandle interface_pipe) {
|
|
|
|
// TODO(crbug.com/977637): Get rid of the use of this implementation of
|
|
|
|
// |service_manager::LocalInterfaceProvider|. This was done only to avoid
|
|
|
|
// churning spellcheck code while eliminating the "chrome" and
|
|
|
|
// "chrome_renderer" services. Spellcheck is (and should remain) the only
|
|
|
|
// consumer of this implementation.
|
|
|
|
content::RenderThread::Get()->BindHostReceiver(
|
|
|
|
mojo::GenericPendingReceiver(interface_name, std::move(interface_pipe)));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-04-08 13:43:19 +00:00
|
|
|
void RendererClientBase::DidClearWindowObject(
|
|
|
|
content::RenderFrame* render_frame) {
|
|
|
|
// Make sure every page will get a script context created.
|
2017-06-16 20:42:33 +00:00
|
|
|
render_frame->GetWebFrame()->ExecuteScript(blink::WebScriptSource("void 0"));
|
2017-04-08 13:43:19 +00:00
|
|
|
}
|
|
|
|
|
2017-03-27 21:19:34 +00:00
|
|
|
bool RendererClientBase::OverrideCreatePlugin(
|
|
|
|
content::RenderFrame* render_frame,
|
|
|
|
const blink::WebPluginParams& params,
|
|
|
|
blink::WebPlugin** plugin) {
|
2018-10-01 20:00:53 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
2022-03-30 18:55:38 +00:00
|
|
|
if (params.mime_type.Utf8() == pdf::kInternalPluginMimeType) {
|
2022-03-25 01:39:03 +00:00
|
|
|
*plugin = pdf::CreateInternalPlugin(
|
|
|
|
std::move(params), render_frame,
|
|
|
|
std::make_unique<ChromePdfInternalPluginDelegate>());
|
|
|
|
return true;
|
|
|
|
}
|
2018-10-01 20:00:53 +00:00
|
|
|
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
2022-03-25 01:39:03 +00:00
|
|
|
|
|
|
|
if (params.mime_type.Utf8() == content::kBrowserPluginMimeType ||
|
2020-11-10 17:06:03 +00:00
|
|
|
render_frame->GetBlinkPreferences().enable_plugins)
|
2017-03-27 21:19:34 +00:00
|
|
|
return false;
|
|
|
|
|
|
|
|
*plugin = nullptr;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-01-22 07:24:36 +00:00
|
|
|
void RendererClientBase::DidSetUserAgent(const std::string& user_agent) {
|
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
|
|
|
printing::SetAgent(user_agent);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2020-02-13 00:39:12 +00:00
|
|
|
bool RendererClientBase::IsPluginHandledExternally(
|
|
|
|
content::RenderFrame* render_frame,
|
|
|
|
const blink::WebElement& plugin_element,
|
|
|
|
const GURL& original_url,
|
|
|
|
const std::string& mime_type) {
|
2020-05-04 20:56:50 +00:00
|
|
|
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
2020-02-13 00:39:12 +00:00
|
|
|
DCHECK(plugin_element.HasHTMLTagName("object") ||
|
|
|
|
plugin_element.HasHTMLTagName("embed"));
|
2024-08-12 08:28:33 +00:00
|
|
|
|
|
|
|
mojo::AssociatedRemote<mojom::ElectronPluginInfoHost> plugin_info_host;
|
|
|
|
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
|
|
|
&plugin_info_host);
|
|
|
|
mojom::PluginInfoPtr plugin_info = mojom::PluginInfo::New();
|
|
|
|
plugin_info_host->GetPluginInfo(
|
|
|
|
original_url, render_frame->GetWebFrame()->Top()->GetSecurityOrigin(),
|
|
|
|
mime_type, &plugin_info);
|
|
|
|
|
|
|
|
if (plugin_info->actual_mime_type == pdf::kInternalPluginMimeType) {
|
2022-03-25 01:39:03 +00:00
|
|
|
if (IsPdfInternalPluginAllowedOrigin(
|
|
|
|
render_frame->GetWebFrame()->GetSecurityOrigin())) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-13 00:39:12 +00:00
|
|
|
return extensions::MimeHandlerViewContainerManager::Get(
|
|
|
|
content::RenderFrame::FromWebFrame(
|
|
|
|
plugin_element.GetDocument().GetFrame()),
|
|
|
|
true /* create_if_does_not_exist */)
|
2024-08-12 08:28:33 +00:00
|
|
|
->CreateFrameContainer(plugin_element, original_url,
|
|
|
|
plugin_info->actual_mime_type,
|
|
|
|
plugin_info->plugin);
|
2020-02-13 00:39:12 +00:00
|
|
|
#else
|
|
|
|
return false;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2022-03-25 01:39:03 +00:00
|
|
|
v8::Local<v8::Object> RendererClientBase::GetScriptableObject(
|
|
|
|
const blink::WebElement& plugin_element,
|
|
|
|
v8::Isolate* isolate) {
|
2022-03-30 18:55:38 +00:00
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
2022-03-25 01:39:03 +00:00
|
|
|
// If there is a MimeHandlerView that can provide the scriptable object then
|
|
|
|
// MaybeCreateMimeHandlerView must have been called before and a container
|
|
|
|
// manager should exist.
|
|
|
|
auto* container_manager = extensions::MimeHandlerViewContainerManager::Get(
|
|
|
|
content::RenderFrame::FromWebFrame(
|
|
|
|
plugin_element.GetDocument().GetFrame()),
|
|
|
|
false /* create_if_does_not_exist */);
|
|
|
|
if (container_manager)
|
|
|
|
return container_manager->GetScriptableObject(plugin_element, isolate);
|
2022-03-30 18:55:38 +00:00
|
|
|
#endif
|
2022-03-25 01:39:03 +00:00
|
|
|
return v8::Local<v8::Object>();
|
2020-02-13 00:39:12 +00:00
|
|
|
}
|
|
|
|
|
2019-12-11 00:22:35 +00:00
|
|
|
std::unique_ptr<blink::WebPrescientNetworking>
|
|
|
|
RendererClientBase::CreatePrescientNetworking(
|
|
|
|
content::RenderFrame* render_frame) {
|
|
|
|
return std::make_unique<network_hints::WebPrescientNetworkingImpl>(
|
|
|
|
render_frame);
|
2019-08-26 16:47:32 +00:00
|
|
|
}
|
|
|
|
|
2019-07-24 23:01:08 +00:00
|
|
|
void RendererClientBase::RunScriptsAtDocumentStart(
|
|
|
|
content::RenderFrame* render_frame) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_.get()->RunScriptsAtDocumentStart(render_frame);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::RunScriptsAtDocumentIdle(
|
|
|
|
content::RenderFrame* render_frame) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_.get()->RunScriptsAtDocumentIdle(render_frame);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::RunScriptsAtDocumentEnd(
|
|
|
|
content::RenderFrame* render_frame) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_.get()->RunScriptsAtDocumentEnd(render_frame);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2021-02-11 15:58:03 +00:00
|
|
|
bool RendererClientBase::AllowScriptExtensionForServiceWorker(
|
|
|
|
const url::Origin& script_origin) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
return script_origin.scheme() == extensions::kExtensionScheme;
|
|
|
|
#else
|
|
|
|
return false;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::DidInitializeServiceWorkerContextOnWorkerThread(
|
|
|
|
blink::WebServiceWorkerContextProxy* context_proxy,
|
|
|
|
const GURL& service_worker_scope,
|
|
|
|
const GURL& script_url) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_->GetDispatcher()
|
|
|
|
->DidInitializeServiceWorkerContextOnWorkerThread(
|
|
|
|
context_proxy, service_worker_scope, script_url);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::WillEvaluateServiceWorkerOnWorkerThread(
|
|
|
|
blink::WebServiceWorkerContextProxy* context_proxy,
|
|
|
|
v8::Local<v8::Context> v8_context,
|
|
|
|
int64_t service_worker_version_id,
|
|
|
|
const GURL& service_worker_scope,
|
|
|
|
const GURL& script_url) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_->GetDispatcher()
|
|
|
|
->WillEvaluateServiceWorkerOnWorkerThread(
|
|
|
|
context_proxy, v8_context, service_worker_version_id,
|
|
|
|
service_worker_scope, script_url);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::DidStartServiceWorkerContextOnWorkerThread(
|
|
|
|
int64_t service_worker_version_id,
|
|
|
|
const GURL& service_worker_scope,
|
|
|
|
const GURL& script_url) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_->GetDispatcher()
|
|
|
|
->DidStartServiceWorkerContextOnWorkerThread(
|
|
|
|
service_worker_version_id, service_worker_scope, script_url);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::WillDestroyServiceWorkerContextOnWorkerThread(
|
|
|
|
v8::Local<v8::Context> context,
|
|
|
|
int64_t service_worker_version_id,
|
|
|
|
const GURL& service_worker_scope,
|
|
|
|
const GURL& script_url) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions_renderer_client_->GetDispatcher()
|
|
|
|
->WillDestroyServiceWorkerContextOnWorkerThread(
|
|
|
|
context, service_worker_version_id, service_worker_scope, script_url);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2022-10-03 20:21:00 +00:00
|
|
|
void RendererClientBase::WebViewCreated(blink::WebView* web_view,
|
|
|
|
bool was_created_by_renderer,
|
|
|
|
const url::Origin* outermost_origin) {
|
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
new extensions::ExtensionWebViewHelper(web_view, outermost_origin);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2017-07-28 00:08:24 +00:00
|
|
|
v8::Local<v8::Context> RendererClientBase::GetContext(
|
2018-04-18 01:55:30 +00:00
|
|
|
blink::WebLocalFrame* frame,
|
2018-05-05 06:39:54 +00:00
|
|
|
v8::Isolate* isolate) const {
|
2020-11-10 17:06:03 +00:00
|
|
|
auto* render_frame = content::RenderFrame::FromWebFrame(frame);
|
|
|
|
DCHECK(render_frame);
|
|
|
|
if (render_frame && render_frame->GetBlinkPreferences().context_isolation)
|
2021-06-03 08:05:04 +00:00
|
|
|
return frame->GetScriptContextFromWorldId(isolate,
|
|
|
|
WorldIDs::ISOLATED_WORLD_ID);
|
2017-08-09 00:10:44 +00:00
|
|
|
else
|
2017-08-24 21:31:25 +00:00
|
|
|
return frame->MainWorldScriptContext();
|
2017-07-28 00:08:24 +00:00
|
|
|
}
|
|
|
|
|
2019-07-24 23:01:08 +00:00
|
|
|
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
|
|
|
extensions::ExtensionsClient* RendererClientBase::CreateExtensionsClient() {
|
2020-02-03 22:01:10 +00:00
|
|
|
return new ElectronExtensionsClient;
|
2019-07-24 23:01:08 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-07-17 00:13:05 +00:00
|
|
|
bool RendererClientBase::IsWebViewFrame(
|
2024-07-24 23:24:07 +00:00
|
|
|
v8::Local<v8::Context> context,
|
2019-07-17 00:13:05 +00:00
|
|
|
content::RenderFrame* render_frame) const {
|
|
|
|
auto* isolate = context->GetIsolate();
|
|
|
|
|
|
|
|
if (render_frame->IsMainFrame())
|
|
|
|
return false;
|
|
|
|
|
2019-09-08 15:10:18 +00:00
|
|
|
gin::Dictionary window_dict(
|
2019-07-17 00:13:05 +00:00
|
|
|
isolate, GetContext(render_frame->GetWebFrame(), isolate)->Global());
|
|
|
|
|
|
|
|
v8::Local<v8::Object> frame_element;
|
|
|
|
if (!window_dict.Get("frameElement", &frame_element))
|
|
|
|
return false;
|
|
|
|
|
2019-09-08 15:10:18 +00:00
|
|
|
gin_helper::Dictionary frame_element_dict(isolate, frame_element);
|
2019-07-17 00:13:05 +00:00
|
|
|
|
2021-05-15 07:42:07 +00:00
|
|
|
bool is_webview = false;
|
|
|
|
return frame_element_dict.GetHidden("isWebView", &is_webview) && is_webview;
|
|
|
|
}
|
|
|
|
|
|
|
|
void RendererClientBase::SetupMainWorldOverrides(
|
2024-07-24 23:24:07 +00:00
|
|
|
v8::Local<v8::Context> context,
|
2021-05-15 07:42:07 +00:00
|
|
|
content::RenderFrame* render_frame) {
|
|
|
|
auto prefs = render_frame->GetBlinkPreferences();
|
|
|
|
// We only need to run the isolated bundle if webview is enabled
|
|
|
|
if (!prefs.webview_tag)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Setup window overrides in the main world context
|
|
|
|
// Wrap the bundle into a function that receives the isolatedApi as
|
|
|
|
// an argument.
|
|
|
|
auto* isolate = context->GetIsolate();
|
|
|
|
v8::HandleScope handle_scope(isolate);
|
|
|
|
v8::Context::Scope context_scope(context);
|
|
|
|
|
2023-08-21 01:43:41 +00:00
|
|
|
auto isolated_api = gin_helper::Dictionary::CreateEmpty(isolate);
|
2021-05-15 07:42:07 +00:00
|
|
|
isolated_api.SetMethod("allowGuestViewElementDefinition",
|
|
|
|
&AllowGuestViewElementDefinition);
|
|
|
|
isolated_api.SetMethod("setIsWebView", &SetIsWebView);
|
|
|
|
|
|
|
|
auto source_context = GetContext(render_frame->GetWebFrame(), isolate);
|
|
|
|
gin_helper::Dictionary global(isolate, source_context->Global());
|
|
|
|
|
|
|
|
v8::Local<v8::Value> guest_view_internal;
|
|
|
|
if (global.GetHidden("guestViewInternal", &guest_view_internal)) {
|
|
|
|
api::context_bridge::ObjectCache object_cache;
|
|
|
|
auto result = api::PassValueToOtherContext(
|
2023-10-18 14:21:42 +00:00
|
|
|
source_context, context, guest_view_internal, source_context->Global(),
|
|
|
|
&object_cache, false, 0, api::BridgeErrorTarget::kSource);
|
2021-05-15 07:42:07 +00:00
|
|
|
if (!result.IsEmpty()) {
|
|
|
|
isolated_api.Set("guestViewInternal", result.ToLocalChecked());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<v8::Local<v8::String>> isolated_bundle_params = {
|
|
|
|
node::FIXED_ONE_BYTE_STRING(isolate, "isolatedApi")};
|
2019-07-17 00:13:05 +00:00
|
|
|
|
2021-05-15 07:42:07 +00:00
|
|
|
std::vector<v8::Local<v8::Value>> isolated_bundle_args = {
|
|
|
|
isolated_api.GetHandle()};
|
|
|
|
|
|
|
|
util::CompileAndCall(context, "electron/js2c/isolated_bundle",
|
2023-11-30 14:51:35 +00:00
|
|
|
&isolated_bundle_params, &isolated_bundle_args);
|
2021-05-15 07:42:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// static
|
|
|
|
void RendererClientBase::AllowGuestViewElementDefinition(
|
|
|
|
v8::Isolate* isolate,
|
|
|
|
v8::Local<v8::Object> context,
|
|
|
|
v8::Local<v8::Function> register_cb) {
|
|
|
|
v8::HandleScope handle_scope(isolate);
|
2022-05-17 16:48:40 +00:00
|
|
|
v8::Context::Scope context_scope(context->GetCreationContextChecked());
|
2021-05-15 07:42:07 +00:00
|
|
|
blink::WebCustomElement::EmbedderNamesAllowedScope embedder_names_scope;
|
|
|
|
|
|
|
|
content::RenderFrame* render_frame = GetRenderFrame(context);
|
|
|
|
if (!render_frame)
|
|
|
|
return;
|
|
|
|
|
|
|
|
render_frame->GetWebFrame()->RequestExecuteV8Function(
|
2022-05-17 16:48:40 +00:00
|
|
|
context->GetCreationContextChecked(), register_cb, v8::Null(isolate), 0,
|
2022-09-07 07:46:37 +00:00
|
|
|
nullptr, base::NullCallback());
|
2019-07-17 00:13:05 +00:00
|
|
|
}
|
|
|
|
|
2017-03-27 21:19:34 +00:00
|
|
|
} // namespace electron
|