From 82d6bcbbeac8e75c420f8bbdc207c0077b4d8738 Mon Sep 17 00:00:00 2001 From: Cristian Amarie Date: Mon, 20 Jul 2020 18:16:48 +0000 Subject: [PATCH] Properly disable the notification and push APIs (fixes issue #2951) --- libcef/renderer/alloy/alloy_content_renderer_client.cc | 10 +++++++--- libcef/renderer/alloy/alloy_content_renderer_client.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 74d832773..4711c31d4 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -256,9 +256,6 @@ void AlloyContentRendererClient::WebKitInitialized() { // Create global objects associated with the default Isolate. CefV8IsolateCreated(); - // TODO(cef): Enable these once the implementation supports it. - blink::WebRuntimeFeatures::EnableNotifications(false); - const CefAppManager::SchemeInfoList* schemes = CefAppManager::Get()->GetCustomSchemes(); if (!schemes->empty()) { @@ -361,6 +358,13 @@ void AlloyContentRendererClient::RunSingleProcessCleanup() { } while (!complete); } +void AlloyContentRendererClient::PostIOThreadCreated( + base::SingleThreadTaskRunner*) { + // TODO(cef): Enable these once the implementation supports it. + blink::WebRuntimeFeatures::EnableNotifications(false); + blink::WebRuntimeFeatures::EnablePushMessaging(false); +} + void AlloyContentRendererClient::RenderThreadStarted() { const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.h b/libcef/renderer/alloy/alloy_content_renderer_client.h index f803b2f88..248450d60 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.h +++ b/libcef/renderer/alloy/alloy_content_renderer_client.h @@ -96,6 +96,8 @@ class AlloyContentRendererClient void RunSingleProcessCleanup(); // ContentRendererClient implementation. + void PostIOThreadCreated( + base::SingleThreadTaskRunner* io_thread_task_runner) override; void RenderThreadStarted() override; void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override; void RenderThreadConnected() override;