| OLD | NEW |
| 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 |
| OLD | NEW |