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

Side by Side Diff: ui/events/ozone/evdev/input_device_factory_proxy_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: 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
7
8 #include <set>
9
10 #include "base/compiler_specific.h"
11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/single_thread_task_runner.h"
15 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
16
17 namespace ui {
18
19 enum class DomCode;
20 class InputDeviceFactoryEvdev;
21
22 // UI-thread proxy for InputDeviceFactoryEvdev.
23 class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryProxyEvdev {
24 public:
25 InputDeviceFactoryProxyEvdev(
26 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
27 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory);
28 ~InputDeviceFactoryProxyEvdev();
29
30 // See InputDeviceFactoryEvdev for docs. These calls simply forward to
31 // that object on another thread.
32 void AddInputDevice(int id, const base::FilePath& path);
33 void RemoveInputDevice(const base::FilePath& path);
34 void DisableInternalTouchpad();
35 void EnableInternalTouchpad();
36 void DisableInternalKeyboardExceptKeys(
37 scoped_ptr<std::set<DomCode>> excepted_keys);
38 void EnableInternalKeyboard();
39 void SetTouchpadSensitivity(int value);
40 void SetTapToClick(bool enabled);
41 void SetThreeFingerClick(bool enabled);
42 void SetTapDragging(bool enabled);
43 void SetNaturalScroll(bool enabled);
44 void SetMouseSensitivity(int value);
45 void SetTapToClickPaused(bool state);
46
47 private:
48 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
49 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory_;
50
51 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryProxyEvdev);
52 };
53
54 } // namespace ui
55
56 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_PROXY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698