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

Side by Side Diff: ui/display/manager/chromeos/default_touch_transform_setter.cc

Issue 2887413004: chromeos: moves setting of touch state to a separate class (Closed)
Patch Set: feedback Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/display/manager/chromeos/default_touch_transform_setter.h"
6
7 #include "ui/display/manager/chromeos/touch_device_transform.h"
8 #include "ui/events/devices/device_data_manager.h"
9
10 namespace display {
11
12 DefaultTouchTransformSetter::DefaultTouchTransformSetter() = default;
13
14 DefaultTouchTransformSetter::~DefaultTouchTransformSetter() = default;
15
16 void DefaultTouchTransformSetter::ConfigureTouchDevices(
17 const std::map<int32_t, double>& scales,
18 const std::vector<TouchDeviceTransform>& transforms) {
19 ui::DeviceDataManager* device_manager = ui::DeviceDataManager::GetInstance();
20 device_manager->ClearTouchDeviceAssociations();
21 for (auto& device_scale_pair : scales) {
22 device_manager->UpdateTouchRadiusScale(device_scale_pair.first,
23 device_scale_pair.second);
24 }
25 for (const TouchDeviceTransform& transform : transforms) {
26 device_manager->UpdateTouchInfoForDisplay(
27 transform.display_id, transform.device_id, transform.transform);
28 }
29 }
30
31 } // namespace display
OLDNEW
« no previous file with comments | « ui/display/manager/chromeos/default_touch_transform_setter.h ('k') | ui/display/manager/chromeos/touch_device_transform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698