Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_EVENTS_EVENT_H_ | 5 #ifndef UI_EVENTS_EVENT_H_ |
| 6 #define UI_EVENTS_EVENT_H_ | 6 #define UI_EVENTS_EVENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 int id = 0; | 474 int id = 0; |
| 475 | 475 |
| 476 // Only used by mouse wheel events. The amount to scroll. This is in multiples | 476 // Only used by mouse wheel events. The amount to scroll. This is in multiples |
| 477 // of kWheelDelta. | 477 // of kWheelDelta. |
| 478 // Note: offset_.x() > 0/offset_.y() > 0 means scroll left/up. | 478 // Note: offset_.x() > 0/offset_.y() > 0 means scroll left/up. |
| 479 gfx::Vector2d offset; | 479 gfx::Vector2d offset; |
| 480 }; | 480 }; |
| 481 | 481 |
| 482 class EVENTS_EXPORT MouseEvent : public LocatedEvent { | 482 class EVENTS_EXPORT MouseEvent : public LocatedEvent { |
| 483 public: | 483 public: |
| 484 static const int32_t kMousePointerId; | 484 static const int kMousePointerId; |
|
sky
2017/05/05 22:51:46
This value is serialized in mojom as an int32. It
| |
| 485 | 485 |
| 486 explicit MouseEvent(const base::NativeEvent& native_event); | 486 explicit MouseEvent(const base::NativeEvent& native_event); |
| 487 | 487 |
| 488 // |pointer_event.IsMousePointerEvent()| must be true. | 488 // |pointer_event.IsMousePointerEvent()| must be true. |
| 489 // Note: If |pointer_event| is a mouse wheel pointer event, use the | 489 // Note: If |pointer_event| is a mouse wheel pointer event, use the |
| 490 // MouseWheelEvent version of this function to convert to a MouseWheelEvent | 490 // MouseWheelEvent version of this function to convert to a MouseWheelEvent |
| 491 // instead. | 491 // instead. |
| 492 explicit MouseEvent(const PointerEvent& pointer_event); | 492 explicit MouseEvent(const PointerEvent& pointer_event); |
| 493 | 493 |
| 494 // Create a new MouseEvent based on the provided model. | 494 // Create a new MouseEvent based on the provided model. |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1053 // dispatched. This field gets a non-zero value only for gestures that are | 1053 // dispatched. This field gets a non-zero value only for gestures that are |
| 1054 // released through TouchDispositionGestureFilter::SendGesture. The gesture | 1054 // released through TouchDispositionGestureFilter::SendGesture. The gesture |
| 1055 // events that aren't fired directly in response to processing a touch-event | 1055 // events that aren't fired directly in response to processing a touch-event |
| 1056 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. | 1056 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. |
| 1057 uint32_t unique_touch_event_id_; | 1057 uint32_t unique_touch_event_id_; |
| 1058 }; | 1058 }; |
| 1059 | 1059 |
| 1060 } // namespace ui | 1060 } // namespace ui |
| 1061 | 1061 |
| 1062 #endif // UI_EVENTS_EVENT_H_ | 1062 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |