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

Side by Side Diff: ui/base/events/event_utils.h

Issue 13529009: Add UMA metrics for measuring number of coalesed events and their latency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/base/events/event_utils.cc » ('j') | ui/base/x/x11_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_BASE_EVENTS_EVENT_UTILS_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_UTILS_H_
6 #define UI_BASE_EVENTS_EVENT_UTILS_H_ 6 #define UI_BASE_EVENTS_EVENT_UTILS_H_
7 7
8 #include "base/event_types.h" 8 #include "base/event_types.h"
9 #include "ui/base/events/event_constants.h" 9 #include "ui/base/events/event_constants.h"
10 #include "ui/base/keycodes/keyboard_codes.h" 10 #include "ui/base/keycodes/keyboard_codes.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); 61 UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event);
62 #endif 62 #endif
63 63
64 // Returns the KeyboardCode from a native event. 64 // Returns the KeyboardCode from a native event.
65 UI_EXPORT KeyboardCode KeyboardCodeFromNative( 65 UI_EXPORT KeyboardCode KeyboardCodeFromNative(
66 const base::NativeEvent& native_event); 66 const base::NativeEvent& native_event);
67 67
68 // Returns true if the message is a mouse event. 68 // Returns true if the message is a mouse event.
69 UI_EXPORT bool IsMouseEvent(const base::NativeEvent& native_event); 69 UI_EXPORT bool IsMouseEvent(const base::NativeEvent& native_event);
70 70
71 // Returns true if |type| is a Key event type.
72 UI_EXPORT bool IsKeyEventType(EventType type);
73
74 // Returns true if |type| is a Mouse event type.
75 UI_EXPORT bool IsMouseEventType(EventType type);
76
77 // Returns true if |type| is a Touch event type.
78 UI_EXPORT bool IsTouchEventType(EventType type);
79
71 // Returns the flags of the button that changed during a press/release. 80 // Returns the flags of the button that changed during a press/release.
72 UI_EXPORT int GetChangedMouseButtonFlagsFromNative( 81 UI_EXPORT int GetChangedMouseButtonFlagsFromNative(
73 const base::NativeEvent& native_event); 82 const base::NativeEvent& native_event);
74 83
75 // Gets the mouse wheel offset from a native event. 84 // Gets the mouse wheel offset from a native event.
76 UI_EXPORT int GetMouseWheelOffset(const base::NativeEvent& native_event); 85 UI_EXPORT int GetMouseWheelOffset(const base::NativeEvent& native_event);
77 86
78 // Gets the touch id from a native event. 87 // Gets the touch id from a native event.
79 UI_EXPORT int GetTouchId(const base::NativeEvent& native_event); 88 UI_EXPORT int GetTouchId(const base::NativeEvent& native_event);
80 89
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Returns true if default post-target handling was canceled for |event| after 148 // Returns true if default post-target handling was canceled for |event| after
140 // its dispatch to its target. 149 // its dispatch to its target.
141 UI_EXPORT bool EventCanceledDefaultHandling(const Event& event); 150 UI_EXPORT bool EventCanceledDefaultHandling(const Event& event);
142 151
143 // Registers a custom event type. 152 // Registers a custom event type.
144 UI_EXPORT int RegisterCustomEventType(); 153 UI_EXPORT int RegisterCustomEventType();
145 154
146 } // namespace ui 155 } // namespace ui
147 156
148 #endif // UI_BASE_EVENTS_EVENT_UTILS_H_ 157 #endif // UI_BASE_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/events/event_utils.cc » ('j') | ui/base/x/x11_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698