| OLD | NEW |
| 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 #include "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "content/renderer/render_thread_impl.h" | 50 #include "content/renderer/render_thread_impl.h" |
| 51 #include "content/renderer/render_view_impl.h" | 51 #include "content/renderer/render_view_impl.h" |
| 52 #include "content/renderer/render_widget_owner_delegate.h" | 52 #include "content/renderer/render_widget_owner_delegate.h" |
| 53 #include "content/renderer/renderer_blink_platform_impl.h" | 53 #include "content/renderer/renderer_blink_platform_impl.h" |
| 54 #include "content/renderer/resizing_mode_selector.h" | 54 #include "content/renderer/resizing_mode_selector.h" |
| 55 #include "ipc/ipc_sync_message.h" | 55 #include "ipc/ipc_sync_message.h" |
| 56 #include "skia/ext/platform_canvas.h" | 56 #include "skia/ext/platform_canvas.h" |
| 57 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 57 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| 58 #include "third_party/WebKit/public/platform/WebPoint.h" | 58 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 59 #include "third_party/WebKit/public/platform/WebRect.h" | 59 #include "third_party/WebKit/public/platform/WebRect.h" |
| 60 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | |
| 61 #include "third_party/WebKit/public/platform/WebSize.h" | 60 #include "third_party/WebKit/public/platform/WebSize.h" |
| 62 #include "third_party/WebKit/public/platform/WebString.h" | 61 #include "third_party/WebKit/public/platform/WebString.h" |
| 63 #include "third_party/WebKit/public/platform/scheduler/renderer/render_widget_sc
heduling_state.h" | 62 #include "third_party/WebKit/public/platform/scheduler/renderer/render_widget_sc
heduling_state.h" |
| 64 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" | 63 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul
er.h" |
| 65 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 64 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
| 66 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 65 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| 67 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 66 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 68 #include "third_party/WebKit/public/web/WebNode.h" | 67 #include "third_party/WebKit/public/web/WebNode.h" |
| 69 #include "third_party/WebKit/public/web/WebPagePopup.h" | 68 #include "third_party/WebKit/public/web/WebPagePopup.h" |
| 70 #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" | 69 #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 using blink::WebKeyboardEvent; | 104 using blink::WebKeyboardEvent; |
| 106 using blink::WebMouseEvent; | 105 using blink::WebMouseEvent; |
| 107 using blink::WebMouseWheelEvent; | 106 using blink::WebMouseWheelEvent; |
| 108 using blink::WebNavigationPolicy; | 107 using blink::WebNavigationPolicy; |
| 109 using blink::WebNode; | 108 using blink::WebNode; |
| 110 using blink::WebPagePopup; | 109 using blink::WebPagePopup; |
| 111 using blink::WebPoint; | 110 using blink::WebPoint; |
| 112 using blink::WebPopupType; | 111 using blink::WebPopupType; |
| 113 using blink::WebRange; | 112 using blink::WebRange; |
| 114 using blink::WebRect; | 113 using blink::WebRect; |
| 115 using blink::WebScreenInfo; | |
| 116 using blink::WebSize; | 114 using blink::WebSize; |
| 117 using blink::WebTextDirection; | 115 using blink::WebTextDirection; |
| 118 using blink::WebTouchEvent; | 116 using blink::WebTouchEvent; |
| 119 using blink::WebTouchPoint; | 117 using blink::WebTouchPoint; |
| 120 using blink::WebVector; | 118 using blink::WebVector; |
| 121 using blink::WebWidget; | 119 using blink::WebWidget; |
| 122 | 120 |
| 123 #define STATIC_ASSERT_ENUM(a, b) \ | 121 #define STATIC_ASSERT_ENUM(a, b) \ |
| 124 static_assert(static_cast<int>(a) == static_cast<int>(b), \ | 122 static_assert(static_cast<int>(a) == static_cast<int>(b), \ |
| 125 "mismatching enums: " #a) | 123 "mismatching enums: " #a) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 g_render_widget_initialized = nullptr; | 209 g_render_widget_initialized = nullptr; |
| 212 | 210 |
| 213 } // namespace | 211 } // namespace |
| 214 | 212 |
| 215 namespace content { | 213 namespace content { |
| 216 | 214 |
| 217 // RenderWidget --------------------------------------------------------------- | 215 // RenderWidget --------------------------------------------------------------- |
| 218 | 216 |
| 219 RenderWidget::RenderWidget(CompositorDependencies* compositor_deps, | 217 RenderWidget::RenderWidget(CompositorDependencies* compositor_deps, |
| 220 blink::WebPopupType popup_type, | 218 blink::WebPopupType popup_type, |
| 221 const blink::WebScreenInfo& screen_info, | 219 const ScreenInfo& screen_info, |
| 222 bool swapped_out, | 220 bool swapped_out, |
| 223 bool hidden, | 221 bool hidden, |
| 224 bool never_visible) | 222 bool never_visible) |
| 225 : routing_id_(MSG_ROUTING_NONE), | 223 : routing_id_(MSG_ROUTING_NONE), |
| 226 compositor_deps_(compositor_deps), | 224 compositor_deps_(compositor_deps), |
| 227 webwidget_(nullptr), | 225 webwidget_(nullptr), |
| 228 owner_delegate_(nullptr), | 226 owner_delegate_(nullptr), |
| 229 opener_id_(MSG_ROUTING_NONE), | 227 opener_id_(MSG_ROUTING_NONE), |
| 230 next_paint_flags_(0), | 228 next_paint_flags_(0), |
| 231 auto_resize_mode_(false), | 229 auto_resize_mode_(false), |
| 232 need_update_rect_for_auto_resize_(false), | 230 need_update_rect_for_auto_resize_(false), |
| 233 did_show_(false), | 231 did_show_(false), |
| 234 is_hidden_(hidden), | 232 is_hidden_(hidden), |
| 235 compositor_never_visible_(never_visible), | 233 compositor_never_visible_(never_visible), |
| 236 is_fullscreen_granted_(false), | 234 is_fullscreen_granted_(false), |
| 237 display_mode_(blink::WebDisplayModeUndefined), | 235 display_mode_(blink::WebDisplayModeUndefined), |
| 238 ime_event_guard_(nullptr), | 236 ime_event_guard_(nullptr), |
| 239 closing_(false), | 237 closing_(false), |
| 240 host_closing_(false), | 238 host_closing_(false), |
| 241 is_swapped_out_(swapped_out), | 239 is_swapped_out_(swapped_out), |
| 242 for_oopif_(false), | 240 for_oopif_(false), |
| 243 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), | 241 text_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), |
| 244 text_input_flags_(0), | 242 text_input_flags_(0), |
| 245 can_compose_inline_(true), | 243 can_compose_inline_(true), |
| 246 composition_range_(gfx::Range::InvalidRange()), | 244 composition_range_(gfx::Range::InvalidRange()), |
| 247 popup_type_(popup_type), | 245 popup_type_(popup_type), |
| 248 pending_window_rect_count_(0), | 246 pending_window_rect_count_(0), |
| 249 screen_info_(screen_info), | 247 screen_info_(screen_info), |
| 250 device_scale_factor_(screen_info_.deviceScaleFactor), | 248 device_scale_factor_(screen_info_.device_scale_factor), |
| 251 #if defined(OS_ANDROID) | 249 #if defined(OS_ANDROID) |
| 252 text_field_is_dirty_(false), | 250 text_field_is_dirty_(false), |
| 253 #endif | 251 #endif |
| 254 monitor_composition_info_(false), | 252 monitor_composition_info_(false), |
| 255 popup_origin_scale_for_emulation_(0.f), | 253 popup_origin_scale_for_emulation_(0.f), |
| 256 frame_swap_message_queue_(new FrameSwapMessageQueue()), | 254 frame_swap_message_queue_(new FrameSwapMessageQueue()), |
| 257 resizing_mode_selector_(new ResizingModeSelector()), | 255 resizing_mode_selector_(new ResizingModeSelector()), |
| 258 has_host_context_menu_location_(false), | 256 has_host_context_menu_location_(false), |
| 259 has_focus_(false), | 257 has_focus_(false), |
| 260 focused_pepper_plugin_(nullptr) { | 258 focused_pepper_plugin_(nullptr) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 289 RenderWidgetInitializedCallback render_widget_initialized) { | 287 RenderWidgetInitializedCallback render_widget_initialized) { |
| 290 CHECK(!g_create_render_widget && !g_render_widget_initialized); | 288 CHECK(!g_create_render_widget && !g_render_widget_initialized); |
| 291 g_create_render_widget = create_render_widget; | 289 g_create_render_widget = create_render_widget; |
| 292 g_render_widget_initialized = render_widget_initialized; | 290 g_render_widget_initialized = render_widget_initialized; |
| 293 } | 291 } |
| 294 | 292 |
| 295 // static | 293 // static |
| 296 RenderWidget* RenderWidget::Create(int32_t opener_id, | 294 RenderWidget* RenderWidget::Create(int32_t opener_id, |
| 297 CompositorDependencies* compositor_deps, | 295 CompositorDependencies* compositor_deps, |
| 298 blink::WebPopupType popup_type, | 296 blink::WebPopupType popup_type, |
| 299 const blink::WebScreenInfo& screen_info) { | 297 const ScreenInfo& screen_info) { |
| 300 DCHECK(opener_id != MSG_ROUTING_NONE); | 298 DCHECK(opener_id != MSG_ROUTING_NONE); |
| 301 scoped_refptr<RenderWidget> widget(new RenderWidget( | 299 scoped_refptr<RenderWidget> widget(new RenderWidget( |
| 302 compositor_deps, popup_type, screen_info, false, false, false)); | 300 compositor_deps, popup_type, screen_info, false, false, false)); |
| 303 if (widget->Init(opener_id)) { // adds reference on success. | 301 if (widget->Init(opener_id)) { // adds reference on success. |
| 304 return widget.get(); | 302 return widget.get(); |
| 305 } | 303 } |
| 306 return NULL; | 304 return NULL; |
| 307 } | 305 } |
| 308 | 306 |
| 309 // static | 307 // static |
| 310 RenderWidget* RenderWidget::CreateForFrame( | 308 RenderWidget* RenderWidget::CreateForFrame( |
| 311 int routing_id, | 309 int routing_id, |
| 312 bool hidden, | 310 bool hidden, |
| 313 const blink::WebScreenInfo& screen_info, | 311 const ScreenInfo& screen_info, |
| 314 CompositorDependencies* compositor_deps, | 312 CompositorDependencies* compositor_deps, |
| 315 blink::WebLocalFrame* frame) { | 313 blink::WebLocalFrame* frame) { |
| 316 CHECK_NE(routing_id, MSG_ROUTING_NONE); | 314 CHECK_NE(routing_id, MSG_ROUTING_NONE); |
| 317 // TODO(avi): Before RenderViewImpl has-a RenderWidget, the browser passes the | 315 // TODO(avi): Before RenderViewImpl has-a RenderWidget, the browser passes the |
| 318 // same routing ID for both the view routing ID and the main frame widget | 316 // same routing ID for both the view routing ID and the main frame widget |
| 319 // routing ID. https://crbug.com/545684 | 317 // routing ID. https://crbug.com/545684 |
| 320 RenderViewImpl* view = RenderViewImpl::FromRoutingID(routing_id); | 318 RenderViewImpl* view = RenderViewImpl::FromRoutingID(routing_id); |
| 321 if (view) { | 319 if (view) { |
| 322 view->AttachWebFrameWidget( | 320 view->AttachWebFrameWidget( |
| 323 RenderWidget::CreateWebFrameWidget(view->GetWidget(), frame)); | 321 RenderWidget::CreateWebFrameWidget(view->GetWidget(), frame)); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 443 } |
| 446 | 444 |
| 447 void RenderWidget::SetPopupOriginAdjustmentsForEmulation( | 445 void RenderWidget::SetPopupOriginAdjustmentsForEmulation( |
| 448 RenderWidgetScreenMetricsEmulator* emulator) { | 446 RenderWidgetScreenMetricsEmulator* emulator) { |
| 449 popup_origin_scale_for_emulation_ = emulator->scale(); | 447 popup_origin_scale_for_emulation_ = emulator->scale(); |
| 450 popup_view_origin_for_emulation_ = emulator->applied_widget_rect().origin(); | 448 popup_view_origin_for_emulation_ = emulator->applied_widget_rect().origin(); |
| 451 popup_screen_origin_for_emulation_ = gfx::Point( | 449 popup_screen_origin_for_emulation_ = gfx::Point( |
| 452 emulator->original_screen_rect().origin().x() + emulator->offset().x(), | 450 emulator->original_screen_rect().origin().x() + emulator->offset().x(), |
| 453 emulator->original_screen_rect().origin().y() + emulator->offset().y()); | 451 emulator->original_screen_rect().origin().y() + emulator->offset().y()); |
| 454 screen_info_ = emulator->original_screen_info(); | 452 screen_info_ = emulator->original_screen_info(); |
| 455 device_scale_factor_ = screen_info_.deviceScaleFactor; | 453 device_scale_factor_ = screen_info_.device_scale_factor; |
| 456 } | 454 } |
| 457 | 455 |
| 458 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) { | 456 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) { |
| 459 if (screen_metrics_emulator_) | 457 if (screen_metrics_emulator_) |
| 460 return screen_metrics_emulator_->AdjustValidationMessageAnchor(anchor); | 458 return screen_metrics_emulator_->AdjustValidationMessageAnchor(anchor); |
| 461 return anchor; | 459 return anchor; |
| 462 } | 460 } |
| 463 | 461 |
| 464 #if defined(USE_EXTERNAL_POPUP_MENU) | 462 #if defined(USE_EXTERNAL_POPUP_MENU) |
| 465 void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation( | 463 void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation( |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 | 1012 |
| 1015 gfx::Size RenderWidget::GetSizeForWebWidget() const { | 1013 gfx::Size RenderWidget::GetSizeForWebWidget() const { |
| 1016 if (IsUseZoomForDSFEnabled()) | 1014 if (IsUseZoomForDSFEnabled()) |
| 1017 return gfx::ScaleToCeiledSize(size_, GetOriginalDeviceScaleFactor()); | 1015 return gfx::ScaleToCeiledSize(size_, GetOriginalDeviceScaleFactor()); |
| 1018 | 1016 |
| 1019 return size_; | 1017 return size_; |
| 1020 } | 1018 } |
| 1021 | 1019 |
| 1022 void RenderWidget::Resize(const ResizeParams& params) { | 1020 void RenderWidget::Resize(const ResizeParams& params) { |
| 1023 bool orientation_changed = | 1021 bool orientation_changed = |
| 1024 screen_info_.orientationAngle != params.screen_info.orientationAngle || | 1022 screen_info_.orientation_angle != params.screen_info.orientation_angle || |
| 1025 screen_info_.orientationType != params.screen_info.orientationType; | 1023 screen_info_.orientation_type != params.screen_info.orientation_type; |
| 1026 | 1024 |
| 1027 screen_info_ = params.screen_info; | 1025 screen_info_ = params.screen_info; |
| 1028 | 1026 |
| 1029 if (device_scale_factor_ != screen_info_.deviceScaleFactor) { | 1027 if (device_scale_factor_ != screen_info_.device_scale_factor) { |
| 1030 device_scale_factor_ = screen_info_.deviceScaleFactor; | 1028 device_scale_factor_ = screen_info_.device_scale_factor; |
| 1031 OnDeviceScaleFactorChanged(); | 1029 OnDeviceScaleFactorChanged(); |
| 1032 ScheduleComposite(); | 1030 ScheduleComposite(); |
| 1033 } | 1031 } |
| 1034 | 1032 |
| 1035 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { | 1033 if (resizing_mode_selector_->NeverUsesSynchronousResize()) { |
| 1036 // A resize ack shouldn't be requested if we have not ACK'd the previous | 1034 // A resize ack shouldn't be requested if we have not ACK'd the previous |
| 1037 // one. | 1035 // one. |
| 1038 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); | 1036 DCHECK(!params.needs_resize_ack || !next_paint_is_resize_ack()); |
| 1039 } | 1037 } |
| 1040 | 1038 |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 } | 1902 } |
| 1905 | 1903 |
| 1906 bool RenderWidget::CanComposeInline() { | 1904 bool RenderWidget::CanComposeInline() { |
| 1907 #if defined(ENABLE_PLUGINS) | 1905 #if defined(ENABLE_PLUGINS) |
| 1908 if (focused_pepper_plugin_) | 1906 if (focused_pepper_plugin_) |
| 1909 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents(); | 1907 return focused_pepper_plugin_->IsPluginAcceptingCompositionEvents(); |
| 1910 #endif | 1908 #endif |
| 1911 return true; | 1909 return true; |
| 1912 } | 1910 } |
| 1913 | 1911 |
| 1914 WebScreenInfo RenderWidget::screenInfo() { | 1912 blink::WebScreenInfo RenderWidget::screenInfo() { |
| 1915 return screen_info_; | 1913 blink::WebScreenInfo web_screen_info; |
| 1914 web_screen_info.deviceScaleFactor = screen_info_.device_scale_factor; |
| 1915 web_screen_info.depth = screen_info_.depth; |
| 1916 web_screen_info.depthPerComponent = screen_info_.depth_per_component; |
| 1917 web_screen_info.isMonochrome = screen_info_.is_monochrome; |
| 1918 web_screen_info.rect = blink::WebRect(screen_info_.rect); |
| 1919 web_screen_info.availableRect = blink::WebRect(screen_info_.available_rect); |
| 1920 switch (screen_info_.orientation_type) { |
| 1921 case SCREEN_ORIENTATION_VALUES_PORTRAIT_PRIMARY: |
| 1922 web_screen_info.orientationType = |
| 1923 blink::WebScreenOrientationPortraitPrimary; |
| 1924 break; |
| 1925 case SCREEN_ORIENTATION_VALUES_PORTRAIT_SECONDARY: |
| 1926 web_screen_info.orientationType = |
| 1927 blink::WebScreenOrientationPortraitSecondary; |
| 1928 break; |
| 1929 case SCREEN_ORIENTATION_VALUES_LANDSCAPE_PRIMARY: |
| 1930 web_screen_info.orientationType = |
| 1931 blink::WebScreenOrientationLandscapePrimary; |
| 1932 break; |
| 1933 case SCREEN_ORIENTATION_VALUES_LANDSCAPE_SECONDARY: |
| 1934 web_screen_info.orientationType = |
| 1935 blink::WebScreenOrientationLandscapeSecondary; |
| 1936 break; |
| 1937 default: |
| 1938 web_screen_info.orientationType = |
| 1939 blink::WebScreenOrientationUndefined; |
| 1940 break; |
| 1941 } |
| 1942 web_screen_info.orientationAngle = screen_info_.orientation_angle; |
| 1943 return web_screen_info; |
| 1916 } | 1944 } |
| 1917 | 1945 |
| 1918 void RenderWidget::resetInputMethod() { | 1946 void RenderWidget::resetInputMethod() { |
| 1919 ImeEventGuard guard(this); | 1947 ImeEventGuard guard(this); |
| 1920 // If the last text input type is not None, then we should finish any | 1948 // If the last text input type is not None, then we should finish any |
| 1921 // ongoing composition regardless of the new text input type. | 1949 // ongoing composition regardless of the new text input type. |
| 1922 if (text_input_info_.type != blink::WebTextInputTypeNone) { | 1950 if (text_input_info_.type != blink::WebTextInputTypeNone) { |
| 1923 // If a composition text exists, then we need to let the browser process | 1951 // If a composition text exists, then we need to let the browser process |
| 1924 // to cancel the input method's ongoing composition session. | 1952 // to cancel the input method's ongoing composition session. |
| 1925 if (webwidget_->confirmComposition()) | 1953 if (webwidget_->confirmComposition()) |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 #endif // defined(VIDEO_HOLE) | 2097 #endif // defined(VIDEO_HOLE) |
| 2070 | 2098 |
| 2071 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { | 2099 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { |
| 2072 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), | 2100 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), |
| 2073 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | 2101 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
| 2074 } | 2102 } |
| 2075 | 2103 |
| 2076 float RenderWidget::GetOriginalDeviceScaleFactor() const { | 2104 float RenderWidget::GetOriginalDeviceScaleFactor() const { |
| 2077 return | 2105 return |
| 2078 screen_metrics_emulator_ ? | 2106 screen_metrics_emulator_ ? |
| 2079 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : | 2107 screen_metrics_emulator_->original_screen_info().device_scale_factor : |
| 2080 device_scale_factor_; | 2108 device_scale_factor_; |
| 2081 } | 2109 } |
| 2082 | 2110 |
| 2083 bool RenderWidget::requestPointerLock() { | 2111 bool RenderWidget::requestPointerLock() { |
| 2084 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); | 2112 return mouse_lock_dispatcher_->LockMouse(webwidget_mouse_lock_target_.get()); |
| 2085 } | 2113 } |
| 2086 | 2114 |
| 2087 void RenderWidget::requestPointerUnlock() { | 2115 void RenderWidget::requestPointerUnlock() { |
| 2088 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2116 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
| 2089 } | 2117 } |
| 2090 | 2118 |
| 2091 bool RenderWidget::isPointerLocked() { | 2119 bool RenderWidget::isPointerLocked() { |
| 2092 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2120 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2093 webwidget_mouse_lock_target_.get()); | 2121 webwidget_mouse_lock_target_.get()); |
| 2094 } | 2122 } |
| 2095 | 2123 |
| 2096 } // namespace content | 2124 } // namespace content |
| OLD | NEW |