void AtomBrowserClient::WebNotificationAllowed(
int render_process_id,
- const base::Callback<void(bool)>& callback) {
+ const base::Callback<void(bool, bool)>& 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();
const content::MainFunctionParams&) override;
void WebNotificationAllowed(
int render_process_id,
- const base::Callback<void(bool)>& callback) override;
- bool WebContentsAudioMuted(
- int render_process_id) override;
+ const base::Callback<void(bool, bool)>& callback) override;
// content::RenderProcessHostObserver:
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;