| 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 #ifndef ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_CHROMEOS_H_ | 5 #ifndef ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_CHROMEOS_H_ |
| 6 #define ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_CHROMEOS_H_ | 6 #define ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Add/Remove observers. | 50 // Add/Remove observers. |
| 51 void AddObserver(Observer* observer); | 51 void AddObserver(Observer* observer); |
| 52 void RemoveObserver(Observer* observer); | 52 void RemoveObserver(Observer* observer); |
| 53 | 53 |
| 54 // Allows/unallows a window to lock the screen orientation. | 54 // Allows/unallows a window to lock the screen orientation. |
| 55 void LockOrientationForWindow( | 55 void LockOrientationForWindow( |
| 56 aura::Window* requesting_windowwindow, | 56 aura::Window* requesting_windowwindow, |
| 57 blink::WebScreenOrientationLockType lock_orientation); | 57 blink::WebScreenOrientationLockType lock_orientation); |
| 58 void UnlockOrientationForWindow(aura::Window* window); | 58 void UnlockOrientationForWindow(aura::Window* window); |
| 59 | 59 |
| 60 // Unlock all and set the rotation back to the user specified rotation. |
| 61 void UnlockAll(); |
| 62 |
| 60 bool ScreenOrientationProviderSupported() const; | 63 bool ScreenOrientationProviderSupported() const; |
| 61 | 64 |
| 62 bool ignore_display_configuration_updates() const { | 65 bool ignore_display_configuration_updates() const { |
| 63 return ignore_display_configuration_updates_; | 66 return ignore_display_configuration_updates_; |
| 64 } | 67 } |
| 65 | 68 |
| 66 // True if |rotation_lock_| has been set and accelerometer updates should not | 69 // True if |rotation_lock_| has been set and accelerometer updates should not |
| 67 // rotate the display. | 70 // rotate the display. |
| 68 bool rotation_locked() const { return rotation_locked_; } | 71 bool rotation_locked() const { return rotation_locked_; } |
| 69 | 72 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // Tracks all windows that have requested a lock, as well as the requested | 181 // Tracks all windows that have requested a lock, as well as the requested |
| 179 // orientation. | 182 // orientation. |
| 180 std::map<aura::Window*, blink::WebScreenOrientationLockType> locking_windows_; | 183 std::map<aura::Window*, blink::WebScreenOrientationLockType> locking_windows_; |
| 181 | 184 |
| 182 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationController); | 185 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationController); |
| 183 }; | 186 }; |
| 184 | 187 |
| 185 } // namespace ash | 188 } // namespace ash |
| 186 | 189 |
| 187 #endif // ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_CHROMEOS_H_ | 190 #endif // ASH_DISPLAY_SCREEN_ORIENTATION_CONTROLLER_CHROMEOS_H_ |
| OLD | NEW |