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 #if defined(USE_X11) | 7 #if defined(USE_X11) |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/keysym.h> | 9 #include <X11/keysym.h> |
10 #include <X11/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 MouseWheelEvent::MouseWheelEvent(const MouseWheelEvent& mouse_wheel_event) | 478 MouseWheelEvent::MouseWheelEvent(const MouseWheelEvent& mouse_wheel_event) |
479 : MouseEvent(mouse_wheel_event), | 479 : MouseEvent(mouse_wheel_event), |
480 offset_(mouse_wheel_event.offset()) { | 480 offset_(mouse_wheel_event.offset()) { |
481 DCHECK(type() == ET_MOUSEWHEEL); | 481 DCHECK(type() == ET_MOUSEWHEEL); |
482 } | 482 } |
483 | 483 |
484 MouseWheelEvent::MouseWheelEvent(const gfx::Vector2d& offset, | 484 MouseWheelEvent::MouseWheelEvent(const gfx::Vector2d& offset, |
485 const gfx::PointF& location, | 485 const gfx::PointF& location, |
486 const gfx::PointF& root_location, | 486 const gfx::PointF& root_location, |
| 487 base::TimeDelta time_stamp, |
487 int flags, | 488 int flags, |
488 int changed_button_flags) | 489 int changed_button_flags) |
489 : MouseEvent(ui::ET_MOUSEWHEEL, | 490 : MouseEvent(ui::ET_MOUSEWHEEL, |
490 location, | 491 location, |
491 root_location, | 492 root_location, |
492 EventTimeForNow(), | 493 time_stamp, |
493 flags, | 494 flags, |
494 changed_button_flags), | 495 changed_button_flags), |
495 offset_(offset) { | 496 offset_(offset) { |
496 } | 497 } |
497 | 498 |
498 #if defined(OS_WIN) | 499 #if defined(OS_WIN) |
499 // This value matches windows WHEEL_DELTA. | 500 // This value matches windows WHEEL_DELTA. |
500 // static | 501 // static |
501 const int MouseWheelEvent::kWheelDelta = 120; | 502 const int MouseWheelEvent::kWheelDelta = 120; |
502 #else | 503 #else |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 gfx::PointF(x, y), | 981 gfx::PointF(x, y), |
981 time_stamp, | 982 time_stamp, |
982 flags | EF_FROM_TOUCH), | 983 flags | EF_FROM_TOUCH), |
983 details_(details) { | 984 details_(details) { |
984 } | 985 } |
985 | 986 |
986 GestureEvent::~GestureEvent() { | 987 GestureEvent::~GestureEvent() { |
987 } | 988 } |
988 | 989 |
989 } // namespace ui | 990 } // namespace ui |
OLD | NEW |