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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10443045: Silent mouse lock after unlock by target (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit changes Created 8 years, 7 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 2ffb0941f4904d76418a629972dd878487e18442..02875f6b0fcb75cf5bc0722a3db884a6562e4c1b 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1040,7 +1040,8 @@ gfx::Rect RenderWidgetHostImpl::GetRootWindowResizerRect() const {
return gfx::Rect();
}
-void RenderWidgetHostImpl::RequestToLockMouse(bool /* user_gesture */) {
+void RenderWidgetHostImpl::RequestToLockMouse(bool user_gesture,
+ bool last_unlocked_by_target) {
// Directly reject to lock the mouse. Subclass can override this method to
// decide whether to allow mouse lock or not.
GotResponseToLockMouseRequest(false);
@@ -1485,7 +1486,9 @@ void RenderWidgetHostImpl::OnMsgDidActivateAcceleratedCompositing(
view_->OnAcceleratedCompositingStateChange();
}
-void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture) {
+void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture,
+ bool last_unlocked_by_target) {
+
if (pending_mouse_lock_request_) {
Send(new ViewMsg_LockMouse_ACK(routing_id_, false));
return;
@@ -1495,7 +1498,7 @@ void RenderWidgetHostImpl::OnMsgLockMouse(bool user_gesture) {
}
pending_mouse_lock_request_ = true;
- RequestToLockMouse(user_gesture);
+ RequestToLockMouse(user_gesture, last_unlocked_by_target);
}
void RenderWidgetHostImpl::OnMsgUnlockMouse() {
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698