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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // renderers involved in a page about a page-level focus update. Users other 290 // renderers involved in a page about a page-level focus update. Users other
291 // than WebContents and RenderWidgetHost should use Focus()/Blur(). 291 // than WebContents and RenderWidgetHost should use Focus()/Blur().
292 void SetPageFocus(bool focused); 292 void SetPageFocus(bool focused);
293 293
294 // Called to notify the RenderWidget that it has lost the mouse lock. 294 // Called to notify the RenderWidget that it has lost the mouse lock.
295 void LostMouseLock(); 295 void LostMouseLock();
296 296
297 // Notifies the RenderWidget that it lost the mouse lock. 297 // Notifies the RenderWidget that it lost the mouse lock.
298 void SendMouseLockLost(); 298 void SendMouseLockLost();
299 299
300 bool is_last_unlocked_by_target() const {
301 return is_last_unlocked_by_target_;
302 }
303
300 // Noifies the RenderWidget of the current mouse cursor visibility state. 304 // Noifies the RenderWidget of the current mouse cursor visibility state.
301 void SendCursorVisibilityState(bool is_visible); 305 void SendCursorVisibilityState(bool is_visible);
302 306
303 // Notifies the RenderWidgetHost that the View was destroyed. 307 // Notifies the RenderWidgetHost that the View was destroyed.
304 void ViewDestroyed(); 308 void ViewDestroyed();
305 309
306 // Signals if this host has forwarded a GestureScrollBegin without yet having 310 // Signals if this host has forwarded a GestureScrollBegin without yet having
307 // forwarded a matching GestureScrollEnd/GestureFlingStart. 311 // forwarded a matching GestureScrollEnd/GestureFlingStart.
308 bool is_in_touchscreen_gesture_scroll() const { 312 bool is_in_touchscreen_gesture_scroll() const {
309 return is_in_gesture_scroll_[blink::kWebGestureDeviceTouchscreen]; 313 return is_in_gesture_scroll_[blink::kWebGestureDeviceTouchscreen];
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params); 663 void OnUpdateRect(const ViewHostMsg_UpdateRect_Params& params);
660 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet); 664 void OnQueueSyntheticGesture(const SyntheticGesturePacket& gesture_packet);
661 void OnSetCursor(const WebCursor& cursor); 665 void OnSetCursor(const WebCursor& cursor);
662 void OnTextInputStateChanged(const TextInputState& params); 666 void OnTextInputStateChanged(const TextInputState& params);
663 667
664 void OnImeCompositionRangeChanged( 668 void OnImeCompositionRangeChanged(
665 const gfx::Range& range, 669 const gfx::Range& range,
666 const std::vector<gfx::Rect>& character_bounds); 670 const std::vector<gfx::Rect>& character_bounds);
667 void OnImeCancelComposition(); 671 void OnImeCancelComposition();
668 void OnLockMouse(bool user_gesture, 672 void OnLockMouse(bool user_gesture,
669 bool last_unlocked_by_target,
670 bool privileged); 673 bool privileged);
671 void OnUnlockMouse(); 674 void OnUnlockMouse();
672 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels, 675 void OnShowDisambiguationPopup(const gfx::Rect& rect_pixels,
673 const gfx::Size& size, 676 const gfx::Size& size,
674 const cc::SharedBitmapId& id); 677 const cc::SharedBitmapId& id);
675 void OnSelectionBoundsChanged( 678 void OnSelectionBoundsChanged(
676 const ViewHostMsg_SelectionBounds_Params& params); 679 const ViewHostMsg_SelectionBounds_Params& params);
677 void OnSetNeedsBeginFrames(bool needs_begin_frames); 680 void OnSetNeedsBeginFrames(bool needs_begin_frames);
678 void OnHittestData(const FrameHostMsg_HittestData_Params& params); 681 void OnHittestData(const FrameHostMsg_HittestData_Params& params);
679 void OnFocusedNodeTouched(bool editable); 682 void OnFocusedNodeTouched(bool editable);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 // see only the Char and KeyUp events and cause unexpected behavior. For 881 // see only the Char and KeyUp events and cause unexpected behavior. For
879 // example, pressing alt-2 may let the browser switch to the second tab, but 882 // example, pressing alt-2 may let the browser switch to the second tab, but
880 // the Char event generated by alt-2 may also activate a HTML element if its 883 // the Char event generated by alt-2 may also activate a HTML element if its
881 // accesskey happens to be "2", then the user may get confused when switching 884 // accesskey happens to be "2", then the user may get confused when switching
882 // back to the original tab, because the content may already have changed. 885 // back to the original tab, because the content may already have changed.
883 bool suppress_events_until_keydown_; 886 bool suppress_events_until_keydown_;
884 887
885 bool pending_mouse_lock_request_; 888 bool pending_mouse_lock_request_;
886 bool allow_privileged_mouse_lock_; 889 bool allow_privileged_mouse_lock_;
887 890
891 // Used when locking to indicate when a target application has voluntarily
892 // unlocked and desires to relock the mouse. If the mouse is unlocked due
893 // to ESC being pressed by the user, this will be false.
894 bool is_last_unlocked_by_target_;
895
888 // Keeps track of whether the webpage has any touch event handler. If it does, 896 // Keeps track of whether the webpage has any touch event handler. If it does,
889 // then touch events are sent to the renderer. Otherwise, the touch events are 897 // then touch events are sent to the renderer. Otherwise, the touch events are
890 // not sent to the renderer. 898 // not sent to the renderer.
891 bool has_touch_handler_; 899 bool has_touch_handler_;
892 900
893 // TODO(wjmaclean) Remove the code for supporting resending gesture events 901 // TODO(wjmaclean) Remove the code for supporting resending gesture events
894 // when WebView transitions to OOPIF and BrowserPlugin is removed. 902 // when WebView transitions to OOPIF and BrowserPlugin is removed.
895 // http://crbug.com/533069 903 // http://crbug.com/533069
896 bool is_in_gesture_scroll_[blink::kWebGestureDeviceCount] = {false}; 904 bool is_in_gesture_scroll_[blink::kWebGestureDeviceCount] = {false};
897 bool is_in_touchpad_gesture_fling_; 905 bool is_in_touchpad_gesture_fling_;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 base::OnceClosure begin_frame_callback_; 997 base::OnceClosure begin_frame_callback_;
990 998
991 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 999 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
992 1000
993 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 1001 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
994 }; 1002 };
995 1003
996 } // namespace content 1004 } // namespace content
997 1005
998 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 1006 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW
« 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