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/string16.h" | |
10 #include "base/utf_string_conversions.h" | |
9 | 11 |
10 namespace ash { | 12 namespace ash { |
11 | 13 |
12 SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) { | 14 SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) { |
13 } | 15 } |
14 | 16 |
15 SessionStateDelegateStub::~SessionStateDelegateStub() { | 17 SessionStateDelegateStub::~SessionStateDelegateStub() { |
16 } | 18 } |
17 | 19 |
18 bool SessionStateDelegateStub::HasActiveUser() const { | 20 int SessionStateDelegateStub::GetMaximumNumberOfLoggedInUsers() const { |
19 return true; | 21 return 3; |
22 } | |
23 | |
24 int SessionStateDelegateStub::NumberOfLoggedInUsers() const { | |
25 return 1; | |
20 } | 26 } |
21 | 27 |
22 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const { | 28 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const { |
23 return true; | 29 return true; |
24 } | 30 } |
25 | 31 |
26 bool SessionStateDelegateStub::CanLockScreen() const { | 32 bool SessionStateDelegateStub::CanLockScreen() const { |
27 return true; | 33 return true; |
28 } | 34 } |
29 | 35 |
30 bool SessionStateDelegateStub::IsScreenLocked() const { | 36 bool SessionStateDelegateStub::IsScreenLocked() const { |
31 return screen_locked_; | 37 return screen_locked_; |
32 } | 38 } |
33 | 39 |
34 void SessionStateDelegateStub::LockScreen() { | 40 void SessionStateDelegateStub::LockScreen() { |
35 shell::CreateLockScreen(); | 41 shell::CreateLockScreen(); |
36 screen_locked_ = true; | 42 screen_locked_ = true; |
37 Shell::GetInstance()->UpdateShelfVisibility(); | 43 Shell::GetInstance()->UpdateShelfVisibility(); |
38 } | 44 } |
39 | 45 |
40 void SessionStateDelegateStub::UnlockScreen() { | 46 void SessionStateDelegateStub::UnlockScreen() { |
41 screen_locked_ = false; | 47 screen_locked_ = false; |
42 Shell::GetInstance()->UpdateShelfVisibility(); | 48 Shell::GetInstance()->UpdateShelfVisibility(); |
43 } | 49 } |
44 | 50 |
51 const base::string16 SessionStateDelegateStub::GetUserDisplayName( | |
52 MultiProfileIndex index) const { | |
53 return UTF8ToUTF16(""); | |
54 } | |
55 | |
56 const std::string SessionStateDelegateStub::GetUserEmail( | |
57 MultiProfileIndex index) const { | |
58 return ""; | |
Nikita (slow)
2013/05/17 17:00:32
How about returning some stub strings here that ar
Mr4D (OOO till 08-26)
2013/05/17 18:45:09
Done.
| |
59 } | |
60 | |
61 const gfx::ImageSkia& SessionStateDelegateStub::GetUserImage( | |
62 MultiProfileIndex index) const { | |
63 return null_image_; | |
64 } | |
65 | |
66 void SessionStateDelegateStub::GetLoggedInUsers( | |
67 UserEmailList* users) { | |
68 } | |
69 | |
70 void SessionStateDelegateStub::SwitchActiveUser(const std::string& email) { | |
71 } | |
72 | |
45 } // namespace ash | 73 } // namespace ash |
OLD | NEW |