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

Unified Diff: ash/touch/ash_touch_transform_controller.cc

Issue 2617043003: Move TouchTransformerController to ui/display/. (Closed)
Patch Set: Make DEPS for one file. Created 3 years, 11 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
« no previous file with comments | « ash/touch/ash_touch_transform_controller.h ('k') | ash/touch/touch_transformer_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/touch/ash_touch_transform_controller.cc
diff --git a/ash/touch/ash_touch_transform_controller.cc b/ash/touch/ash_touch_transform_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bc7be76c28e7afc10a5e18ea35a84b36cd650090
--- /dev/null
+++ b/ash/touch/ash_touch_transform_controller.cc
@@ -0,0 +1,31 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/touch/ash_touch_transform_controller.h"
+
+#include "ash/shell.h"
+#include "ui/display/manager/display_manager.h"
+
+namespace ash {
+
+AshTouchTransformController::AshTouchTransformController(
+ display::DisplayConfigurator* display_configurator,
+ display::DisplayManager* display_manager)
+ : TouchTransformController(display_configurator, display_manager) {
+ Shell::GetInstance()->window_tree_host_manager()->AddObserver(this);
+}
+
+AshTouchTransformController::~AshTouchTransformController() {
+ Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this);
+}
+
+void AshTouchTransformController::OnDisplaysInitialized() {
+ UpdateTouchTransforms();
+}
+
+void AshTouchTransformController::OnDisplayConfigurationChanged() {
+ UpdateTouchTransforms();
+}
+
+} // namespace ash
« no previous file with comments | « ash/touch/ash_touch_transform_controller.h ('k') | ash/touch/touch_transformer_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698