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

Side by Side Diff: ash/session_state_delegate_stub.cc

Issue 14756019: Adding new user menu section to the SystemTrayMenu & refactoring of user access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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) 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::NumberOfLoggedInUsers() const {
19 return true; 21 return 1;
20 } 22 }
21 23
22 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const { 24 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const {
23 return true; 25 return true;
24 } 26 }
25 27
26 bool SessionStateDelegateStub::CanLockScreen() const { 28 bool SessionStateDelegateStub::CanLockScreen() const {
27 return true; 29 return true;
28 } 30 }
29 31
30 bool SessionStateDelegateStub::IsScreenLocked() const { 32 bool SessionStateDelegateStub::IsScreenLocked() const {
31 return screen_locked_; 33 return screen_locked_;
32 } 34 }
33 35
34 void SessionStateDelegateStub::LockScreen() { 36 void SessionStateDelegateStub::LockScreen() {
35 shell::CreateLockScreen(); 37 shell::CreateLockScreen();
36 screen_locked_ = true; 38 screen_locked_ = true;
37 Shell::GetInstance()->UpdateShelfVisibility(); 39 Shell::GetInstance()->UpdateShelfVisibility();
38 } 40 }
39 41
40 void SessionStateDelegateStub::UnlockScreen() { 42 void SessionStateDelegateStub::UnlockScreen() {
41 screen_locked_ = false; 43 screen_locked_ = false;
42 Shell::GetInstance()->UpdateShelfVisibility(); 44 Shell::GetInstance()->UpdateShelfVisibility();
43 } 45 }
44 46
47 const base::string16 SessionStateDelegateStub::GetUserDisplayName(
48 MultiProfileIndex index) const {
49 return UTF8ToUTF16("");
50 }
51
52 const std::string SessionStateDelegateStub::GetUserEmail(
53 MultiProfileIndex index) const {
54 return "";
55 }
56
57 const gfx::ImageSkia& SessionStateDelegateStub::GetUserImage(
58 MultiProfileIndex index) const {
59 return null_image_;
60 }
61
62 void SessionStateDelegateStub::GetLoggedInUsers(
63 UserEmailList* users) {
64 }
65
66 void SessionStateDelegateStub::SwitchActiveUser(const std::string& email) {
67 }
68
45 } // namespace ash 69 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698