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

Side by Side Diff: content/browser/renderer_host/input/mouse_wheel_event_queue.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 #include "content/browser/renderer_host/input/mouse_wheel_event_queue.h" 5 #include "content/browser/renderer_host/input/mouse_wheel_event_queue.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "content/common/input/web_input_event_traits.h" 10 #include "content/common/input/web_input_event_traits.h"
(...skipping 27 matching lines...) Expand all
38 : client_(client), 38 : client_(client),
39 needs_scroll_begin_(true), 39 needs_scroll_begin_(true),
40 needs_scroll_end_(false), 40 needs_scroll_end_(false),
41 scroll_transaction_ms_(scroll_transaction_ms), 41 scroll_transaction_ms_(scroll_transaction_ms),
42 scrolling_device_(blink::WebGestureDeviceUninitialized) { 42 scrolling_device_(blink::WebGestureDeviceUninitialized) {
43 DCHECK(client); 43 DCHECK(client);
44 } 44 }
45 45
46 MouseWheelEventQueue::~MouseWheelEventQueue() { 46 MouseWheelEventQueue::~MouseWheelEventQueue() {
47 if (!wheel_queue_.empty()) 47 if (!wheel_queue_.empty())
48 STLDeleteElements(&wheel_queue_); 48 base::STLDeleteElements(&wheel_queue_);
49 } 49 }
50 50
51 void MouseWheelEventQueue::QueueEvent( 51 void MouseWheelEventQueue::QueueEvent(
52 const MouseWheelEventWithLatencyInfo& event) { 52 const MouseWheelEventWithLatencyInfo& event) {
53 TRACE_EVENT0("input", "MouseWheelEventQueue::QueueEvent"); 53 TRACE_EVENT0("input", "MouseWheelEventQueue::QueueEvent");
54 54
55 if (event_sent_for_gesture_ack_ && !wheel_queue_.empty()) { 55 if (event_sent_for_gesture_ack_ && !wheel_queue_.empty()) {
56 QueuedWebMouseWheelEvent* last_event = wheel_queue_.back(); 56 QueuedWebMouseWheelEvent* last_event = wheel_queue_.back();
57 if (last_event->CanCoalesceWith(event)) { 57 if (last_event->CanCoalesceWith(event)) {
58 last_event->CoalesceWith(event); 58 last_event->CoalesceWith(event);
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 scroll_begin.data.scrollBegin.targetViewport = false; 284 scroll_begin.data.scrollBegin.targetViewport = false;
285 scroll_begin.data.scrollBegin.deltaHintUnits = 285 scroll_begin.data.scrollBegin.deltaHintUnits =
286 gesture_update.data.scrollUpdate.deltaUnits; 286 gesture_update.data.scrollUpdate.deltaUnits;
287 287
288 needs_scroll_begin_ = false; 288 needs_scroll_begin_ = false;
289 needs_scroll_end_ = true; 289 needs_scroll_end_ = true;
290 client_->ForwardGestureEventWithLatencyInfo(scroll_begin, ui::LatencyInfo()); 290 client_->ForwardGestureEventWithLatencyInfo(scroll_begin, ui::LatencyInfo());
291 } 291 }
292 292
293 } // namespace content 293 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/plugin_private_storage_helper.cc ('k') | content/browser/renderer_host/input/touch_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698