| 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/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 #include <X11/keysym.h> | 10 #include <X11/keysym.h> |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 &x_offset_ordinal_, &y_offset_ordinal_, | 926 &x_offset_ordinal_, &y_offset_ordinal_, |
| 927 NULL); | 927 NULL); |
| 928 } else { | 928 } else { |
| 929 NOTREACHED() << "Unexpected event type " << type() | 929 NOTREACHED() << "Unexpected event type " << type() |
| 930 << " when constructing a ScrollEvent."; | 930 << " when constructing a ScrollEvent."; |
| 931 } | 931 } |
| 932 } | 932 } |
| 933 | 933 |
| 934 ScrollEvent::ScrollEvent(EventType type, | 934 ScrollEvent::ScrollEvent(EventType type, |
| 935 const gfx::PointF& location, | 935 const gfx::PointF& location, |
| 936 const gfx::PointF& root_location, |
| 936 base::TimeDelta time_stamp, | 937 base::TimeDelta time_stamp, |
| 937 int flags, | 938 int flags, |
| 938 float x_offset, | 939 float x_offset, |
| 939 float y_offset, | 940 float y_offset, |
| 940 float x_offset_ordinal, | 941 float x_offset_ordinal, |
| 941 float y_offset_ordinal, | 942 float y_offset_ordinal, |
| 942 int finger_count) | 943 int finger_count) |
| 943 : MouseEvent(type, location, location, flags, 0), | 944 : MouseEvent(type, location, root_location, flags, 0), |
| 944 x_offset_(x_offset), | 945 x_offset_(x_offset), |
| 945 y_offset_(y_offset), | 946 y_offset_(y_offset), |
| 946 x_offset_ordinal_(x_offset_ordinal), | 947 x_offset_ordinal_(x_offset_ordinal), |
| 947 y_offset_ordinal_(y_offset_ordinal), | 948 y_offset_ordinal_(y_offset_ordinal), |
| 948 finger_count_(finger_count) { | 949 finger_count_(finger_count) { |
| 949 set_time_stamp(time_stamp); | 950 set_time_stamp(time_stamp); |
| 950 CHECK(IsScrollEvent()); | 951 CHECK(IsScrollEvent()); |
| 951 } | 952 } |
| 952 | 953 |
| 953 void ScrollEvent::Scale(const float factor) { | 954 void ScrollEvent::Scale(const float factor) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 970 gfx::PointF(x, y), | 971 gfx::PointF(x, y), |
| 971 time_stamp, | 972 time_stamp, |
| 972 flags | EF_FROM_TOUCH), | 973 flags | EF_FROM_TOUCH), |
| 973 details_(details) { | 974 details_(details) { |
| 974 } | 975 } |
| 975 | 976 |
| 976 GestureEvent::~GestureEvent() { | 977 GestureEvent::~GestureEvent() { |
| 977 } | 978 } |
| 978 | 979 |
| 979 } // namespace ui | 980 } // namespace ui |
| OLD | NEW |