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

Unified Diff: content/renderer/notification_provider.cc

Issue 12570005: Update user gesture related code to the new WebKit API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 9 months 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 | « chrome/renderer/extensions/webstore_bindings.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/notification_provider.cc
diff --git a/content/renderer/notification_provider.cc b/content/renderer/notification_provider.cc
index be7431ebc8dfa4352d49f264da83287bc0a0a58c..0459a9e32b055174159909369a565776fa1d8f9c 100644
--- a/content/renderer/notification_provider.cc
+++ b/content/renderer/notification_provider.cc
@@ -12,6 +12,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPermissionCallback.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebUserGestureIndicator.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
using WebKit::WebDocument;
@@ -21,6 +22,7 @@ using WebKit::WebNotificationPermissionCallback;
using WebKit::WebSecurityOrigin;
using WebKit::WebString;
using WebKit::WebURL;
+using WebKit::WebUserGestureIndicator;
namespace content {
@@ -72,7 +74,7 @@ void NotificationProvider::requestPermission(
const WebSecurityOrigin& origin,
WebNotificationPermissionCallback* callback) {
// We only request permission in response to a user gesture.
- if (!render_view()->GetWebView()->mainFrame()->isProcessingUserGesture())
+ if (!WebUserGestureIndicator::isProcessingUserGesture())
return;
int id = manager_.RegisterPermissionRequest(callback);
« no previous file with comments | « chrome/renderer/extensions/webstore_bindings.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698