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 <linux/input.h> | 5 #include <linux/input.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 MockEventConverterEvdevImpl(int fd, | 25 MockEventConverterEvdevImpl(int fd, |
26 EventModifiersEvdev* modifiers, | 26 EventModifiersEvdev* modifiers, |
27 MouseButtonMapEvdev* button_map, | 27 MouseButtonMapEvdev* button_map, |
28 CursorDelegateEvdev* cursor, | 28 CursorDelegateEvdev* cursor, |
29 KeyboardEvdev* keyboard, | 29 KeyboardEvdev* keyboard, |
30 const EventDispatchCallback& callback) | 30 const EventDispatchCallback& callback) |
31 : EventConverterEvdevImpl(fd, | 31 : EventConverterEvdevImpl(fd, |
32 base::FilePath(kTestDevicePath), | 32 base::FilePath(kTestDevicePath), |
33 1, | 33 1, |
34 INPUT_DEVICE_UNKNOWN, | 34 INPUT_DEVICE_UNKNOWN, |
| 35 EventDeviceInfo(), |
35 modifiers, | 36 modifiers, |
36 button_map, | 37 button_map, |
37 cursor, | 38 cursor, |
38 keyboard, | 39 keyboard, |
39 callback) { | 40 callback) { |
40 Start(); | 41 Start(); |
41 } | 42 } |
42 ~MockEventConverterEvdevImpl() override {} | 43 ~MockEventConverterEvdevImpl() override {} |
43 | 44 |
44 private: | 45 private: |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, | 465 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, |
465 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 466 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
466 | 467 |
467 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, | 468 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, |
468 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 469 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
469 }; | 470 }; |
470 | 471 |
471 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); | 472 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); |
472 EXPECT_EQ(0u, size()); | 473 EXPECT_EQ(0u, size()); |
473 } | 474 } |
OLD | NEW |