Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index b0716a9223a25765c9b01a3776aa044f482cb491..b654f64c373819781a125404406cb5773972603e 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -2130,8 +2130,22 @@ void ChromeContentBrowserClient::RequestDesktopNotificationPermission( |
| return; |
| } |
| + WebContents* web_contents = WebContents::FromRenderFrameHost( |
| + render_frame_host); |
|
Peter Beverloo
2014/07/18 10:42:38
nit: four space indent
Miguel Garcia
2014/07/18 12:27:08
Done.
|
| + int render_process_id = render_frame_host->GetProcess()->GetID(); |
| + const PermissionRequestID id(render_process_id, |
|
Peter Beverloo
2014/07/18 10:42:37
nit: s/id/request_id/ for consistency.
Miguel Garcia
2014/07/18 12:27:08
Done.
|
| + web_contents->GetRoutingID(), -1 /* bridge id */, |
|
Peter Beverloo
2014/07/18 10:42:37
nit: one argument a line.
Miguel Garcia
2014/07/18 12:27:08
Done.
|
| + GURL()); |
| + |
| notification_service->RequestPermission( |
| - source_origin, render_frame_host, callback); |
| + web_contents, |
| + id, |
| + source_origin, |
| + // TODO(peter): plumb user_gesture over IPC |
| + true, |
| + base::Bind(&ChromeContentBrowserClient::NotificationPermissionRequested, |
| + weak_factory_.GetWeakPtr(), callback)); |
|
Peter Beverloo
2014/07/18 10:42:37
nit: |callback| should be on its own line.
Miguel Garcia
2014/07/18 12:27:08
Done.
|
| + |
| #else |
| NOTIMPLEMENTED(); |
| #endif |
| @@ -2921,4 +2935,10 @@ void ChromeContentBrowserClient::MaybeCopyDisableWebRtcEncryptionSwitch( |
| } |
| #endif // defined(ENABLE_WEBRTC) |
| + |
| +void ChromeContentBrowserClient::NotificationPermissionRequested( |
| + base::Closure callback, bool result) { |
| + callback.Run(); |
| +} |
| + |
| } // namespace chrome |