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

Unified Diff: content/renderer/mouse_lock_dispatcher.cc

Issue 10173030: User Gesture plumbed from Renderer to Browser's FullscreenController::RequestToLockMouse. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yzshen nits fixed. Created 8 years, 8 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 | « content/public/browser/web_contents_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/mouse_lock_dispatcher.cc
diff --git a/content/renderer/mouse_lock_dispatcher.cc b/content/renderer/mouse_lock_dispatcher.cc
index 41ed654c42329bf7ada5f8775348105c28aff7e7..886067cd4d6dcf47893698a3d3271b44676152ab 100644
--- a/content/renderer/mouse_lock_dispatcher.cc
+++ b/content/renderer/mouse_lock_dispatcher.cc
@@ -6,6 +6,7 @@
#include "content/common/view_messages.h"
#include "content/renderer/render_view_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWidget.h"
@@ -28,7 +29,12 @@ bool MouseLockDispatcher::LockMouse(LockTarget* target) {
pending_lock_request_ = true;
target_ = target;
- Send(new ViewHostMsg_LockMouse(routing_id()));
+ bool user_gesture =
+ render_view_impl_->webview() &&
+ render_view_impl_->webview()->mainFrame() &&
+ render_view_impl_->webview()->mainFrame()->isProcessingUserGesture();
+
+ Send(new ViewHostMsg_LockMouse(routing_id(), user_gesture));
return true;
}
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698