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

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: Rebase and non-const ref passed back 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // and don't indicate explicit depressed state. 115 // and don't indicate explicit depressed state.
116 KeyModifiers = SymbolKey | FnKey | OSKey | AltGrKey | MetaKey | AltKey | CtrlKey | ShiftKey, 116 KeyModifiers = SymbolKey | FnKey | OSKey | AltGrKey | MetaKey | AltKey | CtrlKey | ShiftKey,
117 }; 117 };
118 118
119 enum RailsMode { 119 enum RailsMode {
120 RailsModeFree = 0, 120 RailsModeFree = 0,
121 RailsModeHorizontal = 1, 121 RailsModeHorizontal = 1,
122 RailsModeVertical = 2, 122 RailsModeVertical = 2,
123 }; 123 };
124 124
125 // These values are direct mappings of the values in WebInputEvent
126 // so the values can be cast between the enumerations. static_asserts
127 // checking this are in web/WebInputEventConversion.cpp.
128 enum DispatchType {
129 Blocking,
130 EventNonBlocking,
131 // All listeners are passive.
132 ListenersNonBlockingPassive,
133 // This value represents a state which would have normally blocking
134 // but was forced to be non-blocking.
135 ListenersForcedNonBlockingPassive,
136 };
137
125 EventType type() const { return static_cast<EventType>(m_type); } 138 EventType type() const { return static_cast<EventType>(m_type); }
126 139
127 bool shiftKey() const { return m_modifiers & ShiftKey; } 140 bool shiftKey() const { return m_modifiers & ShiftKey; }
128 bool ctrlKey() const { return m_modifiers & CtrlKey; } 141 bool ctrlKey() const { return m_modifiers & CtrlKey; }
129 bool altKey() const { return m_modifiers & AltKey; } 142 bool altKey() const { return m_modifiers & AltKey; }
130 bool metaKey() const { return m_modifiers & MetaKey; } 143 bool metaKey() const { return m_modifiers & MetaKey; }
131 144
132 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers); } 145 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers); }
133 146
134 double timestamp() const { return m_timestamp; } 147 double timestamp() const { return m_timestamp; }
(...skipping 27 matching lines...) Expand all
162 } 175 }
163 176
164 unsigned m_type; 177 unsigned m_type;
165 unsigned m_modifiers; 178 unsigned m_modifiers;
166 double m_timestamp; 179 double m_timestamp;
167 }; 180 };
168 181
169 } // namespace blink 182 } // namespace blink
170 183
171 #endif // PlatformEvent_h 184 #endif // PlatformEvent_h
OLDNEW
« no previous file with comments | « content/renderer/render_widget_unittest.cc ('k') | third_party/WebKit/Source/platform/PlatformTouchEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698