| OLD | NEW |
| 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 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 QueuedWebMouseWheelEvent(const MouseWheelEventWithLatencyInfo& original_event) | 22 QueuedWebMouseWheelEvent(const MouseWheelEventWithLatencyInfo& original_event) |
| 23 : MouseWheelEventWithLatencyInfo(original_event) { | 23 : MouseWheelEventWithLatencyInfo(original_event) { |
| 24 TRACE_EVENT_ASYNC_BEGIN0("input", "MouseWheelEventQueue::QueueEvent", this); | 24 TRACE_EVENT_ASYNC_BEGIN0("input", "MouseWheelEventQueue::QueueEvent", this); |
| 25 } | 25 } |
| 26 | 26 |
| 27 ~QueuedWebMouseWheelEvent() { | 27 ~QueuedWebMouseWheelEvent() { |
| 28 TRACE_EVENT_ASYNC_END0("input", "MouseWheelEventQueue::QueueEvent", this); | 28 TRACE_EVENT_ASYNC_END0("input", "MouseWheelEventQueue::QueueEvent", this); |
| 29 } | 29 } |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 bool original_can_scroll_; | |
| 33 DISALLOW_COPY_AND_ASSIGN(QueuedWebMouseWheelEvent); | 32 DISALLOW_COPY_AND_ASSIGN(QueuedWebMouseWheelEvent); |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 MouseWheelEventQueue::MouseWheelEventQueue(MouseWheelEventQueueClient* client, | 35 MouseWheelEventQueue::MouseWheelEventQueue(MouseWheelEventQueueClient* client, |
| 37 bool send_gestures, | 36 bool send_gestures, |
| 38 int64_t scroll_transaction_ms) | 37 int64_t scroll_transaction_ms) |
| 39 : client_(client), | 38 : client_(client), |
| 40 needs_scroll_begin_(true), | 39 needs_scroll_begin_(true), |
| 41 needs_scroll_end_(false), | 40 needs_scroll_end_(false), |
| 42 send_gestures_(send_gestures), | 41 send_gestures_(send_gestures), |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 scroll_begin.data.scrollBegin.targetViewport = false; | 272 scroll_begin.data.scrollBegin.targetViewport = false; |
| 274 scroll_begin.data.scrollBegin.deltaHintUnits = | 273 scroll_begin.data.scrollBegin.deltaHintUnits = |
| 275 gesture_update.data.scrollUpdate.deltaUnits; | 274 gesture_update.data.scrollUpdate.deltaUnits; |
| 276 | 275 |
| 277 needs_scroll_begin_ = false; | 276 needs_scroll_begin_ = false; |
| 278 needs_scroll_end_ = true; | 277 needs_scroll_end_ = true; |
| 279 client_->ForwardGestureEvent(scroll_begin); | 278 client_->ForwardGestureEvent(scroll_begin); |
| 280 } | 279 } |
| 281 | 280 |
| 282 } // namespace content | 281 } // namespace content |
| OLD | NEW |