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
3 // found in the LICENSE file.
5 #include "ash/session_state_delegate_stub.h"
8 #include "ash/shell/example_factory.h"
9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h"
14 SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) {
17 SessionStateDelegateStub::~SessionStateDelegateStub() {
20 int SessionStateDelegateStub::GetMaximumNumberOfLoggedInUsers() const {
24 int SessionStateDelegateStub::NumberOfLoggedInUsers() const {
28 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const {
32 bool SessionStateDelegateStub::CanLockScreen() const {
36 bool SessionStateDelegateStub::IsScreenLocked() const {
37 return screen_locked_
;
40 void SessionStateDelegateStub::LockScreen() {
41 shell::CreateLockScreen();
42 screen_locked_
= true;
43 Shell::GetInstance()->UpdateShelfVisibility();
46 void SessionStateDelegateStub::UnlockScreen() {
47 screen_locked_
= false;
48 Shell::GetInstance()->UpdateShelfVisibility();
51 const base::string16
SessionStateDelegateStub::GetUserDisplayName(
52 MultiProfileIndex index
) const {
53 return UTF8ToUTF16("stub-user");
56 const std::string
SessionStateDelegateStub::GetUserEmail(
57 MultiProfileIndex index
) const {
58 return "stub-user@domain.com";
61 const gfx::ImageSkia
& SessionStateDelegateStub::GetUserImage(
62 MultiProfileIndex index
) const {
66 void SessionStateDelegateStub::GetLoggedInUsers(UserIdList
* users
) {
69 void SessionStateDelegateStub::SwitchActiveUser(const std::string
& user_id
) {
72 void SessionStateDelegateStub::AddSessionStateObserver(
73 ash::SessionStateObserver
* observer
) {
76 void SessionStateDelegateStub::RemoveSessionStateObserver(
77 ash::SessionStateObserver
* observer
) {