| 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/common/input/event_with_latency_info.h" | 5 #include "content/common/input/event_with_latency_info.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include "content/common/input/web_input_event_traits.h" | |
| 10 | 9 |
| 11 using blink::WebGestureEvent; | 10 using blink::WebGestureEvent; |
| 12 using blink::WebInputEvent; | 11 using blink::WebInputEvent; |
| 13 using blink::WebKeyboardEvent; | 12 using blink::WebKeyboardEvent; |
| 14 using blink::WebMouseEvent; | 13 using blink::WebMouseEvent; |
| 15 using blink::WebMouseWheelEvent; | 14 using blink::WebMouseWheelEvent; |
| 16 using blink::WebTouchEvent; | 15 using blink::WebTouchEvent; |
| 17 using std::numeric_limits; | 16 using std::numeric_limits; |
| 18 | 17 |
| 19 namespace content { | 18 namespace content { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 if (event_to_coalesce.type == blink::WebInputEvent::MouseWheel && | 246 if (event_to_coalesce.type == blink::WebInputEvent::MouseWheel && |
| 248 event->type == blink::WebInputEvent::MouseWheel) { | 247 event->type == blink::WebInputEvent::MouseWheel) { |
| 249 Coalesce(static_cast<const blink::WebMouseWheelEvent&>(event_to_coalesce), | 248 Coalesce(static_cast<const blink::WebMouseWheelEvent&>(event_to_coalesce), |
| 250 static_cast<blink::WebMouseWheelEvent*>(event)); | 249 static_cast<blink::WebMouseWheelEvent*>(event)); |
| 251 } | 250 } |
| 252 } | 251 } |
| 253 | 252 |
| 254 } // namespace internal | 253 } // namespace internal |
| 255 | 254 |
| 256 ScopedWebInputEventWithLatencyInfo::ScopedWebInputEventWithLatencyInfo( | 255 ScopedWebInputEventWithLatencyInfo::ScopedWebInputEventWithLatencyInfo( |
| 257 ScopedWebInputEvent event, | 256 ui::ScopedWebInputEvent event, |
| 258 const ui::LatencyInfo& latency_info) | 257 const ui::LatencyInfo& latency_info) |
| 259 : event_(std::move(event)), latency_(latency_info) { | 258 : event_(std::move(event)), latency_(latency_info) { |
| 260 } | 259 } |
| 261 | 260 |
| 262 ScopedWebInputEventWithLatencyInfo::~ScopedWebInputEventWithLatencyInfo() {} | 261 ScopedWebInputEventWithLatencyInfo::~ScopedWebInputEventWithLatencyInfo() {} |
| 263 | 262 |
| 264 bool ScopedWebInputEventWithLatencyInfo::CanCoalesceWith( | 263 bool ScopedWebInputEventWithLatencyInfo::CanCoalesceWith( |
| 265 const ScopedWebInputEventWithLatencyInfo& other) const { | 264 const ScopedWebInputEventWithLatencyInfo& other) const { |
| 266 return internal::CanCoalesce(other.event(), event()); | 265 return internal::CanCoalesce(other.event(), event()); |
| 267 } | 266 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 286 | 285 |
| 287 const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const { | 286 const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const { |
| 288 return *event_; | 287 return *event_; |
| 289 } | 288 } |
| 290 | 289 |
| 291 blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() { | 290 blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() { |
| 292 return *event_; | 291 return *event_; |
| 293 } | 292 } |
| 294 | 293 |
| 295 } // namespace content | 294 } // namespace content |
| OLD | NEW |