| 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 "athena/screen/public/screen_manager.h" | 5 #include "athena/screen/public/screen_manager.h" |
| 6 #include "athena/system/orientation_controller.h" | 6 #include "athena/system/orientation_controller.h" |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | |
| 9 #include "base/files/file_path_watcher.h" | 8 #include "base/files/file_path_watcher.h" |
| 9 #include "base/files/file_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/task_runner.h" | 11 #include "base/task_runner.h" |
| 12 | 12 |
| 13 namespace athena { | 13 namespace athena { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 // Path of the socket which the sensor daemon creates. | 17 // Path of the socket which the sensor daemon creates. |
| 18 const char kSocketPath[] = "/dev/sensors/orientation"; | 18 const char kSocketPath[] = "/dev/sensors/orientation"; |
| 19 | 19 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 void OrientationController::RotateOnUI(gfx::Display::Rotation rotation) { | 149 void OrientationController::RotateOnUI(gfx::Display::Rotation rotation) { |
| 150 ScreenManager* screen_manager = ScreenManager::Get(); | 150 ScreenManager* screen_manager = ScreenManager::Get(); |
| 151 // Since this is called from the FILE thread, the screen manager may no longer | 151 // Since this is called from the FILE thread, the screen manager may no longer |
| 152 // exist. | 152 // exist. |
| 153 if (screen_manager) | 153 if (screen_manager) |
| 154 screen_manager->SetRotation(rotation); | 154 screen_manager->SetRotation(rotation); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace athena | 157 } // namespace athena |
| OLD | NEW |