Chromium Code Reviews| 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 36ff593fdb72578e2930b09cc162304fd918fa81..c2db68fcdec24cf99531aebf8d20bc2a061418e9 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.h |
| +++ b/content/browser/renderer_host/render_widget_host_impl.h |
| @@ -296,6 +296,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); |
| @@ -515,7 +519,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl |
| // or create it if it doesn't already exist. |
| BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); |
| - void RejectMouseLockOrUnlockIfNecessary(); |
| + void RejectMouseLockOrUnlockIfNecessary(bool is_unlocked_by_target = false); |
|
dtapuska
2017/05/31 20:04:03
You can't use default initialized parameters in ch
chongz
2017/06/01 14:58:20
Removed the parameter. Please see the other commen
|
| void set_renderer_initialized(bool renderer_initialized) { |
| renderer_initialized_ = renderer_initialized; |
| @@ -662,7 +666,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. |