delegate to permission manager for other permissions

This commit is contained in:
Robo 2016-01-30 16:49:18 +05:30
parent f32bf08eb3
commit 2a278ceb8f
14 changed files with 324 additions and 77 deletions

View file

@ -288,13 +288,13 @@ void AtomBrowserClient::WebNotificationAllowed(
content::WebContents* web_contents = content::WebContents::FromRenderViewHost(
content::RenderViewHost::FromID(render_process_id, kDefaultRoutingID));
if (!web_contents) {
callback.Run(true);
callback.Run(false);
return;
}
auto permission_helper =
WebContentsPermissionHelper::FromWebContents(web_contents);
if (!permission_helper) {
callback.Run(true);
callback.Run(false);
return;
}
permission_helper->RequestWebNotificationPermission(callback);