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

Unified Diff: ash/display/screen_orientation_controller_chromeos.cc

Issue 2112013002: Allow arc app to lock screen orientation in TouchView/Tablet mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
Index: ash/display/screen_orientation_controller_chromeos.cc
diff --git a/ash/display/screen_orientation_controller_chromeos.cc b/ash/display/screen_orientation_controller_chromeos.cc
index 3bbb8c55a912650a275c3d608d10efa390e24daa..285cf5c414c131ee38a16004538d4553f9b93875 100644
--- a/ash/display/screen_orientation_controller_chromeos.cc
+++ b/ash/display/screen_orientation_controller_chromeos.cc
@@ -112,6 +112,15 @@ void ScreenOrientationController::UnlockOrientationForWindow(
ApplyLockForActiveWindow();
}
+void ScreenOrientationController::UnlockAll() {
+ for (auto pair : locking_windows_)
+ pair.first->RemoveObserver(this);
+ locking_windows_.clear();
+ Shell::GetInstance()->activation_client()->RemoveObserver(this);
+ if (user_rotation_ != current_rotation_)
+ SetDisplayRotation(user_rotation_, display::Display::ROTATION_SOURCE_USER);
oshima 2016/06/30 22:59:24 We're unlocking all, not just arc windows, but I b
+}
+
bool ScreenOrientationController::ScreenOrientationProviderSupported() const {
return Shell::GetInstance()
->maximize_mode_controller()

Powered by Google App Engine
This is Rietveld 408576698