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

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

Issue 1630983002: Move bulk of event_with_latency_info into common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners_2
Patch Set: Rebase Created 4 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_EVENT_WITH_LATENCY_INFO_H_ 5 #ifndef CONTENT_COMMON_INPUT_EVENT_WITH_LATENCY_INFO_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_EVENT_WITH_LATENCY_INFO_H_ 6 #define CONTENT_COMMON_INPUT_EVENT_WITH_LATENCY_INFO_H_
7 7
8 #include "ui/events/latency_info.h" 8 #include "ui/events/latency_info.h"
9 9
10 #include "content/common/input/web_input_event_traits.h" 10 #include "content/common/input/web_input_event_traits.h"
11 #include "content/public/browser/native_web_keyboard_event.h"
12 11
13 namespace blink { 12 namespace blink {
14 class WebGestureEvent; 13 class WebGestureEvent;
15 class WebMouseEvent; 14 class WebMouseEvent;
16 class WebMouseWheelEvent; 15 class WebMouseWheelEvent;
17 class WebTouchEvent; 16 class WebTouchEvent;
18 } 17 }
19 18
20 namespace content { 19 namespace content {
21 20
(...skipping 26 matching lines...) Expand all
48 // latency. 47 // latency.
49 if (other.latency.trace_id() >= 0 && 48 if (other.latency.trace_id() >= 0 &&
50 (latency.trace_id() < 0 || 49 (latency.trace_id() < 0 ||
51 other.latency.trace_id() < latency.trace_id())) { 50 other.latency.trace_id() < latency.trace_id())) {
52 latency = other.latency; 51 latency = other.latency;
53 } 52 }
54 latency.AddCoalescedEventTimestamp(old_timestamp); 53 latency.AddCoalescedEventTimestamp(old_timestamp);
55 } 54 }
56 }; 55 };
57 56
58 typedef EventWithLatencyInfo<NativeWebKeyboardEvent>
59 NativeWebKeyboardEventWithLatencyInfo;
60 typedef EventWithLatencyInfo<blink::WebGestureEvent> 57 typedef EventWithLatencyInfo<blink::WebGestureEvent>
61 GestureEventWithLatencyInfo; 58 GestureEventWithLatencyInfo;
62 typedef EventWithLatencyInfo<blink::WebMouseWheelEvent> 59 typedef EventWithLatencyInfo<blink::WebMouseWheelEvent>
63 MouseWheelEventWithLatencyInfo; 60 MouseWheelEventWithLatencyInfo;
64 typedef EventWithLatencyInfo<blink::WebMouseEvent> 61 typedef EventWithLatencyInfo<blink::WebMouseEvent>
65 MouseEventWithLatencyInfo; 62 MouseEventWithLatencyInfo;
66 typedef EventWithLatencyInfo<blink::WebTouchEvent> 63 typedef EventWithLatencyInfo<blink::WebTouchEvent>
67 TouchEventWithLatencyInfo; 64 TouchEventWithLatencyInfo;
68 65
69 } // namespace content 66 } // namespace content
70 67
71 #endif // CONTENT_BROWSER_RENDERER_HOST_EVENT_WITH_LATENCY_INFO_H_ 68 #endif // CONTENT_COMMON_INPUT_EVENT_WITH_LATENCY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698