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

Side by Side Diff: ash/common/test/test_session_state_delegate.cc

Issue 2619943002: Revert "chromeos: Fix shelf appearing at login screen under mash" (Closed)
Patch Set: Created 3 years, 11 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/common/shelf/shelf_widget.cc ('k') | ash/common/wm_root_window_controller.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/common/test/test_session_state_delegate.h" 5 #include "ash/common/test/test_session_state_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/common/login_status.h" 10 #include "ash/common/login_status.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 user_adding_screen_running_ || 154 user_adding_screen_running_ ||
155 session_state_ != session_manager::SessionState::ACTIVE; 155 session_state_ != session_manager::SessionState::ACTIVE;
156 } 156 }
157 157
158 session_manager::SessionState TestSessionStateDelegate::GetSessionState() 158 session_manager::SessionState TestSessionStateDelegate::GetSessionState()
159 const { 159 const {
160 return session_state_; 160 return session_state_;
161 } 161 }
162 162
163 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { 163 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) {
164 session_state_ = has_active_user 164 if (!has_active_user) {
165 ? session_manager::SessionState::ACTIVE 165 session_state_ = session_manager::SessionState::LOGIN_PRIMARY;
166 : session_manager::SessionState::LOGIN_PRIMARY; 166 } else {
167 session_state_ = session_manager::SessionState::ACTIVE;
168 WmShell::Get()->ShowShelf();
169 }
167 } 170 }
168 171
169 void TestSessionStateDelegate::SetActiveUserSessionStarted( 172 void TestSessionStateDelegate::SetActiveUserSessionStarted(
170 bool active_user_session_started) { 173 bool active_user_session_started) {
171 if (active_user_session_started) { 174 if (active_user_session_started) {
172 user_manager_->SessionStarted(); 175 user_manager_->SessionStarted();
173 session_state_ = session_manager::SessionState::ACTIVE; 176 session_state_ = session_manager::SessionState::ACTIVE;
174 WmShell::Get()->CreateShelf(); 177 WmShell::Get()->CreateShelf();
175 WmShell::Get()->UpdateAfterLoginStatusChange(LoginStatus::USER); 178 WmShell::Get()->UpdateAfterLoginStatusChange(LoginStatus::USER);
176 } else { 179 } else {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 247 }
245 248
246 void TestSessionStateDelegate::AddSessionStateObserver( 249 void TestSessionStateDelegate::AddSessionStateObserver(
247 SessionStateObserver* observer) {} 250 SessionStateObserver* observer) {}
248 251
249 void TestSessionStateDelegate::RemoveSessionStateObserver( 252 void TestSessionStateDelegate::RemoveSessionStateObserver(
250 SessionStateObserver* observer) {} 253 SessionStateObserver* observer) {}
251 254
252 } // namespace test 255 } // namespace test
253 } // namespace ash 256 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_widget.cc ('k') | ash/common/wm_root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698