Chromium Code Reviews| Index: ui/events/event.h |
| diff --git a/ui/events/event.h b/ui/events/event.h |
| index d121f727196e2bfbad3bb6f77fa49e41aca3255b..f5774f4503037016f9806d4273bb3de9ba40a0c7 100644 |
| --- a/ui/events/event.h |
| +++ b/ui/events/event.h |
| @@ -481,6 +481,8 @@ struct EVENTS_EXPORT PointerDetails { |
| class EVENTS_EXPORT MouseEvent : public LocatedEvent { |
| public: |
| + static const int32_t kMousePointerId; |
| + |
| explicit MouseEvent(const base::NativeEvent& native_event); |
| // |pointer_event.IsMousePointerEvent()| must be true. |
| @@ -519,7 +521,10 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent { |
| const gfx::Point& root_location, |
| base::TimeTicks time_stamp, |
| int flags, |
| - int changed_button_flags); |
| + int changed_button_flags, |
| + const PointerDetails& pointer_details = |
| + PointerDetails(EventPointerType::POINTER_TYPE_MOUSE, |
| + kMousePointerId)); |
|
sadrul
2017/04/10 18:10:06
I was a bit worried about the lifetime of the obje
|
| // Conveniences to quickly test what button is down |
| bool IsOnlyLeftMouseButton() const { |
| @@ -581,7 +586,6 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent { |
| // Event details common to MouseEvent and TouchEvent. |
| const PointerDetails& pointer_details() const { return pointer_details_; } |
| - void set_pointer_details(const PointerDetails& details); |
| private: |
| FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease); |
| @@ -733,8 +737,6 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent { |
| class EVENTS_EXPORT PointerEvent : public LocatedEvent { |
| public: |
| - static const int32_t kMousePointerId; |
| - |
| // Returns true if a PointerEvent can be constructed from |event|. Currently, |
| // only mouse and touch events can be converted to pointer events. |
| static bool CanConvertFrom(const Event& event); |