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

Unified Diff: ui/events/devices/device_data_manager.cc

Issue 2028593004: Add new InputDeviceManager interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_keyboard
Patch Set: Fix windows compile error. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/devices/device_data_manager.h ('k') | ui/events/devices/events_devices.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/devices/device_data_manager.cc
diff --git a/ui/events/devices/device_data_manager.cc b/ui/events/devices/device_data_manager.cc
index 46d2029c725f4f9314f984b3b052b6551d1d0954..c733bd005de04209820209c340e09be12836c3df 100644
--- a/ui/events/devices/device_data_manager.cc
+++ b/ui/events/devices/device_data_manager.cc
@@ -41,9 +41,13 @@ void DeviceDataManager::TouchscreenInfo::Reset() {
// static
DeviceDataManager* DeviceDataManager::instance_ = nullptr;
-DeviceDataManager::DeviceDataManager() {}
+DeviceDataManager::DeviceDataManager() {
+ InputDeviceManager::SetInstance(this);
+}
-DeviceDataManager::~DeviceDataManager() {}
+DeviceDataManager::~DeviceDataManager() {
+ InputDeviceManager::ClearInstance();
+}
// static
DeviceDataManager* DeviceDataManager::instance() { return instance_; }
@@ -130,6 +134,27 @@ void DeviceDataManager::ApplyTouchTransformer(int touch_device_id,
}
}
+const std::vector<TouchscreenDevice>& DeviceDataManager::GetTouchscreenDevices()
+ const {
+ return touchscreen_devices_;
+}
+
+const std::vector<InputDevice>& DeviceDataManager::GetKeyboardDevices() const {
+ return keyboard_devices_;
+}
+
+const std::vector<InputDevice>& DeviceDataManager::GetMouseDevices() const {
+ return mouse_devices_;
+}
+
+const std::vector<InputDevice>& DeviceDataManager::GetTouchpadDevices() const {
+ return touchpad_devices_;
+}
+
+bool DeviceDataManager::AreDeviceListsComplete() const {
+ return device_lists_complete_;
+}
+
int64_t DeviceDataManager::GetTargetDisplayForTouchDevice(
int touch_device_id) const {
if (IsTouchDeviceIdValid(touch_device_id))
« no previous file with comments | « ui/events/devices/device_data_manager.h ('k') | ui/events/devices/events_devices.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698