| 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/touch_event_converter_evdev.h" | 5 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 const std::vector<InputDevice>& devices) override {} | 146 const std::vector<InputDevice>& devices) override {} |
| 147 void DispatchTouchscreenDevicesUpdated( | 147 void DispatchTouchscreenDevicesUpdated( |
| 148 const std::vector<TouchscreenDevice>& devices) override {} | 148 const std::vector<TouchscreenDevice>& devices) override {} |
| 149 void DispatchMouseDevicesUpdated( | 149 void DispatchMouseDevicesUpdated( |
| 150 const std::vector<InputDevice>& devices) override {} | 150 const std::vector<InputDevice>& devices) override {} |
| 151 void DispatchTouchpadDevicesUpdated( | 151 void DispatchTouchpadDevicesUpdated( |
| 152 const std::vector<InputDevice>& devices) override {} | 152 const std::vector<InputDevice>& devices) override {} |
| 153 void DispatchDeviceListsComplete() override {} | 153 void DispatchDeviceListsComplete() override {} |
| 154 void DispatchStylusStateChanged(StylusState stylus_state) override {} | 154 void DispatchStylusStateChanged(StylusState stylus_state) override {} |
| 155 | 155 |
| 156 // Dispatch Gamepad Event. |
| 157 void DispatchGamepadEvent(const GamepadEvent& event) override {} |
| 158 |
| 159 void DispatchGamepadDevicesUpdated( |
| 160 const std::vector<InputDevice>& devices) override {} |
| 161 |
| 156 private: | 162 private: |
| 157 base::Callback<void(const GenericEventParams& params)> callback_; | 163 base::Callback<void(const GenericEventParams& params)> callback_; |
| 158 }; | 164 }; |
| 159 | 165 |
| 160 MockTouchEventConverterEvdev::MockTouchEventConverterEvdev( | 166 MockTouchEventConverterEvdev::MockTouchEventConverterEvdev( |
| 161 ScopedInputDevice fd, | 167 ScopedInputDevice fd, |
| 162 base::FilePath path, | 168 base::FilePath path, |
| 163 const EventDeviceInfo& devinfo, | 169 const EventDeviceInfo& devinfo, |
| 164 DeviceEventDispatcherEvdev* dispatcher) | 170 DeviceEventDispatcherEvdev* dispatcher) |
| 165 : TouchEventConverterEvdev(std::move(fd), path, 1, devinfo, dispatcher) { | 171 : TouchEventConverterEvdev(std::move(fd), path, 1, devinfo, dispatcher) { |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 event = dispatched_touch_event(3); | 1109 event = dispatched_touch_event(3); |
| 1104 EXPECT_EQ(ET_TOUCH_RELEASED, event.type); | 1110 EXPECT_EQ(ET_TOUCH_RELEASED, event.type); |
| 1105 EXPECT_EQ(8930, event.location.x()); | 1111 EXPECT_EQ(8930, event.location.x()); |
| 1106 EXPECT_EQ(980, event.location.y()); | 1112 EXPECT_EQ(980, event.location.y()); |
| 1107 EXPECT_EQ(EventPointerType::POINTER_TYPE_PEN, | 1113 EXPECT_EQ(EventPointerType::POINTER_TYPE_PEN, |
| 1108 event.pointer_details.pointer_type); | 1114 event.pointer_details.pointer_type); |
| 1109 EXPECT_EQ(0.f / 1024, event.pointer_details.force); | 1115 EXPECT_EQ(0.f / 1024, event.pointer_details.force); |
| 1110 } | 1116 } |
| 1111 | 1117 |
| 1112 } // namespace ui | 1118 } // namespace ui |
| OLD | NEW |