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

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

Issue 2435863004: Remove stl_util's deletion function use from content/. (Closed)
Patch Set: minus service worker Created 4 years, 2 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
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_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <deque> 11 #include <deque>
12 #include <list> 12 #include <list>
13 #include <memory>
13 14
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "content/browser/renderer_host/event_with_latency_info.h" 17 #include "content/browser/renderer_host/event_with_latency_info.h"
17 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
18 #include "content/common/input/input_event_ack_state.h" 19 #include "content/common/input/input_event_ack_state.h"
19 #include "third_party/WebKit/public/web/WebInputEvent.h" 20 #include "third_party/WebKit/public/web/WebInputEvent.h"
20 #include "ui/gfx/geometry/point_f.h" 21 #include "ui/gfx/geometry/point_f.h"
21 22
22 namespace content { 23 namespace content {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // has no touch handler. 177 // has no touch handler.
177 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event); 178 PreFilterResult FilterBeforeForwarding(const blink::WebTouchEvent& event);
178 void ForwardToRenderer(const TouchEventWithLatencyInfo& event); 179 void ForwardToRenderer(const TouchEventWithLatencyInfo& event);
179 void UpdateTouchConsumerStates(const blink::WebTouchEvent& event, 180 void UpdateTouchConsumerStates(const blink::WebTouchEvent& event,
180 InputEventAckState ack_result); 181 InputEventAckState ack_result);
181 void FlushPendingAsyncTouchmove(); 182 void FlushPendingAsyncTouchmove();
182 183
183 // Handles touch event forwarding and ack'ed event dispatch. 184 // Handles touch event forwarding and ack'ed event dispatch.
184 TouchEventQueueClient* client_; 185 TouchEventQueueClient* client_;
185 186
186 typedef std::list<CoalescedWebTouchEvent*> TouchQueue; 187 std::list<std::unique_ptr<CoalescedWebTouchEvent>> touch_queue_;
187 TouchQueue touch_queue_;
188 188
189 // Position of the first touch in the most recent sequence forwarded to the 189 // Position of the first touch in the most recent sequence forwarded to the
190 // client. 190 // client.
191 gfx::PointF touch_sequence_start_position_; 191 gfx::PointF touch_sequence_start_position_;
192 192
193 // Used to defer touch forwarding when ack dispatch triggers |QueueEvent()|. 193 // Used to defer touch forwarding when ack dispatch triggers |QueueEvent()|.
194 // True within the scope of |AckTouchEventToClient()|. 194 // True within the scope of |AckTouchEventToClient()|.
195 bool dispatching_touch_ack_; 195 bool dispatching_touch_ack_;
196 196
197 // Used to prevent touch timeout scheduling and increase the count for async 197 // Used to prevent touch timeout scheduling and increase the count for async
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 // Event is saved to compare pointer positions for new touchmove events. 242 // Event is saved to compare pointer positions for new touchmove events.
243 std::unique_ptr<blink::WebTouchEvent> last_sent_touchevent_; 243 std::unique_ptr<blink::WebTouchEvent> last_sent_touchevent_;
244 244
245 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); 245 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
246 }; 246 };
247 247
248 } // namespace content 248 } // namespace content
249 249
250 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 250 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698