OLD | NEW |
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 // These values are direct mappings of the values in WebInputEvent | 124 // These values are direct mappings of the values in WebInputEvent |
125 // so the values can be cast between the enumerations. static_asserts | 125 // so the values can be cast between the enumerations. static_asserts |
126 // checking this are in web/WebInputEventConversion.cpp. | 126 // checking this are in web/WebInputEventConversion.cpp. |
127 enum DispatchType { | 127 enum DispatchType { |
128 Blocking, | 128 Blocking, |
129 EventNonBlocking, | 129 EventNonBlocking, |
130 // All listeners are passive. | 130 // All listeners are passive. |
131 ListenersNonBlockingPassive, | 131 ListenersNonBlockingPassive, |
132 // This value represents a state which would have normally blocking | 132 // This value represents a state which would have normally blocking |
133 // but was forced to be non-blocking. | 133 // but was forced to be non-blocking during fling; not cancelable. |
134 ListenersForcedNonBlockingPassive, | 134 ListenersForcedNonBlockingDueToFling, |
135 }; | 135 }; |
136 | 136 |
137 EventType type() const { return static_cast<EventType>(m_type); } | 137 EventType type() const { return static_cast<EventType>(m_type); } |
138 | 138 |
139 bool shiftKey() const { return m_modifiers & ShiftKey; } | 139 bool shiftKey() const { return m_modifiers & ShiftKey; } |
140 bool ctrlKey() const { return m_modifiers & CtrlKey; } | 140 bool ctrlKey() const { return m_modifiers & CtrlKey; } |
141 bool altKey() const { return m_modifiers & AltKey; } | 141 bool altKey() const { return m_modifiers & AltKey; } |
142 bool metaKey() const { return m_modifiers & MetaKey; } | 142 bool metaKey() const { return m_modifiers & MetaKey; } |
143 | 143 |
144 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers);
} | 144 Modifiers getModifiers() const { return static_cast<Modifiers>(m_modifiers);
} |
(...skipping 29 matching lines...) Expand all Loading... |
174 } | 174 } |
175 | 175 |
176 unsigned m_type; | 176 unsigned m_type; |
177 unsigned m_modifiers; | 177 unsigned m_modifiers; |
178 double m_timestamp; | 178 double m_timestamp; |
179 }; | 179 }; |
180 | 180 |
181 } // namespace blink | 181 } // namespace blink |
182 | 182 |
183 #endif // PlatformEvent_h | 183 #endif // PlatformEvent_h |
OLD | NEW |