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

Side by Side Diff: ui/events/ozone/evdev/input_device_factory_evdev_proxy.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_DEVICE_FACTORY_PROXY_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
16 16
17 namespace ui { 17 namespace ui {
18 18
19 enum class DomCode; 19 enum class DomCode;
20 class InputDeviceFactoryEvdev; 20 class InputDeviceFactoryEvdev;
21 struct InputDeviceSettingsEvdev;
21 22
22 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply; 23 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply;
23 24
24 // Thread safe proxy for InputDeviceFactoryEvdev. 25 // Thread safe proxy for InputDeviceFactoryEvdev.
25 // 26 //
26 // This is used on the UI thread to proxy calls to the real object on 27 // This is used on the UI thread to proxy calls to the real object on
27 // the device I/O thread. 28 // the device I/O thread.
28 class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryEvdevProxy { 29 class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryEvdevProxy {
29 public: 30 public:
30 InputDeviceFactoryEvdevProxy( 31 InputDeviceFactoryEvdevProxy(
31 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 32 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
32 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory); 33 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory);
33 ~InputDeviceFactoryEvdevProxy(); 34 ~InputDeviceFactoryEvdevProxy();
34 35
35 // See InputDeviceFactoryEvdev for docs. These calls simply forward to 36 // See InputDeviceFactoryEvdev for docs. These calls simply forward to
36 // that object on another thread. 37 // that object on another thread.
37 void AddInputDevice(int id, const base::FilePath& path); 38 void AddInputDevice(int id, const base::FilePath& path);
38 void RemoveInputDevice(const base::FilePath& path); 39 void RemoveInputDevice(const base::FilePath& path);
39 void DisableInternalTouchpad(); 40 void DisableInternalTouchpad();
40 void EnableInternalTouchpad(); 41 void EnableInternalTouchpad();
41 void DisableInternalKeyboardExceptKeys( 42 void DisableInternalKeyboardExceptKeys(
42 scoped_ptr<std::set<DomCode>> excepted_keys); 43 scoped_ptr<std::set<DomCode>> excepted_keys);
43 void EnableInternalKeyboard(); 44 void EnableInternalKeyboard();
44 void SetTouchpadSensitivity(int value); 45 void UpdateInputDeviceSettings(const InputDeviceSettingsEvdev& settings);
45 void SetTapToClick(bool enabled);
46 void SetThreeFingerClick(bool enabled);
47 void SetTapDragging(bool enabled);
48 void SetNaturalScroll(bool enabled);
49 void SetMouseSensitivity(int value);
50 void SetTapToClickPaused(bool state);
51 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply); 46 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply);
52 47
53 private: 48 private:
54 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 49 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
55 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory_; 50 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory_;
56 51
57 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdevProxy); 52 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdevProxy);
58 }; 53 };
59 54
60 } // namespace ui 55 } // namespace ui
61 56
62 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_ 57 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/input_device_factory_evdev.cc ('k') | ui/events/ozone/evdev/input_device_factory_evdev_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698