Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: content/browser/renderer_host/input/buffered_input_router.h

Issue 23801003: input: Make the OverscrollController less intrusive, and some code cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/input/buffered_input_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 IPC::Sender* sender_; 116 IPC::Sender* sender_;
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()|.
128 int queued_gesture_count_;
129
130 // Necessary for |ShouldForwardTouchEvent()|. 126 // Necessary for |ShouldForwardTouchEvent()|.
131 bool has_touch_handler_; 127 bool has_touch_handler_;
132 int queued_touch_count_; 128 int queued_touch_count_;
133 129
134 // This is non-NULL ONLY in the scope of OnInputEventAck(event, injector). 130 // This is non-NULL ONLY in the scope of OnInputEventAck(event, injector).
135 ScopedVector<BrowserInputEvent>* input_queue_override_; 131 ScopedVector<BrowserInputEvent>* input_queue_override_;
136 132
137 // Used to assign unique ID's to each InputEvent that is generated. 133 // Used to assign unique ID's to each InputEvent that is generated.
138 int64 next_input_id_; 134 int64 next_input_id_;
139 135
140 // 0 if there no in-flight EventPacket. 136 // 0 if there no in-flight EventPacket.
141 int64 in_flight_packet_id_; 137 int64 in_flight_packet_id_;
142 138
143 DISALLOW_COPY_AND_ASSIGN(BufferedInputRouter); 139 DISALLOW_COPY_AND_ASSIGN(BufferedInputRouter);
144 }; 140 };
145 141
146 } // namespace content 142 } // namespace content
147 143
148 #endif // CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_ 144 #endif // CONTENT_BROWSER_INPUT_RENDERER_HOST_BUFFERED_INPUT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/buffered_input_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698