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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 512 set_flags(flags); | 512 set_flags(flags); |
| 513 } | 513 } |
| 514 | 514 |
| 515 // Used for synthetic events in testing, gesture recognizer and Ozone | 515 // Used for synthetic events in testing, gesture recognizer and Ozone |
| 516 // Note: Use the ctor for MouseWheelEvent if type is ET_MOUSEWHEEL. | 516 // Note: Use the ctor for MouseWheelEvent if type is ET_MOUSEWHEEL. |
| 517 MouseEvent(EventType type, | 517 MouseEvent(EventType type, |
| 518 const gfx::Point& location, | 518 const gfx::Point& location, |
| 519 const gfx::Point& root_location, | 519 const gfx::Point& root_location, |
| 520 base::TimeTicks time_stamp, | 520 base::TimeTicks time_stamp, |
| 521 int flags, | 521 int flags, |
| 522 int changed_button_flags); | 522 int changed_button_flags, |
| 523 const PointerDetails& pointer_details); | |
|
sadrul
2017/04/04 03:47:14
Most (all) users of this ctor simply pass in the d
| |
| 523 | 524 |
| 524 // Conveniences to quickly test what button is down | 525 // Conveniences to quickly test what button is down |
| 525 bool IsOnlyLeftMouseButton() const { | 526 bool IsOnlyLeftMouseButton() const { |
| 526 return button_flags() == EF_LEFT_MOUSE_BUTTON; | 527 return button_flags() == EF_LEFT_MOUSE_BUTTON; |
| 527 } | 528 } |
| 528 | 529 |
| 529 bool IsLeftMouseButton() const { | 530 bool IsLeftMouseButton() const { |
| 530 return (flags() & EF_LEFT_MOUSE_BUTTON) != 0; | 531 return (flags() & EF_LEFT_MOUSE_BUTTON) != 0; |
| 531 } | 532 } |
| 532 | 533 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1048 // dispatched. This field gets a non-zero value only for gestures that are | 1049 // dispatched. This field gets a non-zero value only for gestures that are |
| 1049 // released through TouchDispositionGestureFilter::SendGesture. The gesture | 1050 // released through TouchDispositionGestureFilter::SendGesture. The gesture |
| 1050 // events that aren't fired directly in response to processing a touch-event | 1051 // events that aren't fired directly in response to processing a touch-event |
| 1051 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. | 1052 // (e.g. timer fired ones), this id is zero. See crbug.com/618738. |
| 1052 uint32_t unique_touch_event_id_; | 1053 uint32_t unique_touch_event_id_; |
| 1053 }; | 1054 }; |
| 1054 | 1055 |
| 1055 } // namespace ui | 1056 } // namespace ui |
| 1056 | 1057 |
| 1057 #endif // UI_EVENTS_EVENT_H_ | 1058 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |