OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ozone/evdev/tablet_event_converter_evdev.h" | 5 #include "ui/events/ozone/evdev/tablet_event_converter_evdev.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <linux/input.h> | 9 #include <linux/input.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 void MoveCursorTo(const gfx::PointF& location) override { | 117 void MoveCursorTo(const gfx::PointF& location) override { |
118 cursor_location_ = location; | 118 cursor_location_ = location; |
119 } | 119 } |
120 void MoveCursor(const gfx::Vector2dF& delta) override { NOTREACHED(); } | 120 void MoveCursor(const gfx::Vector2dF& delta) override { NOTREACHED(); } |
121 bool IsCursorVisible() override { return 1; } | 121 bool IsCursorVisible() override { return 1; } |
122 gfx::PointF GetLocation() override { return cursor_location_; } | 122 gfx::PointF GetLocation() override { return cursor_location_; } |
123 gfx::Rect GetCursorConfinedBounds() override { | 123 gfx::Rect GetCursorConfinedBounds() override { |
124 return cursor_confined_bounds_; | 124 return cursor_confined_bounds_; |
125 } | 125 } |
126 | 126 void InitializeOnEvdev() override {} |
127 private: | 127 private: |
128 gfx::PointF cursor_location_; | 128 gfx::PointF cursor_location_; |
129 gfx::Rect cursor_confined_bounds_; | 129 gfx::Rect cursor_confined_bounds_; |
130 DISALLOW_COPY_AND_ASSIGN(MockTabletCursorEvdev); | 130 DISALLOW_COPY_AND_ASSIGN(MockTabletCursorEvdev); |
131 }; | 131 }; |
132 | 132 |
133 MockTabletEventConverterEvdev::MockTabletEventConverterEvdev( | 133 MockTabletEventConverterEvdev::MockTabletEventConverterEvdev( |
134 int fd, | 134 int fd, |
135 base::FilePath path, | 135 base::FilePath path, |
136 CursorDelegateEvdev* cursor, | 136 CursorDelegateEvdev* cursor, |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 496 |
497 struct input_event mock_kernel_queue[] = { | 497 struct input_event mock_kernel_queue[] = { |
498 {{0, 0}, EV_ABS, ABS_X, 0}, | 498 {{0, 0}, EV_ABS, ABS_X, 0}, |
499 {{0, 0}, EV_ABS, ABS_Y, 0}, | 499 {{0, 0}, EV_ABS, ABS_Y, 0}, |
500 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 500 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
501 }; | 501 }; |
502 | 502 |
503 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); | 503 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); |
504 EXPECT_EQ(0u, size()); | 504 EXPECT_EQ(0u, size()); |
505 } | 505 } |
OLD | NEW |