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

Unified Diff: content/renderer/mouse_lock_dispatcher.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
« no previous file with comments | « content/renderer/mouse_lock_dispatcher.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 886067cd4d6dcf47893698a3d3271b44676152ab..dd2326aba77661ac879acc93c799346e23fc8db1 100644
--- a/content/renderer/mouse_lock_dispatcher.cc
+++ b/content/renderer/mouse_lock_dispatcher.cc
@@ -16,6 +16,7 @@ MouseLockDispatcher::MouseLockDispatcher(RenderViewImpl* render_view_impl)
mouse_locked_(false),
pending_lock_request_(false),
pending_unlock_request_(false),
+ unlocked_by_target_(false),
target_(NULL) {
}
@@ -33,14 +34,17 @@ bool MouseLockDispatcher::LockMouse(LockTarget* target) {
render_view_impl_->webview() &&
render_view_impl_->webview()->mainFrame() &&
render_view_impl_->webview()->mainFrame()->isProcessingUserGesture();
-
- Send(new ViewHostMsg_LockMouse(routing_id(), user_gesture));
+ Send(new ViewHostMsg_LockMouse(routing_id(),
+ user_gesture,
+ unlocked_by_target_));
+ unlocked_by_target_ = false;
return true;
}
void MouseLockDispatcher::UnlockMouse(LockTarget* target) {
if (target && target == target_ && !pending_unlock_request_) {
pending_unlock_request_ = true;
+ unlocked_by_target_ = true;
Send(new ViewHostMsg_UnlockMouse(routing_id()));
}
}
@@ -120,4 +124,3 @@ void MouseLockDispatcher::OnMouseLockLost() {
if (last_target)
last_target->OnMouseLockLost();
}
-
« no previous file with comments | « content/renderer/mouse_lock_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698