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

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

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: rebase Created 5 years, 10 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 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
12 #include "ui/ozone/public/input_controller.h" 12 #include "ui/ozone/public/input_controller.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 class InputDeviceFactoryEvdev; 16 class InputDeviceFactoryEvdevProxy;
17 class KeyboardEvdev; 17 class KeyboardEvdev;
18 class MouseButtonMapEvdev; 18 class MouseButtonMapEvdev;
19 19
20 // Ozone InputController implementation for the Linux input subsystem ("evdev"). 20 // Ozone InputController implementation for the Linux input subsystem ("evdev").
21 class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController { 21 class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController {
22 public: 22 public:
23 InputControllerEvdev(KeyboardEvdev* keyboard, 23 InputControllerEvdev(KeyboardEvdev* keyboard,
24 MouseButtonMapEvdev* button_map); 24 MouseButtonMapEvdev* button_map);
25 ~InputControllerEvdev() override; 25 ~InputControllerEvdev() override;
26 26
27 // Initialize device factory. This would be in the constructor if it was 27 // Initialize device factory. This would be in the constructor if it was
28 // built early enough for that to be possible. 28 // built early enough for that to be possible.
29 void SetInputDeviceFactory(InputDeviceFactoryEvdev* input_device_factory); 29 void SetInputDeviceFactory(
30 InputDeviceFactoryEvdevProxy* input_device_factory);
30 31
31 void set_has_mouse(bool has_mouse); 32 void set_has_mouse(bool has_mouse);
32 void set_has_touchpad(bool has_touchpad); 33 void set_has_touchpad(bool has_touchpad);
33 34
34 // InputController: 35 // InputController:
35 bool HasMouse() override; 36 bool HasMouse() override;
36 bool HasTouchpad() override; 37 bool HasTouchpad() override;
37 bool IsCapsLockEnabled() override; 38 bool IsCapsLockEnabled() override;
38 void SetCapsLockEnabled(bool enabled) override; 39 void SetCapsLockEnabled(bool enabled) override;
39 void SetNumLockEnabled(bool enabled) override; 40 void SetNumLockEnabled(bool enabled) override;
(...skipping 13 matching lines...) Expand all
53 void SetTapToClickPaused(bool state) override; 54 void SetTapToClickPaused(bool state) override;
54 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply) override; 55 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply) override;
55 void DisableInternalTouchpad() override; 56 void DisableInternalTouchpad() override;
56 void EnableInternalTouchpad() override; 57 void EnableInternalTouchpad() override;
57 void DisableInternalKeyboardExceptKeys( 58 void DisableInternalKeyboardExceptKeys(
58 scoped_ptr<std::set<DomCode>> excepted_keys) override; 59 scoped_ptr<std::set<DomCode>> excepted_keys) override;
59 void EnableInternalKeyboard() override; 60 void EnableInternalKeyboard() override;
60 61
61 private: 62 private:
62 // Factory for devices. Needed to update device config. 63 // Factory for devices. Needed to update device config.
63 InputDeviceFactoryEvdev* input_device_factory_; 64 InputDeviceFactoryEvdevProxy* input_device_factory_;
64 65
65 // Keyboard state. 66 // Keyboard state.
66 KeyboardEvdev* keyboard_; 67 KeyboardEvdev* keyboard_;
67 68
68 // Mouse button map. 69 // Mouse button map.
69 MouseButtonMapEvdev* button_map_; 70 MouseButtonMapEvdev* button_map_;
70 71
71 // Device presence. 72 // Device presence.
72 bool has_mouse_; 73 bool has_mouse_;
73 bool has_touchpad_; 74 bool has_touchpad_;
74 75
75 DISALLOW_COPY_AND_ASSIGN(InputControllerEvdev); 76 DISALLOW_COPY_AND_ASSIGN(InputControllerEvdev);
76 }; 77 };
77 78
78 } // namespace ui 79 } // namespace ui
79 80
80 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ 81 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/event_factory_evdev.cc ('k') | ui/events/ozone/evdev/input_controller_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698