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

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

Issue 1287103004: Sync ui/events to chromium @ https://codereview.chromium.org/1210203002 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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 #include <vector>
10
11 #include "base/compiler_specific.h"
12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h"
15 #include "base/single_thread_task_runner.h"
16 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
17
18 namespace ui {
19
20 enum class DomCode;
21 class InputDeviceFactoryEvdev;
22 struct InputDeviceSettingsEvdev;
23
24 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply;
25 typedef base::Callback<void(scoped_ptr<std::vector<base::FilePath>>)>
26 GetTouchEventLogReply;
27
28 // Thread safe proxy for InputDeviceFactoryEvdev.
29 //
30 // This is used on the UI thread to proxy calls to the real object on
31 // the device I/O thread.
32 class EVENTS_OZONE_EVDEV_EXPORT InputDeviceFactoryEvdevProxy {
33 public:
34 InputDeviceFactoryEvdevProxy(
35 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
36 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory);
37 ~InputDeviceFactoryEvdevProxy();
38
39 // See InputDeviceFactoryEvdev for docs. These calls simply forward to
40 // that object on another thread.
41 void AddInputDevice(int id, const base::FilePath& path);
42 void RemoveInputDevice(const base::FilePath& path);
43 void OnStartupScanComplete();
44 void SetCapsLockLed(bool enabled);
45 void UpdateInputDeviceSettings(const InputDeviceSettingsEvdev& settings);
46 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply);
47 void GetTouchEventLog(const base::FilePath& out_dir,
48 const GetTouchEventLogReply& reply);
49
50 private:
51 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
52 base::WeakPtr<InputDeviceFactoryEvdev> input_device_factory_;
53
54 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdevProxy);
55 };
56
57 } // namespace ui
58
59 #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