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

Side by Side Diff: ash/display/screen_orientation_controller_chromeos.cc

Issue 2766543002: Move even more from WmShell to Shell (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « ash/display/display_util.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/display/screen_orientation_controller_chromeos.h" 5 #include "ash/display/screen_orientation_controller_chromeos.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 8 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 for (auto pair : locking_windows_) 113 for (auto pair : locking_windows_)
114 pair.first->aura_window()->RemoveObserver(this); 114 pair.first->aura_window()->RemoveObserver(this);
115 locking_windows_.clear(); 115 locking_windows_.clear();
116 Shell::GetInstance()->activation_client()->RemoveObserver(this); 116 Shell::GetInstance()->activation_client()->RemoveObserver(this);
117 SetRotationLocked(false); 117 SetRotationLocked(false);
118 if (user_rotation_ != current_rotation_) 118 if (user_rotation_ != current_rotation_)
119 SetDisplayRotation(user_rotation_, display::Display::ROTATION_SOURCE_USER); 119 SetDisplayRotation(user_rotation_, display::Display::ROTATION_SOURCE_USER);
120 } 120 }
121 121
122 bool ScreenOrientationController::ScreenOrientationProviderSupported() const { 122 bool ScreenOrientationController::ScreenOrientationProviderSupported() const {
123 return WmShell::Get() 123 return Shell::Get()
124 ->maximize_mode_controller() 124 ->maximize_mode_controller()
125 ->IsMaximizeModeWindowManagerEnabled() && 125 ->IsMaximizeModeWindowManagerEnabled() &&
126 !base::CommandLine::ForCurrentProcess()->HasSwitch( 126 !base::CommandLine::ForCurrentProcess()->HasSwitch(
127 switches::kAshDisableScreenOrientationLock); 127 switches::kAshDisableScreenOrientationLock);
128 } 128 }
129 129
130 void ScreenOrientationController::SetRotationLocked(bool rotation_locked) { 130 void ScreenOrientationController::SetRotationLocked(bool rotation_locked) {
131 if (rotation_locked_ == rotation_locked) 131 if (rotation_locked_ == rotation_locked)
132 return; 132 return;
133 rotation_locked_ = rotation_locked; 133 rotation_locked_ = rotation_locked;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 421 }
422 422
423 bool ScreenOrientationController::CanRotateInLockedState() { 423 bool ScreenOrientationController::CanRotateInLockedState() {
424 return rotation_locked_orientation_ == 424 return rotation_locked_orientation_ ==
425 blink::WebScreenOrientationLockLandscape || 425 blink::WebScreenOrientationLockLandscape ||
426 rotation_locked_orientation_ == 426 rotation_locked_orientation_ ==
427 blink::WebScreenOrientationLockPortrait; 427 blink::WebScreenOrientationLockPortrait;
428 } 428 }
429 429
430 } // namespace ash 430 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_util.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698