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

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: 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
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..e23d92ad5f672d4758ef5cfc2c52abe0a245ff4e 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::touchscreen_devices()
+ const {
+ return touchscreen_devices_;
+}
+
+const std::vector<InputDevice>& DeviceDataManager::keyboard_devices() const {
+ return keyboard_devices_;
+}
+
+const std::vector<InputDevice>& DeviceDataManager::mouse_devices() const {
+ return mouse_devices_;
+}
+
+const std::vector<InputDevice>& DeviceDataManager::touchpad_devices() const {
+ return touchpad_devices_;
+}
+
+bool DeviceDataManager::device_lists_complete() const {
+ return device_lists_complete_;
+}
+
int64_t DeviceDataManager::GetTargetDisplayForTouchDevice(
int touch_device_id) const {
if (IsTouchDeviceIdValid(touch_device_id))

Powered by Google App Engine
This is Rietveld 408576698