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

Side by Side Diff: content/common/input/event_with_latency_info.cc

Issue 2233543002: Make first TouchStart and first TouchMove events on a flinging layer non-blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename 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/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 9
10 using blink::WebGestureEvent; 10 using blink::WebGestureEvent;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 WebInputEvent::DispatchType type_1, 43 WebInputEvent::DispatchType type_1,
44 WebInputEvent::DispatchType type_2) { 44 WebInputEvent::DispatchType type_2) {
45 static_assert(WebInputEvent::DispatchType::Blocking < 45 static_assert(WebInputEvent::DispatchType::Blocking <
46 WebInputEvent::DispatchType::EventNonBlocking, 46 WebInputEvent::DispatchType::EventNonBlocking,
47 "Enum not ordered correctly"); 47 "Enum not ordered correctly");
48 static_assert(WebInputEvent::DispatchType::EventNonBlocking < 48 static_assert(WebInputEvent::DispatchType::EventNonBlocking <
49 WebInputEvent::DispatchType::ListenersNonBlockingPassive, 49 WebInputEvent::DispatchType::ListenersNonBlockingPassive,
50 "Enum not ordered correctly"); 50 "Enum not ordered correctly");
51 static_assert( 51 static_assert(
52 WebInputEvent::DispatchType::ListenersNonBlockingPassive < 52 WebInputEvent::DispatchType::ListenersNonBlockingPassive <
53 WebInputEvent::DispatchType::ListenersForcedNonBlockingPassive, 53 WebInputEvent::DispatchType::ListenersForcedNonBlockingDueToFling,
54 "Enum not ordered correctly"); 54 "Enum not ordered correctly");
55 return static_cast<WebInputEvent::DispatchType>( 55 return static_cast<WebInputEvent::DispatchType>(
56 std::min(static_cast<int>(type_1), static_cast<int>(type_2))); 56 std::min(static_cast<int>(type_1), static_cast<int>(type_2)));
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 namespace internal { 61 namespace internal {
62 62
63 bool CanCoalesce(const WebMouseEvent& event_to_coalesce, 63 bool CanCoalesce(const WebMouseEvent& event_to_coalesce,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698