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

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

Issue 956793002: ozone: evdev: Keep track of settings & apply to new devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 years, 9 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 "base/memory/weak_ptr.h"
11 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 12 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
13 #include "ui/events/ozone/evdev/input_device_settings_evdev.h"
12 #include "ui/ozone/public/input_controller.h" 14 #include "ui/ozone/public/input_controller.h"
13 15
14 namespace ui { 16 namespace ui {
15 17
16 class InputDeviceFactoryEvdevProxy; 18 class InputDeviceFactoryEvdevProxy;
17 class KeyboardEvdev; 19 class KeyboardEvdev;
18 class MouseButtonMapEvdev; 20 class MouseButtonMapEvdev;
19 21
20 // Ozone InputController implementation for the Linux input subsystem ("evdev"). 22 // Ozone InputController implementation for the Linux input subsystem ("evdev").
21 class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController { 23 class EVENTS_OZONE_EVDEV_EXPORT InputControllerEvdev : public InputController {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void SetPrimaryButtonRight(bool right) override; 55 void SetPrimaryButtonRight(bool right) override;
54 void SetTapToClickPaused(bool state) override; 56 void SetTapToClickPaused(bool state) override;
55 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply) override; 57 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply) override;
56 void DisableInternalTouchpad() override; 58 void DisableInternalTouchpad() override;
57 void EnableInternalTouchpad() override; 59 void EnableInternalTouchpad() override;
58 void DisableInternalKeyboardExceptKeys( 60 void DisableInternalKeyboardExceptKeys(
59 scoped_ptr<std::set<DomCode>> excepted_keys) override; 61 scoped_ptr<std::set<DomCode>> excepted_keys) override;
60 void EnableInternalKeyboard() override; 62 void EnableInternalKeyboard() override;
61 63
62 private: 64 private:
65 // Post task to update settings.
66 void ScheduleUpdateDeviceSettings();
67
68 // Send settings update to input_device_factory_.
69 void UpdateDeviceSettings();
70
71 // Configuration that needs to be passed on to InputDeviceFactory.
72 InputDeviceSettingsEvdev input_device_settings_;
73
74 // Task to update config from input_device_settings_ is pending.
75 bool settings_update_pending_;
76
63 // Factory for devices. Needed to update device config. 77 // Factory for devices. Needed to update device config.
64 InputDeviceFactoryEvdevProxy* input_device_factory_; 78 InputDeviceFactoryEvdevProxy* input_device_factory_;
65 79
66 // Keyboard state. 80 // Keyboard state.
67 KeyboardEvdev* keyboard_; 81 KeyboardEvdev* keyboard_;
68 82
69 // Mouse button map. 83 // Mouse button map.
70 MouseButtonMapEvdev* button_map_; 84 MouseButtonMapEvdev* button_map_;
71 85
72 // Device presence. 86 // Device presence.
73 bool has_mouse_; 87 bool has_mouse_;
74 bool has_touchpad_; 88 bool has_touchpad_;
75 89
90 base::WeakPtrFactory<InputControllerEvdev> weak_ptr_factory_;
91
76 DISALLOW_COPY_AND_ASSIGN(InputControllerEvdev); 92 DISALLOW_COPY_AND_ASSIGN(InputControllerEvdev);
77 }; 93 };
78 94
79 } // namespace ui 95 } // namespace ui
80 96
81 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_CONTROLLER_EVDEV_H_ 97 #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