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

Side by Side Diff: ui/events/ozone/evdev/input_device_factory_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_DEVICE_FACTORY_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "base/task_runner.h" 16 #include "base/task_runner.h"
17 #include "ui/events/ozone/evdev/event_converter_evdev.h" 17 #include "ui/events/ozone/evdev/event_converter_evdev.h"
18 #include "ui/events/ozone/evdev/event_device_info.h" 18 #include "ui/events/ozone/evdev/event_device_info.h"
19 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h" 19 #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
20 20
21 namespace ui { 21 namespace ui {
22 22
23 class CursorDelegateEvdev; 23 class CursorDelegateEvdev;
24 class DeviceEventDispatcherEvdev; 24 class DeviceEventDispatcherEvdev;
25 class InputDeviceFactoryEvdevProxy;
25 26
26 #if !defined(USE_EVDEV) 27 #if !defined(USE_EVDEV)
27 #error Missing dependency on ui/events/ozone:events_ozone_evdev 28 #error Missing dependency on ui/events/ozone:events_ozone_evdev
28 #endif 29 #endif
29 30
30 #if defined(USE_EVDEV_GESTURES) 31 #if defined(USE_EVDEV_GESTURES)
31 class GesturePropertyProvider; 32 class GesturePropertyProvider;
32 #endif 33 #endif
33 34
34 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply; 35 typedef base::Callback<void(scoped_ptr<std::string>)> GetTouchDeviceStatusReply;
(...skipping 27 matching lines...) Expand all
62 // Bits from InputController that have to be answered on IO. 63 // Bits from InputController that have to be answered on IO.
63 void SetTouchpadSensitivity(int value); 64 void SetTouchpadSensitivity(int value);
64 void SetTapToClick(bool enabled); 65 void SetTapToClick(bool enabled);
65 void SetThreeFingerClick(bool enabled); 66 void SetThreeFingerClick(bool enabled);
66 void SetTapDragging(bool enabled); 67 void SetTapDragging(bool enabled);
67 void SetNaturalScroll(bool enabled); 68 void SetNaturalScroll(bool enabled);
68 void SetMouseSensitivity(int value); 69 void SetMouseSensitivity(int value);
69 void SetTapToClickPaused(bool state); 70 void SetTapToClickPaused(bool state);
70 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply); 71 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply);
71 72
73 base::WeakPtr<InputDeviceFactoryEvdev> GetWeakPtr();
74
72 private: 75 private:
73 // Open device at path & starting processing events (on UI thread). 76 // Open device at path & starting processing events (on UI thread).
74 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter); 77 void AttachInputDevice(scoped_ptr<EventConverterEvdev> converter);
75 78
76 // Close device at path (on UI thread). 79 // Close device at path (on UI thread).
77 void DetachInputDevice(const base::FilePath& file_path); 80 void DetachInputDevice(const base::FilePath& file_path);
78 81
79 // Update observers on device changes. 82 // Update observers on device changes.
80 void NotifyDeviceChange(const EventConverterEvdev& converter); 83 void NotifyDeviceChange(const EventConverterEvdev& converter);
81 void NotifyKeyboardsUpdated(); 84 void NotifyKeyboardsUpdated();
(...skipping 27 matching lines...) Expand all
109 112
110 // Support weak pointers for attach & detach callbacks. 113 // Support weak pointers for attach & detach callbacks.
111 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_; 114 base::WeakPtrFactory<InputDeviceFactoryEvdev> weak_ptr_factory_;
112 115
113 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev); 116 DISALLOW_COPY_AND_ASSIGN(InputDeviceFactoryEvdev);
114 }; 117 };
115 118
116 } // namespace ui 119 } // namespace ui
117 120
118 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_ 121 #endif // UI_EVENTS_OZONE_EVDEV_INPUT_DEVICE_FACTORY_EVDEV_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/input_controller_evdev.cc ('k') | ui/events/ozone/evdev/input_device_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698