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 <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 class WebLayer; | 53 class WebLayer; |
54 } | 54 } |
55 #endif | 55 #endif |
56 | 56 |
57 namespace content { | 57 namespace content { |
58 class BackingStore; | 58 class BackingStore; |
59 class GestureEventFilter; | 59 class GestureEventFilter; |
60 class RenderWidgetHostDelegate; | 60 class RenderWidgetHostDelegate; |
61 class RenderWidgetHostViewPort; | 61 class RenderWidgetHostViewPort; |
62 class SmoothScrollGesture; | 62 class SmoothScrollGesture; |
| 63 class TouchEventQueue; |
63 | 64 |
64 // This implements the RenderWidgetHost interface that is exposed to | 65 // This implements the RenderWidgetHost interface that is exposed to |
65 // embedders of content, and adds things only visible to content. | 66 // embedders of content, and adds things only visible to content. |
66 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, | 67 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, |
67 public IPC::Listener { | 68 public IPC::Listener { |
68 public: | 69 public: |
69 // routing_id can be MSG_ROUTING_NONE, in which case the next available | 70 // routing_id can be MSG_ROUTING_NONE, in which case the next available |
70 // routing id is taken from the RenderProcessHost. | 71 // routing id is taken from the RenderProcessHost. |
71 // If this object outlives |delegate|, DetachDelegate() must be called when | 72 // If this object outlives |delegate|, DetachDelegate() must be called when |
72 // |delegate| goes away. | 73 // |delegate| goes away. |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // Stops all existing hang monitor timeouts and assumes the renderer is | 233 // Stops all existing hang monitor timeouts and assumes the renderer is |
233 // responsive. | 234 // responsive. |
234 void StopHangMonitorTimeout(); | 235 void StopHangMonitorTimeout(); |
235 | 236 |
236 // Forwards the given message to the renderer. These are called by the view | 237 // Forwards the given message to the renderer. These are called by the view |
237 // when it has received a message. | 238 // when it has received a message. |
238 void ForwardGestureEvent(const WebKit::WebGestureEvent& gesture_event); | 239 void ForwardGestureEvent(const WebKit::WebGestureEvent& gesture_event); |
239 virtual void ForwardTouchEvent(const WebKit::WebTouchEvent& touch_event); | 240 virtual void ForwardTouchEvent(const WebKit::WebTouchEvent& touch_event); |
240 | 241 |
241 // Forwards the given event immediately to the renderer. | 242 // Forwards the given event immediately to the renderer. |
| 243 void ForwardTouchEventImmediately(const WebKit::WebTouchEvent& touch_event); |
242 void ForwardGestureEventImmediately( | 244 void ForwardGestureEventImmediately( |
243 const WebKit::WebGestureEvent& gesture_event); | 245 const WebKit::WebGestureEvent& gesture_event); |
244 | 246 |
245 #if defined(TOOLKIT_GTK) | 247 #if defined(TOOLKIT_GTK) |
246 // Give key press listeners a chance to handle this key press. This allow | 248 // Give key press listeners a chance to handle this key press. This allow |
247 // widgets that don't have focus to still handle key presses. | 249 // widgets that don't have focus to still handle key presses. |
248 bool KeyPressListenersHandleEvent(GdkEventKey* event); | 250 bool KeyPressListenersHandleEvent(GdkEventKey* event); |
249 #endif // defined(TOOLKIT_GTK) | 251 #endif // defined(TOOLKIT_GTK) |
250 | 252 |
251 #if defined(TOOLKIT_VIEWS) | 253 #if defined(TOOLKIT_VIEWS) |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 bool has_touch_handler_; | 824 bool has_touch_handler_; |
823 | 825 |
824 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 826 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
825 | 827 |
826 typedef std::map<int, scoped_refptr<SmoothScrollGesture> > | 828 typedef std::map<int, scoped_refptr<SmoothScrollGesture> > |
827 SmoothScrollGestureMap; | 829 SmoothScrollGestureMap; |
828 SmoothScrollGestureMap active_smooth_scroll_gestures_; | 830 SmoothScrollGestureMap active_smooth_scroll_gestures_; |
829 base::TimeTicks last_smooth_scroll_gestures_tick_time_; | 831 base::TimeTicks last_smooth_scroll_gestures_tick_time_; |
830 bool tick_active_smooth_scroll_gestures_task_posted_; | 832 bool tick_active_smooth_scroll_gestures_task_posted_; |
831 | 833 |
| 834 scoped_ptr<TouchEventQueue> touch_event_queue_; |
832 scoped_ptr<GestureEventFilter> gesture_event_filter_; | 835 scoped_ptr<GestureEventFilter> gesture_event_filter_; |
833 | 836 |
834 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 837 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
835 }; | 838 }; |
836 | 839 |
837 } // namespace content | 840 } // namespace content |
838 | 841 |
839 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 842 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |