Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 749213003: Include whether Notification permission was requested with a user gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 429e8a18bf188d787970290582bc5ac63cdf1f2b..f499922b077fd1638132a32ed3a21109d5504078 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -937,7 +937,7 @@ void RenderFrameHostImpl::OnRunBeforeUnloadConfirm(
}
void RenderFrameHostImpl::OnRequestPlatformNotificationPermission(
- const GURL& origin, int request_id) {
+ const GURL& origin, int request_id, bool user_gesture) {
base::Callback<void(bool)> done_callback = base::Bind(
&RenderFrameHostImpl::PlatformNotificationPermissionRequestDone,
weak_ptr_factory_.GetWeakPtr(),
@@ -946,13 +946,12 @@ void RenderFrameHostImpl::OnRequestPlatformNotificationPermission(
if (!delegate()->GetAsWebContents())
return;
- // TODO(peter): plumb user_gesture and bridge_id.
GetContentClient()->browser()->RequestPermission(
content::PERMISSION_NOTIFICATIONS,
delegate()->GetAsWebContents(),
routing_id_,
origin,
- true, // user_gesture,
+ user_gesture,
done_callback);
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/common/platform_notification_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698