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

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

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
Index: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index dd6b845d406965a4eecaa54d2f1582d6aa7d057a..07a8bf9b00cad354b703fe5b3414060fb5581703 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -297,6 +297,10 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Notifies the RenderWidget that it lost the mouse lock.
void SendMouseLockLost();
+ bool is_last_unlocked_by_target() const {
+ return is_last_unlocked_by_target_;
+ }
+
// Noifies the RenderWidget of the current mouse cursor visibility state.
void SendCursorVisibilityState(bool is_visible);
@@ -666,7 +670,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
const std::vector<gfx::Rect>& character_bounds);
void OnImeCancelComposition();
void OnLockMouse(bool user_gesture,
- bool last_unlocked_by_target,
bool privileged);
void OnUnlockMouse();
void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels,
@@ -885,6 +888,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl
bool pending_mouse_lock_request_;
bool allow_privileged_mouse_lock_;
+ // Used when locking to indicate when a target application has voluntarily
+ // unlocked and desires to relock the mouse. If the mouse is unlocked due
+ // to ESC being pressed by the user, this will be false.
+ bool is_last_unlocked_by_target_;
+
// Keeps track of whether the webpage has any touch event handler. If it does,
// then touch events are sent to the renderer. Otherwise, the touch events are
// not sent to the renderer.
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698