| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/touch_transformer_controller.h" | 5 #include "ash/touch/touch_transformer_controller.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
| 9 #include "ash/host/ash_window_tree_host.h" | 9 #include "ash/host/ash_window_tree_host.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| 11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "ui/aura/window_tree_host.h" | 12 #include "ui/aura/window_tree_host.h" |
| 13 #include "ui/display/chromeos/display_configurator.h" | 13 #include "ui/display/chromeos/display_configurator.h" |
| 14 #include "ui/display/types/display_snapshot.h" | 14 #include "ui/display/types/display_snapshot.h" |
| 15 #include "ui/events/devices/device_data_manager.h" | 15 #include "ui/events/devices/device_data_manager.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 DisplayManager* GetDisplayManager() { | 21 DisplayManager* GetDisplayManager() { |
| 22 return Shell::GetInstance()->display_manager(); | 22 return Shell::GetInstance()->display_manager(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 ui::TouchscreenDevice FindTouchscreenById(unsigned int id) { | 25 ui::TouchscreenDevice FindTouchscreenById(int id) { |
| 26 const std::vector<ui::TouchscreenDevice>& touchscreens = | 26 const std::vector<ui::TouchscreenDevice>& touchscreens = |
| 27 ui::DeviceDataManager::GetInstance()->touchscreen_devices(); | 27 ui::DeviceDataManager::GetInstance()->touchscreen_devices(); |
| 28 for (const auto& touchscreen : touchscreens) { | 28 for (const auto& touchscreen : touchscreens) { |
| 29 if (touchscreen.id == id) | 29 if (touchscreen.id == id) |
| 30 return touchscreen; | 30 return touchscreen; |
| 31 } | 31 } |
| 32 | 32 |
| 33 return ui::TouchscreenDevice(); | 33 return ui::TouchscreenDevice(); |
| 34 } | 34 } |
| 35 | 35 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 void TouchTransformerController::OnDisplaysInitialized() { | 237 void TouchTransformerController::OnDisplaysInitialized() { |
| 238 UpdateTouchTransformer(); | 238 UpdateTouchTransformer(); |
| 239 } | 239 } |
| 240 | 240 |
| 241 void TouchTransformerController::OnDisplayConfigurationChanged() { | 241 void TouchTransformerController::OnDisplayConfigurationChanged() { |
| 242 UpdateTouchTransformer(); | 242 UpdateTouchTransformer(); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace ash | 245 } // namespace ash |
| OLD | NEW |