| OLD | NEW |
| 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/test/test_session_state_delegate.h" | 5 #include "ash/test/test_session_state_delegate.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/user/login_status.h" | 8 #include "ash/system/user/login_status.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void TestSessionStateDelegate::LockScreen() { | 47 void TestSessionStateDelegate::LockScreen() { |
| 48 if (CanLockScreen()) | 48 if (CanLockScreen()) |
| 49 screen_locked_ = true; | 49 screen_locked_ = true; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void TestSessionStateDelegate::UnlockScreen() { | 52 void TestSessionStateDelegate::UnlockScreen() { |
| 53 screen_locked_ = false; | 53 screen_locked_ = false; |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool TestSessionStateDelegate::IsUserSessionBlocked() const { |
| 57 return !IsActiveUserSessionStarted() || IsScreenLocked(); |
| 58 } |
| 59 |
| 56 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { | 60 void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) { |
| 57 has_active_user_ = has_active_user; | 61 has_active_user_ = has_active_user; |
| 58 if (!has_active_user) | 62 if (!has_active_user) |
| 59 active_user_session_started_ = false; | 63 active_user_session_started_ = false; |
| 60 else | 64 else |
| 61 Shell::GetInstance()->ShowLauncher(); | 65 Shell::GetInstance()->ShowLauncher(); |
| 62 } | 66 } |
| 63 | 67 |
| 64 void TestSessionStateDelegate::SetActiveUserSessionStarted( | 68 void TestSessionStateDelegate::SetActiveUserSessionStarted( |
| 65 bool active_user_session_started) { | 69 bool active_user_session_started) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void TestSessionStateDelegate::AddSessionStateObserver( | 110 void TestSessionStateDelegate::AddSessionStateObserver( |
| 107 SessionStateObserver* observer) { | 111 SessionStateObserver* observer) { |
| 108 } | 112 } |
| 109 | 113 |
| 110 void TestSessionStateDelegate::RemoveSessionStateObserver( | 114 void TestSessionStateDelegate::RemoveSessionStateObserver( |
| 111 SessionStateObserver* observer) { | 115 SessionStateObserver* observer) { |
| 112 } | 116 } |
| 113 | 117 |
| 114 } // namespace test | 118 } // namespace test |
| 115 } // namespace ash | 119 } // namespace ash |
| OLD | NEW |