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 "chrome/browser/ui/ash/session_state_delegate_views.h"
7 #include "base/logging.h"
8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h"
10 #include "components/user_manager/empty_user_info.h"
11 #include "ui/gfx/image/image_skia.h"
13 SessionStateDelegate::SessionStateDelegate() {
16 SessionStateDelegate::~SessionStateDelegate() {
19 content::BrowserContext
* SessionStateDelegate::GetBrowserContextByIndex(
20 ash::MultiProfileIndex index
) {
25 content::BrowserContext
* SessionStateDelegate::GetBrowserContextForWindow(
26 aura::Window
* window
) {
31 content::BrowserContext
*
32 SessionStateDelegate::GetUserPresentingBrowserContextForWindow(
33 aura::Window
* window
) {
37 int SessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const {
41 int SessionStateDelegate::NumberOfLoggedInUsers() const {
45 bool SessionStateDelegate::IsActiveUserSessionStarted() const {
49 bool SessionStateDelegate::CanLockScreen() const {
53 bool SessionStateDelegate::IsScreenLocked() const {
57 bool SessionStateDelegate::ShouldLockScreenBeforeSuspending() const {
61 void SessionStateDelegate::LockScreen() {
64 void SessionStateDelegate::UnlockScreen() {
67 bool SessionStateDelegate::IsUserSessionBlocked() const {
71 ash::SessionStateDelegate::SessionState
SessionStateDelegate::GetSessionState()
73 return SESSION_STATE_ACTIVE
;
76 const user_manager::UserInfo
* SessionStateDelegate::GetUserInfo(
77 ash::MultiProfileIndex index
) const {
78 return GetUserInfo(static_cast<content::BrowserContext
*>(NULL
));
81 const user_manager::UserInfo
* SessionStateDelegate::GetUserInfo(
82 content::BrowserContext
* context
) const {
83 static const user_manager::UserInfo
* kUserInfo
=
84 new user_manager::EmptyUserInfo();
88 bool SessionStateDelegate::ShouldShowAvatar(aura::Window
* window
) const {
92 void SessionStateDelegate::SwitchActiveUser(const std::string
& user_id
) {
96 void SessionStateDelegate::CycleActiveUser(CycleUser cycle_user
) {
100 bool SessionStateDelegate::IsMultiProfileAllowedByPrimaryUserPolicy() const {
104 void SessionStateDelegate::AddSessionStateObserver(
105 ash::SessionStateObserver
* observer
) {
109 void SessionStateDelegate::RemoveSessionStateObserver(
110 ash::SessionStateObserver
* observer
) {