diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index c1b50459c680..13503ae57d7d 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -303,6 +303,13 @@ void AtomBrowserClient::WebNotificationAllowed( permission_helper->RequestWebNotificationPermission(callback); } +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 cf1a4cc438b6..47d743449744 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -101,6 +101,8 @@ class AtomBrowserClient : public brightray::BrowserClient, void WebNotificationAllowed( int render_process_id, const base::Callback& callback) override; + bool WebContentsAudioMuted( + int render_process_id) override; // content::RenderProcessHostObserver: void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;