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

Side by Side Diff: ash/system/chromeos/rotation/tray_rotation_lock.cc

Issue 2041233005: Moves ash::user::LoginStatus to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test 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 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/display/screen_orientation_controller_chromeos.h" 7 #include "ash/display/screen_orientation_controller_chromeos.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
10 #include "ash/system/tray/tray_item_more.h" 10 #include "ash/system/tray/tray_item_more.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 TrayRotationLock::~TrayRotationLock() { 104 TrayRotationLock::~TrayRotationLock() {
105 StopObservingShell(); 105 StopObservingShell();
106 } 106 }
107 107
108 void TrayRotationLock::OnRotationLockChanged(bool rotation_locked) { 108 void TrayRotationLock::OnRotationLockChanged(bool rotation_locked) {
109 tray_view()->SetVisible(ShouldBeVisible()); 109 tray_view()->SetVisible(ShouldBeVisible());
110 } 110 }
111 111
112 views::View* TrayRotationLock::CreateDefaultView(user::LoginStatus status) { 112 views::View* TrayRotationLock::CreateDefaultView(LoginStatus status) {
113 if (OnPrimaryDisplay()) 113 if (OnPrimaryDisplay())
114 return new tray::RotationLockDefaultView(this); 114 return new tray::RotationLockDefaultView(this);
115 return NULL; 115 return NULL;
116 } 116 }
117 117
118 void TrayRotationLock::OnMaximizeModeStarted() { 118 void TrayRotationLock::OnMaximizeModeStarted() {
119 tray_view()->SetVisible( 119 tray_view()->SetVisible(
120 Shell::GetInstance()->screen_orientation_controller()->rotation_locked()); 120 Shell::GetInstance()->screen_orientation_controller()->rotation_locked());
121 Shell::GetInstance()->screen_orientation_controller()->AddObserver(this); 121 Shell::GetInstance()->screen_orientation_controller()->AddObserver(this);
122 observing_rotation_ = true; 122 observing_rotation_ = true;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 void TrayRotationLock::StopObservingShell() { 167 void TrayRotationLock::StopObservingShell() {
168 if (!observing_shell_) 168 if (!observing_shell_)
169 return; 169 return;
170 Shell::GetInstance()->RemoveShellObserver(this); 170 Shell::GetInstance()->RemoveShellObserver(this);
171 observing_shell_ = false; 171 observing_shell_ = false;
172 } 172 }
173 173
174 } // namespace ash 174 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/rotation/tray_rotation_lock.h ('k') | ash/system/chromeos/screen_security/screen_capture_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698