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" | 9 #include "content/common/input/web_input_event_traits.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 WebInputEvent::DispatchType MergeDispatchTypes( | 43 WebInputEvent::DispatchType MergeDispatchTypes( |
44 WebInputEvent::DispatchType type_1, | 44 WebInputEvent::DispatchType type_1, |
45 WebInputEvent::DispatchType type_2) { | 45 WebInputEvent::DispatchType type_2) { |
46 static_assert(WebInputEvent::DispatchType::Blocking < | 46 static_assert(WebInputEvent::DispatchType::Blocking < |
47 WebInputEvent::DispatchType::EventNonBlocking, | 47 WebInputEvent::DispatchType::EventNonBlocking, |
48 "Enum not ordered correctly"); | 48 "Enum not ordered correctly"); |
49 static_assert(WebInputEvent::DispatchType::EventNonBlocking < | 49 static_assert(WebInputEvent::DispatchType::EventNonBlocking < |
50 WebInputEvent::DispatchType::ListenersNonBlockingPassive, | 50 WebInputEvent::DispatchType::ListenersNonBlockingPassive, |
51 "Enum not ordered correctly"); | 51 "Enum not ordered correctly"); |
52 static_assert( | 52 static_assert(WebInputEvent::DispatchType::ListenersNonBlockingPassive < |
53 WebInputEvent::DispatchType::ListenersNonBlockingPassive < | 53 WebInputEvent::DispatchType:: |
54 WebInputEvent::DispatchType::ListenersForcedNonBlockingPassive, | 54 ListenersForcedNonBlockingPassiveDueToFling, |
55 "Enum not ordered correctly"); | 55 "Enum not ordered correctly"); |
56 return static_cast<WebInputEvent::DispatchType>( | 56 return static_cast<WebInputEvent::DispatchType>( |
57 std::min(static_cast<int>(type_1), static_cast<int>(type_2))); | 57 std::min(static_cast<int>(type_1), static_cast<int>(type_2))); |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
62 namespace internal { | 62 namespace internal { |
63 | 63 |
64 bool CanCoalesce(const WebMouseEvent& event_to_coalesce, | 64 bool CanCoalesce(const WebMouseEvent& event_to_coalesce, |
65 const WebMouseEvent& event) { | 65 const WebMouseEvent& event) { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 | 285 |
286 const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const { | 286 const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const { |
287 return *event_; | 287 return *event_; |
288 } | 288 } |
289 | 289 |
290 blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() { | 290 blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() { |
291 return *event_; | 291 return *event_; |
292 } | 292 } |
293 | 293 |
294 } // namespace content | 294 } // namespace content |
OLD | NEW |