OLD | NEW |
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_DEVICE_DATA_MANAGER_H_ | 5 #ifndef UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_ |
6 #define UI_EVENTS_DEVICE_DATA_MANAGER_H_ | 6 #define UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "ui/events/device_hotplug_event_observer.h" | 15 #include "ui/events/devices/device_hotplug_event_observer.h" |
16 #include "ui/events/events_base_export.h" | 16 #include "ui/events/devices/events_devices_export.h" |
17 #include "ui/events/keyboard_device.h" | 17 #include "ui/events/devices/keyboard_device.h" |
18 #include "ui/events/touchscreen_device.h" | 18 #include "ui/events/devices/touchscreen_device.h" |
19 #include "ui/gfx/transform.h" | 19 #include "ui/gfx/transform.h" |
20 | 20 |
21 namespace ui { | 21 namespace ui { |
22 | 22 |
23 class InputDeviceEventObserver; | 23 class InputDeviceEventObserver; |
24 | 24 |
25 // Keeps track of device mappings and event transformations. | 25 // Keeps track of device mappings and event transformations. |
26 class EVENTS_BASE_EXPORT DeviceDataManager : public DeviceHotplugEventObserver { | 26 class EVENTS_DEVICES_EXPORT DeviceDataManager |
| 27 : public DeviceHotplugEventObserver { |
27 public: | 28 public: |
28 static const int kMaxDeviceNum = 128; | 29 static const int kMaxDeviceNum = 128; |
29 ~DeviceDataManager() override; | 30 ~DeviceDataManager() override; |
30 | 31 |
31 static void CreateInstance(); | 32 static void CreateInstance(); |
32 static DeviceDataManager* GetInstance(); | 33 static DeviceDataManager* GetInstance(); |
33 static bool HasInstance(); | 34 static bool HasInstance(); |
34 | 35 |
35 void ClearTouchTransformerRecord(); | 36 void ClearTouchTransformerRecord(); |
36 void UpdateTouchInfoForDisplay(int64_t display_id, | 37 void UpdateTouchInfoForDisplay(int64_t display_id, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 std::vector<TouchscreenDevice> touchscreen_devices_; | 80 std::vector<TouchscreenDevice> touchscreen_devices_; |
80 std::vector<KeyboardDevice> keyboard_devices_; | 81 std::vector<KeyboardDevice> keyboard_devices_; |
81 | 82 |
82 ObserverList<InputDeviceEventObserver> observers_; | 83 ObserverList<InputDeviceEventObserver> observers_; |
83 | 84 |
84 DISALLOW_COPY_AND_ASSIGN(DeviceDataManager); | 85 DISALLOW_COPY_AND_ASSIGN(DeviceDataManager); |
85 }; | 86 }; |
86 | 87 |
87 } // namespace ui | 88 } // namespace ui |
88 | 89 |
89 #endif // UI_EVENTS_DEVICE_DATA_MANAGER_H_ | 90 #endif // UI_EVENTS_DEVICES_DEVICE_DATA_MANAGER_H_ |
OLD | NEW |