| 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 #include "ui/events/event.h" | 5 #include "ui/events/event.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 | 10 |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 : MouseEvent(scroll_event), | 659 : MouseEvent(scroll_event), |
| 660 offset_(gfx::ToRoundedInt(scroll_event.x_offset()), | 660 offset_(gfx::ToRoundedInt(scroll_event.x_offset()), |
| 661 gfx::ToRoundedInt(scroll_event.y_offset())) { | 661 gfx::ToRoundedInt(scroll_event.y_offset())) { |
| 662 SetType(ET_MOUSEWHEEL); | 662 SetType(ET_MOUSEWHEEL); |
| 663 } | 663 } |
| 664 | 664 |
| 665 MouseWheelEvent::MouseWheelEvent(const MouseEvent& mouse_event, | 665 MouseWheelEvent::MouseWheelEvent(const MouseEvent& mouse_event, |
| 666 int x_offset, | 666 int x_offset, |
| 667 int y_offset) | 667 int y_offset) |
| 668 : MouseEvent(mouse_event), offset_(x_offset, y_offset) { | 668 : MouseEvent(mouse_event), offset_(x_offset, y_offset) { |
| 669 DCHECK(type() == ET_MOUSEWHEEL); | 669 SetType(ET_MOUSEWHEEL); |
| 670 } | 670 } |
| 671 | 671 |
| 672 MouseWheelEvent::MouseWheelEvent(const MouseWheelEvent& mouse_wheel_event) | 672 MouseWheelEvent::MouseWheelEvent(const MouseWheelEvent& mouse_wheel_event) |
| 673 : MouseEvent(mouse_wheel_event), | 673 : MouseEvent(mouse_wheel_event), |
| 674 offset_(mouse_wheel_event.offset()) { | 674 offset_(mouse_wheel_event.offset()) { |
| 675 DCHECK(type() == ET_MOUSEWHEEL); | 675 DCHECK(type() == ET_MOUSEWHEEL); |
| 676 } | 676 } |
| 677 | 677 |
| 678 MouseWheelEvent::MouseWheelEvent(const gfx::Vector2d& offset, | 678 MouseWheelEvent::MouseWheelEvent(const gfx::Vector2d& offset, |
| 679 const gfx::Point& location, | 679 const gfx::Point& location, |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 gfx::PointF(x, y), | 1306 gfx::PointF(x, y), |
| 1307 time_stamp, | 1307 time_stamp, |
| 1308 flags | EF_FROM_TOUCH), | 1308 flags | EF_FROM_TOUCH), |
| 1309 details_(details), | 1309 details_(details), |
| 1310 unique_touch_event_id_(unique_touch_event_id) {} | 1310 unique_touch_event_id_(unique_touch_event_id) {} |
| 1311 | 1311 |
| 1312 GestureEvent::~GestureEvent() { | 1312 GestureEvent::~GestureEvent() { |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 } // namespace ui | 1315 } // namespace ui |
| OLD | NEW |