Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Side by Side Diff: ui/events/ozone/evdev/input_controller_evdev.cc

Issue 875513005: [PATCH 10/11] ozone: evdev: Add a device factory proxy that forwards to device thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates for events_unittests Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/input_controller_evdev.h" 5 #include "ui/events/ozone/evdev/input_controller_evdev.h"
6 6
7 #include <linux/input.h> 7 #include <linux/input.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/events/ozone/evdev/input_device_factory_evdev.h" 10 #include "ui/events/ozone/evdev/input_device_factory_proxy_evdev.h"
11 #include "ui/events/ozone/evdev/keyboard_evdev.h" 11 #include "ui/events/ozone/evdev/keyboard_evdev.h"
12 #include "ui/events/ozone/evdev/mouse_button_map_evdev.h" 12 #include "ui/events/ozone/evdev/mouse_button_map_evdev.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 InputControllerEvdev::InputControllerEvdev(KeyboardEvdev* keyboard, 16 InputControllerEvdev::InputControllerEvdev(KeyboardEvdev* keyboard,
17 MouseButtonMapEvdev* button_map) 17 MouseButtonMapEvdev* button_map)
18 : input_device_factory_(nullptr), 18 : input_device_factory_(nullptr),
19 keyboard_(keyboard), 19 keyboard_(keyboard),
20 button_map_(button_map), 20 button_map_(button_map),
21 has_mouse_(false), 21 has_mouse_(false),
22 has_touchpad_(false) { 22 has_touchpad_(false) {
23 } 23 }
24 24
25 InputControllerEvdev::~InputControllerEvdev() { 25 InputControllerEvdev::~InputControllerEvdev() {
26 } 26 }
27 27
28 void InputControllerEvdev::SetInputDeviceFactory( 28 void InputControllerEvdev::SetInputDeviceFactory(
29 InputDeviceFactoryEvdev* input_device_factory) { 29 InputDeviceFactoryProxyEvdev* input_device_factory) {
30 input_device_factory_ = input_device_factory; 30 input_device_factory_ = input_device_factory;
31 } 31 }
32 32
33 void InputControllerEvdev::SetHasMouse(bool has_mouse) { 33 void InputControllerEvdev::SetHasMouse(bool has_mouse) {
34 has_mouse_ = has_mouse; 34 has_mouse_ = has_mouse;
35 } 35 }
36 36
37 void InputControllerEvdev::SetHasTouchpad(bool has_touchpad) { 37 void InputControllerEvdev::SetHasTouchpad(bool has_touchpad) {
38 has_touchpad_ = has_touchpad; 38 has_touchpad_ = has_touchpad;
39 } 39 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 button_map_->UpdateButtonMap(BTN_LEFT, right ? BTN_RIGHT : BTN_LEFT); 132 button_map_->UpdateButtonMap(BTN_LEFT, right ? BTN_RIGHT : BTN_LEFT);
133 button_map_->UpdateButtonMap(BTN_RIGHT, right ? BTN_LEFT : BTN_RIGHT); 133 button_map_->UpdateButtonMap(BTN_RIGHT, right ? BTN_LEFT : BTN_RIGHT);
134 } 134 }
135 135
136 void InputControllerEvdev::SetTapToClickPaused(bool state) { 136 void InputControllerEvdev::SetTapToClickPaused(bool state) {
137 if (input_device_factory_) 137 if (input_device_factory_)
138 input_device_factory_->SetTapToClickPaused(state); 138 input_device_factory_->SetTapToClickPaused(state);
139 } 139 }
140 140
141 } // namespace ui 141 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698