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

Side by Side Diff: ash/touch/ash_touch_transform_controller.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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #include "ash/touch/ash_touch_transform_controller.h" 5 #include "ash/touch/ash_touch_transform_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ui/display/manager/chromeos/touch_transform_setter.h"
8 #include "ui/display/manager/display_manager.h" 9 #include "ui/display/manager/display_manager.h"
9 10
10 namespace ash { 11 namespace ash {
11 12
12 AshTouchTransformController::AshTouchTransformController( 13 AshTouchTransformController::AshTouchTransformController(
13 display::DisplayConfigurator* display_configurator, 14 display::DisplayConfigurator* display_configurator,
14 display::DisplayManager* display_manager) 15 display::DisplayManager* display_manager,
15 : TouchTransformController(display_configurator, display_manager) { 16 std::unique_ptr<display::TouchTransformSetter> setter)
17 : TouchTransformController(display_configurator,
18 display_manager,
19 std::move(setter)) {
16 Shell::Get()->window_tree_host_manager()->AddObserver(this); 20 Shell::Get()->window_tree_host_manager()->AddObserver(this);
17 } 21 }
18 22
19 AshTouchTransformController::~AshTouchTransformController() { 23 AshTouchTransformController::~AshTouchTransformController() {
20 Shell::Get()->window_tree_host_manager()->RemoveObserver(this); 24 Shell::Get()->window_tree_host_manager()->RemoveObserver(this);
21 } 25 }
22 26
23 void AshTouchTransformController::OnDisplaysInitialized() { 27 void AshTouchTransformController::OnDisplaysInitialized() {
24 UpdateTouchTransforms(); 28 UpdateTouchTransforms();
25 } 29 }
26 30
27 void AshTouchTransformController::OnDisplayConfigurationChanged() { 31 void AshTouchTransformController::OnDisplayConfigurationChanged() {
28 UpdateTouchTransforms(); 32 UpdateTouchTransforms();
29 } 33 }
30 34
31 } // namespace ash 35 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/ash_touch_transform_controller.h ('k') | services/ui/display/screen_manager_ozone_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698