| 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/event_types.h" | 10 #include "base/event_types.h" |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 T* source, | 453 T* source, |
| 454 T* target) | 454 T* target) |
| 455 : MouseEvent(model, source, target, model.type(), model.flags()), | 455 : MouseEvent(model, source, target, model.type(), model.flags()), |
| 456 offset_(model.x_offset(), model.y_offset()) { | 456 offset_(model.x_offset(), model.y_offset()) { |
| 457 } | 457 } |
| 458 | 458 |
| 459 // Used for synthetic events in testing and by the gesture recognizer. | 459 // Used for synthetic events in testing and by the gesture recognizer. |
| 460 MouseWheelEvent(const gfx::Vector2d& offset, | 460 MouseWheelEvent(const gfx::Vector2d& offset, |
| 461 const gfx::PointF& location, | 461 const gfx::PointF& location, |
| 462 const gfx::PointF& root_location, | 462 const gfx::PointF& root_location, |
| 463 base::TimeDelta time_stamp, |
| 463 int flags, | 464 int flags, |
| 464 int changed_button_flags); | 465 int changed_button_flags); |
| 465 | 466 |
| 466 // The amount to scroll. This is in multiples of kWheelDelta. | 467 // The amount to scroll. This is in multiples of kWheelDelta. |
| 467 // Note: x_offset() > 0/y_offset() > 0 means scroll left/up. | 468 // Note: x_offset() > 0/y_offset() > 0 means scroll left/up. |
| 468 int x_offset() const { return offset_.x(); } | 469 int x_offset() const { return offset_.x(); } |
| 469 int y_offset() const { return offset_.y(); } | 470 int y_offset() const { return offset_.y(); } |
| 470 const gfx::Vector2d& offset() const { return offset_; } | 471 const gfx::Vector2d& offset() const { return offset_; } |
| 471 | 472 |
| 472 // Overridden from LocatedEvent. | 473 // Overridden from LocatedEvent. |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 | 878 |
| 878 const GestureEventDetails& details() const { return details_; } | 879 const GestureEventDetails& details() const { return details_; } |
| 879 | 880 |
| 880 private: | 881 private: |
| 881 GestureEventDetails details_; | 882 GestureEventDetails details_; |
| 882 }; | 883 }; |
| 883 | 884 |
| 884 } // namespace ui | 885 } // namespace ui |
| 885 | 886 |
| 886 #endif // UI_EVENTS_EVENT_H_ | 887 #endif // UI_EVENTS_EVENT_H_ |
| OLD | NEW |