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

Unified Diff: content/renderer/notification_permission_dispatcher.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
« no previous file with comments | « content/common/platform_notification_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/notification_permission_dispatcher.cc
diff --git a/content/renderer/notification_permission_dispatcher.cc b/content/renderer/notification_permission_dispatcher.cc
index 92d5529122b2dcbef19ce47de6de3a2ae09a24d0..0766d0043d9e77139aec3fce9f0efbec284ba0bc 100644
--- a/content/renderer/notification_permission_dispatcher.cc
+++ b/content/renderer/notification_permission_dispatcher.cc
@@ -8,6 +8,7 @@
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebNotificationPermissionCallback.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
+#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "url/gurl.h"
namespace content {
@@ -24,7 +25,10 @@ void NotificationPermissionDispatcher::RequestPermission(
blink::WebNotificationPermissionCallback* callback) {
int request_id = pending_requests_.Add(callback);
Send(new PlatformNotificationHostMsg_RequestPermission(
- routing_id(), GURL(origin.toString()), request_id));
+ routing_id(),
+ GURL(origin.toString()),
+ request_id,
+ blink::WebUserGestureIndicator::isProcessingUserGesture()));
}
bool NotificationPermissionDispatcher::OnMessageReceived(
« no previous file with comments | « content/common/platform_notification_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698