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

Side by Side Diff: third_party/WebKit/Source/platform/PlatformEvent.h

Issue 1888163003: Articulate the cancel behavior in the WebTouchEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with reporting uma metrics Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // and don't indicate explicit depressed state. 114 // and don't indicate explicit depressed state.
115 KeyModifiers = SymbolKey | FnKey | OSKey | AltGrKey | MetaKey | AltKey | CtrlKey | ShiftKey, 115 KeyModifiers = SymbolKey | FnKey | OSKey | AltGrKey | MetaKey | AltKey | CtrlKey | ShiftKey,
116 }; 116 };
117 117
118 enum RailsMode { 118 enum RailsMode {
119 RailsModeFree = 0, 119 RailsModeFree = 0,
120 RailsModeHorizontal = 1, 120 RailsModeHorizontal = 1,
121 RailsModeVertical = 2, 121 RailsModeVertical = 2,
122 }; 122 };
123 123
124 // These values are direct mappings of the values in WebInputEvent
125 // so the values can be cast between the enumerations. static_asserts
126 // checking this are in web/WebInputEventConversion.cpp.
127 enum DispatchType {
128 Blocking,
129 EventNonBlocking,
130 // All listeners are passive.
131 ListenersNonBlockingPassive,
132 // This value represents a state which would have normally blocking
133 // but was forced to be non-blocking.
134 ListenersForcedNonBlockingPassive,
135 };
136
124 EventType type() const { return static_cast<EventType>(m_type); } 137 EventType type() const { return static_cast<EventType>(m_type); }
125 138
126 bool shiftKey() const { return m_modifiers & ShiftKey; } 139 bool shiftKey() const { return m_modifiers & ShiftKey; }
127 bool ctrlKey() const { return m_modifiers & CtrlKey; } 140 bool ctrlKey() const { return m_modifiers & CtrlKey; }
128 bool altKey() const { return m_modifiers & AltKey; } 141 bool altKey() const { return m_modifiers & AltKey; }
129 bool metaKey() const { return m_modifiers & MetaKey; } 142 bool metaKey() const { return m_modifiers & MetaKey; }
130 143
131 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers); } 144 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers); }
132 145
133 double timestamp() const { return m_timestamp; } 146 double timestamp() const { return m_timestamp; }
(...skipping 27 matching lines...) Expand all
161 } 174 }
162 175
163 unsigned m_type; 176 unsigned m_type;
164 unsigned m_modifiers; 177 unsigned m_modifiers;
165 double m_timestamp; 178 double m_timestamp;
166 }; 179 };
167 180
168 } // namespace blink 181 } // namespace blink
169 182
170 #endif // PlatformEvent_h 183 #endif // PlatformEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698