OLD | NEW |
---|---|
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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
271 kRailsModeFree = 0, | 271 kRailsModeFree = 0, |
272 kRailsModeHorizontal = 1, | 272 kRailsModeHorizontal = 1, |
273 kRailsModeVertical = 2, | 273 kRailsModeVertical = 2, |
274 }; | 274 }; |
275 | 275 |
276 static const int kInputModifiers = | 276 static const int kInputModifiers = |
277 kShiftKey | kControlKey | kAltKey | kMetaKey; | 277 kShiftKey | kControlKey | kAltKey | kMetaKey; |
278 | 278 |
279 static constexpr double kTimeStampForTesting = 123.0; | 279 static constexpr double kTimeStampForTesting = 123.0; |
280 | 280 |
281 static const int32_t kMousePointerId = std::numeric_limits<int32_t>::max(); | |
dtapuska
2017/05/01 15:49:05
Use constexpr.
Should this be in WebMouseEvent.h?
lanwei
2017/05/01 23:51:21
Done.
| |
282 | |
281 // Returns true if the WebInputEvent |type| is a mouse event. | 283 // Returns true if the WebInputEvent |type| is a mouse event. |
282 static bool IsMouseEventType(int type) { | 284 static bool IsMouseEventType(int type) { |
283 return kMouseTypeFirst <= type && type <= kMouseTypeLast; | 285 return kMouseTypeFirst <= type && type <= kMouseTypeLast; |
284 } | 286 } |
285 | 287 |
286 // Returns true if the WebInputEvent |type| is a keyboard event. | 288 // Returns true if the WebInputEvent |type| is a keyboard event. |
287 static bool IsKeyboardEventType(int type) { | 289 static bool IsKeyboardEventType(int type) { |
288 return kKeyboardTypeFirst <= type && type <= kKeyboardTypeLast; | 290 return kKeyboardTypeFirst <= type && type <= kKeyboardTypeLast; |
289 } | 291 } |
290 | 292 |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
423 unsigned size_; // The size of this structure, for serialization. | 425 unsigned size_; // The size of this structure, for serialization. |
424 Type type_; | 426 Type type_; |
425 int modifiers_; | 427 int modifiers_; |
426 }; | 428 }; |
427 | 429 |
428 #pragma pack(pop) | 430 #pragma pack(pop) |
429 | 431 |
430 } // namespace blink | 432 } // namespace blink |
431 | 433 |
432 #endif | 434 #endif |
OLD | NEW |