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

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

Issue 922843002: Fix software mirror mode on Ozone part 2/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 eb96c46478924f00385b6a865bb33b1580ac7411..99ca20c1ccfbb49754b865edf870260aefe4a8ed 100644
--- a/ui/events/devices/device_data_manager.cc
+++ b/ui/events/devices/device_data_manager.cc
@@ -33,6 +33,7 @@ DeviceDataManager::DeviceDataManager() {
for (int i = 0; i < kMaxDeviceNum; ++i) {
touch_device_to_display_map_[i] = gfx::Display::kInvalidDisplayID;
+ touch_device_to_target_display_map_[i] = gfx::Display::kInvalidDisplayID;
touch_radius_scale_map_[i] = 1.0;
}
}
@@ -119,6 +120,20 @@ int64_t DeviceDataManager::GetDisplayForTouchDevice(
return gfx::Display::kInvalidDisplayID;
}
+void DeviceDataManager::SetTargetDisplayForTouchDevice(
+ unsigned int touch_device_id,
+ int64_t target_display_id) {
+ if (IsTouchDeviceIdValid(touch_device_id))
+ touch_device_to_target_display_map_[touch_device_id] = target_display_id;
+}
+
+int64_t DeviceDataManager::GetTargetDisplayForTouchDevice(
+ unsigned int touch_device_id) {
+ if (IsTouchDeviceIdValid(touch_device_id))
+ return touch_device_to_target_display_map_[touch_device_id];
+ return gfx::Display::kInvalidDisplayID;
+}
+
void DeviceDataManager::OnTouchscreenDevicesUpdated(
const std::vector<TouchscreenDevice>& devices) {
if (devices.size() == touchscreen_devices_.size() &&

Powered by Google App Engine
This is Rietveld 408576698