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

Side by Side Diff: sky/engine/public/platform/WebInputEvent.h

Issue 1176373004: Wire up Android back button in SkyShell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | sky/engine/public/sky/sky_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 GestureDoubleTap, 116 GestureDoubleTap,
117 GestureTwoFingerTap, 117 GestureTwoFingerTap,
118 GestureLongPress, 118 GestureLongPress,
119 GestureLongTap, 119 GestureLongTap,
120 GesturePinchBegin, 120 GesturePinchBegin,
121 GesturePinchEnd, 121 GesturePinchEnd,
122 GesturePinchUpdate, 122 GesturePinchUpdate,
123 GestureTypeLast = GesturePinchUpdate, 123 GestureTypeLast = GesturePinchUpdate,
124 124
125 WheelEvent, 125 WheelEvent,
126
127 Back,
126 }; 128 };
127 129
128 enum Modifiers { 130 enum Modifiers {
129 // modifiers for all events: 131 // modifiers for all events:
130 ShiftKey = 1 << 0, 132 ShiftKey = 1 << 0,
131 ControlKey = 1 << 1, 133 ControlKey = 1 << 1,
132 AltKey = 1 << 2, 134 AltKey = 1 << 2,
133 MetaKey = 1 << 3, 135 MetaKey = 1 << 3,
134 136
135 // modifiers for keyboard events: 137 // modifiers for keyboard events:
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 static bool isGestureEventType(int type) 182 static bool isGestureEventType(int type)
181 { 183 {
182 return GestureTypeFirst <= type && type <= GestureTypeLast; 184 return GestureTypeFirst <= type && type <= GestureTypeLast;
183 } 185 }
184 186
185 static bool isWheelEventType(int type) 187 static bool isWheelEventType(int type)
186 { 188 {
187 return type == WheelEvent; 189 return type == WheelEvent;
188 } 190 }
189 191
192 static WebInputEvent* create() {
193 return new WebInputEvent(sizeof(WebInputEvent));
194 }
195
190 protected: 196 protected:
191 explicit WebInputEvent(unsigned sizeParam) 197 explicit WebInputEvent(unsigned sizeParam)
192 { 198 {
193 memset(this, 0, sizeParam); 199 memset(this, 0, sizeParam);
194 timeStampMS = 0.0; 200 timeStampMS = 0.0;
195 size = sizeParam; 201 size = sizeParam;
196 type = Undefined; 202 type = Undefined;
197 modifiers = 0; 203 modifiers = 0;
198 } 204 }
199 }; 205 };
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 { 336 {
331 memset(&data, 0, sizeof(data)); 337 memset(&data, 0, sizeof(data));
332 } 338 }
333 }; 339 };
334 340
335 #pragma pack(pop) 341 #pragma pack(pop)
336 342
337 } // namespace blink 343 } // namespace blink
338 344
339 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBINPUTEVENT_H_ 345 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBINPUTEVENT_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/public/sky/sky_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698