OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ | 5 #ifndef CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ |
6 #define CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ | 6 #define CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 virtual void SendMouseEventImmediately( | 60 virtual void SendMouseEventImmediately( |
61 const MouseEventWithLatencyInfo& mouse_event) OVERRIDE; | 61 const MouseEventWithLatencyInfo& mouse_event) OVERRIDE; |
62 virtual void SendTouchEventImmediately( | 62 virtual void SendTouchEventImmediately( |
63 const TouchEventWithLatencyInfo& touch_event) OVERRIDE; | 63 const TouchEventWithLatencyInfo& touch_event) OVERRIDE; |
64 virtual void SendGestureEventImmediately( | 64 virtual void SendGestureEventImmediately( |
65 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; | 65 const GestureEventWithLatencyInfo& gesture_event) OVERRIDE; |
66 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE; | 66 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE; |
67 virtual bool ShouldForwardTouchEvent() const OVERRIDE; | 67 virtual bool ShouldForwardTouchEvent() const OVERRIDE; |
68 virtual bool ShouldForwardGestureEvent( | 68 virtual bool ShouldForwardGestureEvent( |
69 const GestureEventWithLatencyInfo& gesture_event) const OVERRIDE; | 69 const GestureEventWithLatencyInfo& gesture_event) const OVERRIDE; |
70 virtual bool HasQueuedGestureEvents() const OVERRIDE; | |
71 | 70 |
72 // InputQueueClient | 71 // InputQueueClient |
73 virtual void Deliver(const EventPacket& packet) OVERRIDE; | 72 virtual void Deliver(const EventPacket& packet) OVERRIDE; |
74 virtual void DidFinishFlush() OVERRIDE; | 73 virtual void DidFinishFlush() OVERRIDE; |
75 virtual void SetNeedsFlush() OVERRIDE; | 74 virtual void SetNeedsFlush() OVERRIDE; |
76 | 75 |
77 // BrowserInputEventClient | 76 // BrowserInputEventClient |
78 virtual void OnDispatched(const BrowserInputEvent& event, | 77 virtual void OnDispatched(const BrowserInputEvent& event, |
79 InputEventDisposition disposition) OVERRIDE; | 78 InputEventDisposition disposition) OVERRIDE; |
80 // Events delivered to the router within the scope of | 79 // Events delivered to the router within the scope of |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 int routing_id_; | 117 int routing_id_; |
119 | 118 |
120 scoped_ptr<InputQueue> input_queue_; | 119 scoped_ptr<InputQueue> input_queue_; |
121 | 120 |
122 // TODO(jdduke): Remove when we can properly serialize NativeWebKeyboardEvent. | 121 // TODO(jdduke): Remove when we can properly serialize NativeWebKeyboardEvent. |
123 // Alternatively, attach WebInputEvents to InputEvents but don't serialize. | 122 // Alternatively, attach WebInputEvents to InputEvents but don't serialize. |
124 typedef std::map<int64, NativeWebKeyboardEvent> KeyMap; | 123 typedef std::map<int64, NativeWebKeyboardEvent> KeyMap; |
125 KeyMap queued_key_map_; | 124 KeyMap queued_key_map_; |
126 | 125 |
127 // Necessary for |HasQueuedGestureEvents()|. | 126 // Necessary for |HasQueuedGestureEvents()|. |
128 int queued_gesture_count_; | 127 int queued_gesture_count_; |
jdduke (slow)
2013/09/12 16:32:35
Could you nuke this variable and the code where it
sadrul
2013/09/12 17:31:20
Done.
| |
129 | 128 |
130 // Necessary for |ShouldForwardTouchEvent()|. | 129 // Necessary for |ShouldForwardTouchEvent()|. |
131 bool has_touch_handler_; | 130 bool has_touch_handler_; |
132 int queued_touch_count_; | 131 int queued_touch_count_; |
133 | 132 |
134 // This is non-NULL ONLY in the scope of OnInputEventAck(event, injector). | 133 // This is non-NULL ONLY in the scope of OnInputEventAck(event, injector). |
135 ScopedVector<BrowserInputEvent>* input_queue_override_; | 134 ScopedVector<BrowserInputEvent>* input_queue_override_; |
136 | 135 |
137 // Used to assign unique ID's to each InputEvent that is generated. | 136 // Used to assign unique ID's to each InputEvent that is generated. |
138 int64 next_input_id_; | 137 int64 next_input_id_; |
139 | 138 |
140 // 0 if there no in-flight EventPacket. | 139 // 0 if there no in-flight EventPacket. |
141 int64 in_flight_packet_id_; | 140 int64 in_flight_packet_id_; |
142 | 141 |
143 DISALLOW_COPY_AND_ASSIGN(BufferedInputRouter); | 142 DISALLOW_COPY_AND_ASSIGN(BufferedInputRouter); |
144 }; | 143 }; |
145 | 144 |
146 } // namespace content | 145 } // namespace content |
147 | 146 |
148 #endif // CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ | 147 #endif // CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ |
OLD | NEW |