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

Side by Side Diff: ash/system/chromeos/rotation/tray_rotation_lock.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
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/system/chromeos/rotation/tray_rotation_lock.h" 5 #include "ash/system/chromeos/rotation/tray_rotation_lock.h"
6 6
7 #include "ash/common/system/tray/actionable_view.h" 7 #include "ash/common/system/tray/actionable_view.h"
8 #include "ash/common/system/tray/system_tray.h" 8 #include "ash/common/system/tray/system_tray.h"
9 #include "ash/common/system/tray/tray_constants.h" 9 #include "ash/common/system/tray/tray_constants.h"
10 #include "ash/common/system/tray/tray_popup_item_style.h" 10 #include "ash/common/system/tray/tray_popup_item_style.h"
11 #include "ash/common/system/tray/tray_popup_utils.h" 11 #include "ash/common/system/tray/tray_popup_utils.h"
12 #include "ash/common/system/tray/tri_view.h" 12 #include "ash/common/system/tray/tri_view.h"
13 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 13 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
14 #include "ash/common/wm_shell.h"
15 #include "ash/display/screen_orientation_controller_chromeos.h" 14 #include "ash/display/screen_orientation_controller_chromeos.h"
16 #include "ash/resources/vector_icons/vector_icons.h" 15 #include "ash/resources/vector_icons/vector_icons.h"
17 #include "ash/shell.h" 16 #include "ash/shell.h"
18 #include "ash/strings/grit/ash_strings.h" 17 #include "ash/strings/grit/ash_strings.h"
19 #include "ui/accessibility/ax_node_data.h" 18 #include "ui/accessibility/ax_node_data.h"
20 #include "ui/base/l10n/l10n_util.h" 19 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/display/display.h" 20 #include "ui/display/display.h"
22 #include "ui/gfx/paint_vector_icon.h" 21 #include "ui/gfx/paint_vector_icon.h"
23 #include "ui/views/controls/image_view.h" 22 #include "ui/views/controls/image_view.h"
24 #include "ui/views/controls/label.h" 23 #include "ui/views/controls/label.h"
25 #include "ui/views/layout/fill_layout.h" 24 #include "ui/views/layout/fill_layout.h"
26 25
27 namespace ash { 26 namespace ash {
28 27
29 namespace { 28 namespace {
30 29
31 bool IsMaximizeModeWindowManagerEnabled() { 30 bool IsMaximizeModeWindowManagerEnabled() {
32 return WmShell::Get() 31 return Shell::Get()
33 ->maximize_mode_controller() 32 ->maximize_mode_controller()
34 ->IsMaximizeModeWindowManagerEnabled(); 33 ->IsMaximizeModeWindowManagerEnabled();
35 } 34 }
36 35
37 bool IsRotationLocked() { 36 bool IsRotationLocked() {
38 return Shell::GetInstance() 37 return Shell::GetInstance()
39 ->screen_orientation_controller() 38 ->screen_orientation_controller()
40 ->rotation_locked(); 39 ->rotation_locked();
41 } 40 }
42 41
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 209 }
211 210
212 void TrayRotationLock::StopObservingRotation() { 211 void TrayRotationLock::StopObservingRotation() {
213 ScreenOrientationController* controller = 212 ScreenOrientationController* controller =
214 Shell::GetInstance()->screen_orientation_controller(); 213 Shell::GetInstance()->screen_orientation_controller();
215 if (controller) 214 if (controller)
216 controller->RemoveObserver(this); 215 controller->RemoveObserver(this);
217 } 216 }
218 217
219 } // namespace ash 218 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698