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

Side by Side Diff: content/browser/renderer_host/input/mouse_wheel_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MOUSE_WHEEL_EVENT_QUEUE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOUSE_WHEEL_EVENT_QUEUE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOUSE_WHEEL_EVENT_QUEUE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOUSE_WHEEL_EVENT_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory>
9 10
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
12 #include "content/browser/renderer_host/event_with_latency_info.h" 13 #include "content/browser/renderer_host/event_with_latency_info.h"
13 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
14 #include "content/common/input/input_event_ack_state.h" 15 #include "content/common/input/input_event_ack_state.h"
15 #include "third_party/WebKit/public/web/WebInputEvent.h" 16 #include "third_party/WebKit/public/web/WebInputEvent.h"
16 17
17 namespace content { 18 namespace content {
18 19
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 80
80 private: 81 private:
81 void TryForwardNextEventToRenderer(); 82 void TryForwardNextEventToRenderer();
82 void SendScrollEnd(blink::WebGestureEvent update_event, bool synthetic); 83 void SendScrollEnd(blink::WebGestureEvent update_event, bool synthetic);
83 void SendScrollBegin(const blink::WebGestureEvent& gesture_update, 84 void SendScrollBegin(const blink::WebGestureEvent& gesture_update,
84 bool synthetic); 85 bool synthetic);
85 86
86 MouseWheelEventQueueClient* client_; 87 MouseWheelEventQueueClient* client_;
87 base::OneShotTimer scroll_end_timer_; 88 base::OneShotTimer scroll_end_timer_;
88 89
89 typedef std::deque<QueuedWebMouseWheelEvent*> WheelEventQueue; 90 std::deque<std::unique_ptr<QueuedWebMouseWheelEvent>> wheel_queue_;
90 WheelEventQueue wheel_queue_;
91 std::unique_ptr<QueuedWebMouseWheelEvent> event_sent_for_gesture_ack_; 91 std::unique_ptr<QueuedWebMouseWheelEvent> event_sent_for_gesture_ack_;
92 92
93 // True if a non-synthetic GSB needs to be sent before a GSU is sent. 93 // True if a non-synthetic GSB needs to be sent before a GSU is sent.
94 bool needs_scroll_begin_; 94 bool needs_scroll_begin_;
95 95
96 // True if a non-synthetic GSE needs to be sent because a non-synthetic 96 // True if a non-synthetic GSE needs to be sent because a non-synthetic
97 // GSB has been sent in the past. 97 // GSB has been sent in the past.
98 bool needs_scroll_end_; 98 bool needs_scroll_end_;
99 99
100 // True if the touchpad and wheel scroll latching is enabled. 100 // True if the touchpad and wheel scroll latching is enabled.
101 bool enable_scroll_latching_; 101 bool enable_scroll_latching_;
102 102
103 int64_t scroll_transaction_ms_; 103 int64_t scroll_transaction_ms_;
104 blink::WebGestureDevice scrolling_device_; 104 blink::WebGestureDevice scrolling_device_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(MouseWheelEventQueue); 106 DISALLOW_COPY_AND_ASSIGN(MouseWheelEventQueue);
107 }; 107 };
108 108
109 } // namespace content 109 } // namespace content
110 110
111 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOUSE_WHEEL_EVENT_QUEUE_H_ 111 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOUSE_WHEEL_EVENT_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698