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/session_state_delegate_stub.h" | 5 #include "ash/session_state_delegate_stub.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell/example_factory.h" | 8 #include "ash/shell/example_factory.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 30 matching lines...) Expand all Loading... |
41 shell::CreateLockScreen(); | 41 shell::CreateLockScreen(); |
42 screen_locked_ = true; | 42 screen_locked_ = true; |
43 Shell::GetInstance()->UpdateShelfVisibility(); | 43 Shell::GetInstance()->UpdateShelfVisibility(); |
44 } | 44 } |
45 | 45 |
46 void SessionStateDelegateStub::UnlockScreen() { | 46 void SessionStateDelegateStub::UnlockScreen() { |
47 screen_locked_ = false; | 47 screen_locked_ = false; |
48 Shell::GetInstance()->UpdateShelfVisibility(); | 48 Shell::GetInstance()->UpdateShelfVisibility(); |
49 } | 49 } |
50 | 50 |
| 51 bool SessionStateDelegateStub::IsUserSessionBlocked() const { |
| 52 return !IsActiveUserSessionStarted() || IsScreenLocked(); |
| 53 } |
| 54 |
51 const base::string16 SessionStateDelegateStub::GetUserDisplayName( | 55 const base::string16 SessionStateDelegateStub::GetUserDisplayName( |
52 MultiProfileIndex index) const { | 56 MultiProfileIndex index) const { |
53 return UTF8ToUTF16("stub-user"); | 57 return UTF8ToUTF16("stub-user"); |
54 } | 58 } |
55 | 59 |
56 const std::string SessionStateDelegateStub::GetUserEmail( | 60 const std::string SessionStateDelegateStub::GetUserEmail( |
57 MultiProfileIndex index) const { | 61 MultiProfileIndex index) const { |
58 return "stub-user@domain.com"; | 62 return "stub-user@domain.com"; |
59 } | 63 } |
60 | 64 |
(...skipping 10 matching lines...) Expand all Loading... |
71 | 75 |
72 void SessionStateDelegateStub::AddSessionStateObserver( | 76 void SessionStateDelegateStub::AddSessionStateObserver( |
73 ash::SessionStateObserver* observer) { | 77 ash::SessionStateObserver* observer) { |
74 } | 78 } |
75 | 79 |
76 void SessionStateDelegateStub::RemoveSessionStateObserver( | 80 void SessionStateDelegateStub::RemoveSessionStateObserver( |
77 ash::SessionStateObserver* observer) { | 81 ash::SessionStateObserver* observer) { |
78 } | 82 } |
79 | 83 |
80 } // namespace ash | 84 } // namespace ash |
OLD | NEW |