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

Unified Diff: content/renderer/mouse_lock_dispatcher.cc

Issue 2915613004: [PointerLock] Move "silent mouse lock" logic from renderer to RWHI (Closed)
Patch Set: jochen's comment: Remove 'const' before local bool Created 3 years, 6 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') | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | 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 f801e66ff7cef2c69c9e43f40c2fc45a6a820639..5b42b6e965a209467d4ed7246ec04c962260dd20 100644
--- a/content/renderer/mouse_lock_dispatcher.cc
+++ b/content/renderer/mouse_lock_dispatcher.cc
@@ -12,7 +12,6 @@ namespace content {
MouseLockDispatcher::MouseLockDispatcher() : mouse_locked_(false),
pending_lock_request_(false),
pending_unlock_request_(false),
- unlocked_by_target_(false),
target_(NULL) {
}
@@ -26,8 +25,7 @@ bool MouseLockDispatcher::LockMouse(LockTarget* target) {
pending_lock_request_ = true;
target_ = target;
- SendLockMouseRequest(unlocked_by_target_);
- unlocked_by_target_ = false;
+ SendLockMouseRequest();
return true;
}
@@ -35,13 +33,6 @@ void MouseLockDispatcher::UnlockMouse(LockTarget* target) {
if (target && target == target_ && !pending_unlock_request_) {
pending_unlock_request_ = true;
- // When a target application voluntarily unlocks the mouse we permit
- // relocking the mouse silently and with no user gesture requirement.
- // Check that the lock request is not currently pending and not yet
- // accepted by the browser process before setting |unlocked_by_target_|.
- if (!pending_lock_request_)
- unlocked_by_target_ = true;
-
SendUnlockMouseRequest();
}
}
« no previous file with comments | « content/renderer/mouse_lock_dispatcher.h ('k') | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698