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 #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) { |
| 497 set_time_stamp(time_stamp); | |
|
sadrul
2015/02/19 17:23:20
Is this necessary?
robert.bradford
2015/02/19 17:30:44
Whoops, this was necessary in the old version (bef
| |
| 496 } | 498 } |
| 497 | 499 |
| 498 #if defined(OS_WIN) | 500 #if defined(OS_WIN) |
| 499 // This value matches windows WHEEL_DELTA. | 501 // This value matches windows WHEEL_DELTA. |
| 500 // static | 502 // static |
| 501 const int MouseWheelEvent::kWheelDelta = 120; | 503 const int MouseWheelEvent::kWheelDelta = 120; |
| 502 #else | 504 #else |
| 503 // This value matches GTK+ wheel scroll amount. | 505 // This value matches GTK+ wheel scroll amount. |
| 504 const int MouseWheelEvent::kWheelDelta = 53; | 506 const int MouseWheelEvent::kWheelDelta = 53; |
| 505 #endif | 507 #endif |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 980 gfx::PointF(x, y), | 982 gfx::PointF(x, y), |
| 981 time_stamp, | 983 time_stamp, |
| 982 flags | EF_FROM_TOUCH), | 984 flags | EF_FROM_TOUCH), |
| 983 details_(details) { | 985 details_(details) { |
| 984 } | 986 } |
| 985 | 987 |
| 986 GestureEvent::~GestureEvent() { | 988 GestureEvent::~GestureEvent() { |
| 987 } | 989 } |
| 988 | 990 |
| 989 } // namespace ui | 991 } // namespace ui |
| OLD | NEW |