| 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 #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 <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 void ForwardMouseEventWithLatencyInfo( | 271 void ForwardMouseEventWithLatencyInfo( |
| 272 const blink::WebMouseEvent& mouse_event, | 272 const blink::WebMouseEvent& mouse_event, |
| 273 const ui::LatencyInfo& ui_latency); | 273 const ui::LatencyInfo& ui_latency); |
| 274 void ForwardWheelEventWithLatencyInfo( | 274 void ForwardWheelEventWithLatencyInfo( |
| 275 const blink::WebMouseWheelEvent& wheel_event, | 275 const blink::WebMouseWheelEvent& wheel_event, |
| 276 const ui::LatencyInfo& ui_latency); | 276 const ui::LatencyInfo& ui_latency); |
| 277 | 277 |
| 278 // Enables/disables touch emulation using mouse event. See TouchEmulator. | 278 // Enables/disables touch emulation using mouse event. See TouchEmulator. |
| 279 void SetTouchEventEmulationEnabled(bool enabled, bool allow_pinch); | 279 void SetTouchEventEmulationEnabled(bool enabled, bool allow_pinch); |
| 280 | 280 |
| 281 typedef base::Callback<void(const blink::WebMouseEvent& mouse_event)> |
| 282 InterceptingMouseCallback; |
| 283 |
| 284 // Installs intercepting mouse callback that gets and consumes all |
| 285 // mouse events. |
| 286 void SetInterceptingMouseCallback(const InterceptingMouseCallback& callback); |
| 287 |
| 281 // TouchEmulatorClient implementation. | 288 // TouchEmulatorClient implementation. |
| 282 virtual void ForwardGestureEvent( | 289 virtual void ForwardGestureEvent( |
| 283 const blink::WebGestureEvent& gesture_event) OVERRIDE; | 290 const blink::WebGestureEvent& gesture_event) OVERRIDE; |
| 284 virtual void ForwardEmulatedTouchEvent( | 291 virtual void ForwardEmulatedTouchEvent( |
| 285 const blink::WebTouchEvent& touch_event) OVERRIDE; | 292 const blink::WebTouchEvent& touch_event) OVERRIDE; |
| 286 virtual void SetCursor(const WebCursor& cursor) OVERRIDE; | 293 virtual void SetCursor(const WebCursor& cursor) OVERRIDE; |
| 287 virtual void ShowContextMenuAtPoint(const gfx::Point& point) OVERRIDE; | 294 virtual void ShowContextMenuAtPoint(const gfx::Point& point) OVERRIDE; |
| 288 | 295 |
| 289 // Queues a synthetic gesture for testing purposes. Invokes the on_complete | 296 // Queues a synthetic gesture for testing purposes. Invokes the on_complete |
| 290 // callback when the gesture is finished running. | 297 // callback when the gesture is finished running. |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // then touch events are sent to the renderer. Otherwise, the touch events are | 830 // then touch events are sent to the renderer. Otherwise, the touch events are |
| 824 // not sent to the renderer. | 831 // not sent to the renderer. |
| 825 bool has_touch_handler_; | 832 bool has_touch_handler_; |
| 826 | 833 |
| 827 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 834 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 828 | 835 |
| 829 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; | 836 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; |
| 830 | 837 |
| 831 scoped_ptr<TouchEmulator> touch_emulator_; | 838 scoped_ptr<TouchEmulator> touch_emulator_; |
| 832 | 839 |
| 840 InterceptingMouseCallback intercepting_mouse_callback_; |
| 841 |
| 833 // Receives and handles all input events. | 842 // Receives and handles all input events. |
| 834 scoped_ptr<InputRouter> input_router_; | 843 scoped_ptr<InputRouter> input_router_; |
| 835 | 844 |
| 836 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; | 845 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; |
| 837 | 846 |
| 838 #if defined(OS_WIN) | 847 #if defined(OS_WIN) |
| 839 std::list<HWND> dummy_windows_for_activation_; | 848 std::list<HWND> dummy_windows_for_activation_; |
| 840 #endif | 849 #endif |
| 841 | 850 |
| 842 int64 last_input_number_; | 851 int64 last_input_number_; |
| 843 | 852 |
| 844 int next_browser_snapshot_id_; | 853 int next_browser_snapshot_id_; |
| 845 typedef std::map<int, | 854 typedef std::map<int, |
| 846 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 855 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
| 847 PendingSnapshotMap pending_browser_snapshots_; | 856 PendingSnapshotMap pending_browser_snapshots_; |
| 848 | 857 |
| 849 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 858 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 850 }; | 859 }; |
| 851 | 860 |
| 852 } // namespace content | 861 } // namespace content |
| 853 | 862 |
| 854 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 863 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |