| 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/event_converter_evdev_impl.h" | 5 #include "ui/events/ozone/evdev/event_converter_evdev_impl.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <linux/input.h> | 8 #include <linux/input.h> |
| 9 | 9 |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
| 12 #include "ui/events/keycodes/dom4/keycode_converter.h" | 12 #include "ui/events/keycodes/dom4/keycode_converter.h" |
| 13 #include "ui/events/keycodes/keyboard_codes.h" | 13 #include "ui/events/keycodes/keyboard_codes.h" |
| 14 | 14 |
| 15 namespace ui { | 15 namespace ui { |
| 16 | 16 |
| 17 EventConverterEvdevImpl::EventConverterEvdevImpl( | 17 EventConverterEvdevImpl::EventConverterEvdevImpl( |
| 18 int fd, | 18 int fd, |
| 19 base::FilePath path, | 19 base::FilePath path, |
| 20 int id, | 20 int id, |
| 21 InputDeviceType type, |
| 21 EventModifiersEvdev* modifiers, | 22 EventModifiersEvdev* modifiers, |
| 22 MouseButtonMapEvdev* button_map, | 23 MouseButtonMapEvdev* button_map, |
| 23 CursorDelegateEvdev* cursor, | 24 CursorDelegateEvdev* cursor, |
| 24 KeyboardEvdev* keyboard, | 25 KeyboardEvdev* keyboard, |
| 25 const EventDispatchCallback& callback) | 26 const EventDispatchCallback& callback) |
| 26 : EventConverterEvdev(fd, path, id), | 27 : EventConverterEvdev(fd, path, id, type), |
| 27 x_offset_(0), | 28 x_offset_(0), |
| 28 y_offset_(0), | 29 y_offset_(0), |
| 29 cursor_(cursor), | 30 cursor_(cursor), |
| 30 keyboard_(keyboard), | 31 keyboard_(keyboard), |
| 31 modifiers_(modifiers), | 32 modifiers_(modifiers), |
| 32 button_map_(button_map), | 33 button_map_(button_map), |
| 33 callback_(callback) { | 34 callback_(callback) { |
| 34 } | 35 } |
| 35 | 36 |
| 36 EventConverterEvdevImpl::~EventConverterEvdevImpl() { | 37 EventConverterEvdevImpl::~EventConverterEvdevImpl() { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 new MouseEvent(ui::ET_MOUSE_MOVED, | 131 new MouseEvent(ui::ET_MOUSE_MOVED, |
| 131 cursor_->GetLocation(), | 132 cursor_->GetLocation(), |
| 132 cursor_->GetLocation(), | 133 cursor_->GetLocation(), |
| 133 modifiers_->GetModifierFlags(), | 134 modifiers_->GetModifierFlags(), |
| 134 /* changed_button_flags */ 0))); | 135 /* changed_button_flags */ 0))); |
| 135 x_offset_ = 0; | 136 x_offset_ = 0; |
| 136 y_offset_ = 0; | 137 y_offset_ = 0; |
| 137 } | 138 } |
| 138 | 139 |
| 139 } // namespace ui | 140 } // namespace ui |
| OLD | NEW |