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

Side by Side Diff: ash/test/ash_test_base.cc

Issue 19945004: Modal window in user session not blocks user adding screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test/ash_test_base.h" 5 #include "ash/test/ash_test_base.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { 282 void AshTestBase::SetUserLoggedIn(bool user_logged_in) {
283 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> 283 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
284 SetHasActiveUser(user_logged_in); 284 SetHasActiveUser(user_logged_in);
285 } 285 }
286 286
287 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { 287 void AshTestBase::SetCanLockScreen(bool can_lock_screen) {
288 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> 288 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
289 SetCanLockScreen(can_lock_screen); 289 SetCanLockScreen(can_lock_screen);
290 } 290 }
291 291
292 void AshTestBase::SetUserAddingScreenRunning(bool user_adding_screen_running) {
293 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
294 SetUserAddingScreenRunning(user_adding_screen_running);
295 }
296
297 void AshTestBase::BlockUserSession(UserSessionBlockReason block_reason) {
298 switch (block_reason) {
299 case BLOCKED_BY_LOCK_SCREEN:
300 SetSessionStarted(true);
301 SetUserAddingScreenRunning(false);
302 Shell::GetInstance()->session_state_delegate()->LockScreen();
303 break;
304 case BLOCKED_BY_LOGIN_SCREEN:
305 SetUserAddingScreenRunning(false);
306 SetSessionStarted(false);
307 break;
308 case BLOCKED_BY_USER_ADDING_SCREEN:
309 SetUserAddingScreenRunning(true);
310 SetSessionStarted(true);
311 default:
312 NOTREACHED();
313 break;
314 }
315 }
316
317 void AshTestBase::UnblockUserSession() {
318 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
319 SetSessionStarted(true);
320 SetUserAddingScreenRunning(false);
321 }
322
323
292 } // namespace test 324 } // namespace test
293 } // namespace ash 325 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698