Disabling EnterpriseKioskApp tests due to failures.
[chromium-blink-merge.git] / ash / session_state_delegate_stub.cc
blobc7943214f81f6edd1fdb745713f24c7b1cfd5a4b
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"
7 #include "ash/shell.h"
8 #include "ash/shell/example_factory.h"
9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h"
12 namespace ash {
14 SessionStateDelegateStub::SessionStateDelegateStub() : screen_locked_(false) {
17 SessionStateDelegateStub::~SessionStateDelegateStub() {
20 int SessionStateDelegateStub::GetMaximumNumberOfLoggedInUsers() const {
21 return 3;
24 int SessionStateDelegateStub::NumberOfLoggedInUsers() const {
25 return 1;
28 bool SessionStateDelegateStub::IsActiveUserSessionStarted() const {
29 return true;
32 bool SessionStateDelegateStub::CanLockScreen() const {
33 return true;
36 bool SessionStateDelegateStub::IsScreenLocked() const {
37 return screen_locked_;
40 bool SessionStateDelegateStub::ShouldLockScreenBeforeSuspending() const {
41 return false;
44 void SessionStateDelegateStub::LockScreen() {
45 shell::CreateLockScreen();
46 screen_locked_ = true;
47 Shell::GetInstance()->UpdateShelfVisibility();
50 void SessionStateDelegateStub::UnlockScreen() {
51 screen_locked_ = false;
52 Shell::GetInstance()->UpdateShelfVisibility();
55 bool SessionStateDelegateStub::IsUserSessionBlocked() const {
56 return !IsActiveUserSessionStarted() || IsScreenLocked();
59 const base::string16 SessionStateDelegateStub::GetUserDisplayName(
60 MultiProfileIndex index) const {
61 return UTF8ToUTF16("stub-user");
64 const std::string SessionStateDelegateStub::GetUserEmail(
65 MultiProfileIndex index) const {
66 return "stub-user@domain.com";
69 const gfx::ImageSkia& SessionStateDelegateStub::GetUserImage(
70 MultiProfileIndex index) const {
71 return null_image_;
74 void SessionStateDelegateStub::GetLoggedInUsers(UserIdList* users) {
77 void SessionStateDelegateStub::SwitchActiveUser(const std::string& user_id) {
80 void SessionStateDelegateStub::SwitchActiveUserToNext() {
83 void SessionStateDelegateStub::AddSessionStateObserver(
84 ash::SessionStateObserver* observer) {
87 void SessionStateDelegateStub::RemoveSessionStateObserver(
88 ash::SessionStateObserver* observer) {
91 } // namespace ash