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/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 22 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
23 #include "content/browser/gpu/gpu_surface_tracker.h" | 23 #include "content/browser/gpu/gpu_surface_tracker.h" |
24 #include "content/browser/renderer_host/backing_store.h" | 24 #include "content/browser/renderer_host/backing_store.h" |
25 #include "content/browser/renderer_host/backing_store_manager.h" | 25 #include "content/browser/renderer_host/backing_store_manager.h" |
26 #include "content/browser/renderer_host/gesture_event_filter.h" | 26 #include "content/browser/renderer_host/gesture_event_filter.h" |
27 #include "content/browser/renderer_host/overscroll_controller.h" | 27 #include "content/browser/renderer_host/overscroll_controller.h" |
28 #include "content/browser/renderer_host/render_process_host_impl.h" | 28 #include "content/browser/renderer_host/render_process_host_impl.h" |
29 #include "content/browser/renderer_host/render_view_host_impl.h" | 29 #include "content/browser/renderer_host/render_view_host_impl.h" |
30 #include "content/browser/renderer_host/render_widget_helper.h" | 30 #include "content/browser/renderer_host/render_widget_helper.h" |
31 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 31 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
32 #include "content/browser/renderer_host/tap_suppression_controller.h" | |
33 #include "content/browser/renderer_host/touch_event_queue.h" | 32 #include "content/browser/renderer_host/touch_event_queue.h" |
| 33 #include "content/browser/renderer_host/touchpad_tap_suppression_controller.h" |
34 #include "content/common/accessibility_messages.h" | 34 #include "content/common/accessibility_messages.h" |
35 #include "content/common/content_constants_internal.h" | 35 #include "content/common/content_constants_internal.h" |
36 #include "content/common/gpu/gpu_messages.h" | 36 #include "content/common/gpu/gpu_messages.h" |
37 #include "content/common/view_messages.h" | 37 #include "content/common/view_messages.h" |
38 #include "content/port/browser/render_widget_host_view_port.h" | 38 #include "content/port/browser/render_widget_host_view_port.h" |
39 #include "content/port/browser/smooth_scroll_gesture.h" | 39 #include "content/port/browser/smooth_scroll_gesture.h" |
40 #include "content/public/browser/compositor_util.h" | 40 #include "content/public/browser/compositor_util.h" |
41 #include "content/public/browser/native_web_keyboard_event.h" | 41 #include "content/public/browser/native_web_keyboard_event.h" |
42 #include "content/public/browser/notification_service.h" | 42 #include "content/public/browser/notification_service.h" |
43 #include "content/public/browser/notification_types.h" | 43 #include "content/public/browser/notification_types.h" |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 if (ignore_input_events_ || process_->IgnoreInputEvents()) | 901 if (ignore_input_events_ || process_->IgnoreInputEvents()) |
902 return; | 902 return; |
903 | 903 |
904 if (CommandLine::ForCurrentProcess()->HasSwitch( | 904 if (CommandLine::ForCurrentProcess()->HasSwitch( |
905 switches::kSimulateTouchScreenWithMouse)) { | 905 switches::kSimulateTouchScreenWithMouse)) { |
906 SimulateTouchGestureWithMouse(mouse_event); | 906 SimulateTouchGestureWithMouse(mouse_event); |
907 return; | 907 return; |
908 } | 908 } |
909 | 909 |
910 if (mouse_event.type == WebInputEvent::MouseDown && | 910 if (mouse_event.type == WebInputEvent::MouseDown && |
911 gesture_event_filter_->GetTapSuppressionController()-> | 911 gesture_event_filter_->GetTouchpadTapSuppressionController()-> |
912 ShouldDeferMouseDown(mouse_event)) | 912 ShouldDeferMouseDown(mouse_event)) |
913 return; | 913 return; |
914 if (mouse_event.type == WebInputEvent::MouseUp && | 914 if (mouse_event.type == WebInputEvent::MouseUp && |
915 gesture_event_filter_->GetTapSuppressionController()-> | 915 gesture_event_filter_->GetTouchpadTapSuppressionController()-> |
916 ShouldSuppressMouseUp()) | 916 ShouldSuppressMouseUp()) |
917 return; | 917 return; |
918 | 918 |
919 ForwardMouseEventImmediately(mouse_event); | 919 ForwardMouseEventImmediately(mouse_event); |
920 } | 920 } |
921 | 921 |
922 void RenderWidgetHostImpl::OnPointerEventActivate() { | 922 void RenderWidgetHostImpl::OnPointerEventActivate() { |
923 } | 923 } |
924 | 924 |
925 void RenderWidgetHostImpl::ForwardWheelEvent( | 925 void RenderWidgetHostImpl::ForwardWheelEvent( |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 if (ignore_input_events_ || process_->IgnoreInputEvents()) | 965 if (ignore_input_events_ || process_->IgnoreInputEvents()) |
966 return; | 966 return; |
967 | 967 |
968 if (!IsInOverscrollGesture() && | 968 if (!IsInOverscrollGesture() && |
969 !gesture_event_filter_->ShouldForward(gesture_event)) | 969 !gesture_event_filter_->ShouldForward(gesture_event)) |
970 return; | 970 return; |
971 | 971 |
972 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false); | 972 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false); |
973 } | 973 } |
974 | 974 |
975 // Forwards MouseEvent without passing it through TapSuppressionController | 975 // Forwards MouseEvent without passing it through |
| 976 // TouchpadTapSuppressionController |
976 void RenderWidgetHostImpl::ForwardMouseEventImmediately( | 977 void RenderWidgetHostImpl::ForwardMouseEventImmediately( |
977 const WebMouseEvent& mouse_event) { | 978 const WebMouseEvent& mouse_event) { |
978 TRACE_EVENT2("renderer_host", | 979 TRACE_EVENT2("renderer_host", |
979 "RenderWidgetHostImpl::ForwardMouseEventImmediately", | 980 "RenderWidgetHostImpl::ForwardMouseEventImmediately", |
980 "x", mouse_event.x, "y", mouse_event.y); | 981 "x", mouse_event.x, "y", mouse_event.y); |
981 if (ignore_input_events_ || process_->IgnoreInputEvents()) | 982 if (ignore_input_events_ || process_->IgnoreInputEvents()) |
982 return; | 983 return; |
983 | 984 |
984 if (CommandLine::ForCurrentProcess()->HasSwitch( | 985 if (CommandLine::ForCurrentProcess()->HasSwitch( |
985 switches::kSimulateTouchScreenWithMouse)) { | 986 switches::kSimulateTouchScreenWithMouse)) { |
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2362 return; | 2363 return; |
2363 | 2364 |
2364 OnRenderAutoResized(new_size); | 2365 OnRenderAutoResized(new_size); |
2365 } | 2366 } |
2366 | 2367 |
2367 void RenderWidgetHostImpl::DetachDelegate() { | 2368 void RenderWidgetHostImpl::DetachDelegate() { |
2368 delegate_ = NULL; | 2369 delegate_ = NULL; |
2369 } | 2370 } |
2370 | 2371 |
2371 } // namespace content | 2372 } // namespace content |
OLD | NEW |