diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 13503ae57d7d..add3154642dc 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -287,29 +287,23 @@ brightray::BrowserMainParts* AtomBrowserClient::OverrideCreateBrowserMainParts( void AtomBrowserClient::WebNotificationAllowed( int render_process_id, - const base::Callback& callback) { + const base::Callback& callback) { content::WebContents* web_contents = WebContentsPreferences::GetWebContentsFromProcessID(render_process_id); if (!web_contents) { - callback.Run(false); + callback.Run(false, false); return; } auto permission_helper = WebContentsPermissionHelper::FromWebContents(web_contents); if (!permission_helper) { - callback.Run(false); + callback.Run(false, false); return; } - permission_helper->RequestWebNotificationPermission(callback); + permission_helper->RequestWebNotificationPermission( + base::Bind(callback, web_contents->IsAudioMuted())); } -bool AtomBrowserClient::WebContentsAudioMuted( - int render_process_id) { - content::WebContents* web_contents = - WebContentsPreferences::GetWebContentsFromProcessID(render_process_id); - return web_contents->IsAudioMuted(); - } - void AtomBrowserClient::RenderProcessHostDestroyed( content::RenderProcessHost* host) { int process_id = host->GetID(); diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 47d743449744..a61706534aa8 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -100,9 +100,7 @@ class AtomBrowserClient : public brightray::BrowserClient, const content::MainFunctionParams&) override; void WebNotificationAllowed( int render_process_id, - const base::Callback& callback) override; - bool WebContentsAudioMuted( - int render_process_id) override; + const base::Callback& callback) override; // content::RenderProcessHostObserver: void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; diff --git a/vendor/brightray b/vendor/brightray index f9bc45b03c94..0e8ffb4d653f 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit f9bc45b03c94a2db729b53885691db5e04b757df +Subproject commit 0e8ffb4d653f9e85722bc98df7ddde9a0e6d0650