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. 4 5 #include "chrome/browser/ui/ash/session_state_delegate_views.h" 6 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" 12 13 SessionStateDelegate::SessionStateDelegate() { 14 } 15 16 SessionStateDelegate::~SessionStateDelegate() { 17 } 18 19 content::BrowserContext* SessionStateDelegate::GetBrowserContextByIndex( 20 ash::MultiProfileIndex index) { 21 NOTIMPLEMENTED(); 22 return NULL; 23 } 24 25 content::BrowserContext* SessionStateDelegate::GetBrowserContextForWindow( 26 aura::Window* window) { 27 NOTIMPLEMENTED(); 28 return NULL; 29 } 30 31 int SessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const { 32 return 3; 33 } 34 35 int SessionStateDelegate::NumberOfLoggedInUsers() const { 36 return 1; 37 } 38 39 bool SessionStateDelegate::IsActiveUserSessionStarted() const { 40 return true; 41 } 42 43 bool SessionStateDelegate::CanLockScreen() const { 44 return false; 45 } 46 47 bool SessionStateDelegate::IsScreenLocked() const { 48 return false; 49 } 50 51 bool SessionStateDelegate::ShouldLockScreenBeforeSuspending() const { 52 return false; 53 } 54 55 void SessionStateDelegate::LockScreen() { 56 } 57 58 void SessionStateDelegate::UnlockScreen() { 59 } 60 61 bool SessionStateDelegate::IsUserSessionBlocked() const { 62 return false; 63 } 64 65 ash::SessionStateDelegate::SessionState SessionStateDelegate::GetSessionState() 66 const { 67 return SESSION_STATE_ACTIVE; 68 } 69 70 const user_manager::UserInfo* SessionStateDelegate::GetUserInfo( 71 ash::MultiProfileIndex index) const { 72 return GetUserInfo(static_cast<content::BrowserContext*>(NULL)); 73 } 74 75 const user_manager::UserInfo* SessionStateDelegate::GetUserInfo( 76 content::BrowserContext* context) const { 77 static const user_manager::UserInfo* kUserInfo = 78 new user_manager::EmptyUserInfo(); 79 return kUserInfo; 80 } 81 82 bool SessionStateDelegate::ShouldShowAvatar(aura::Window* window) const { 83 return false; 84 } 85 86 void SessionStateDelegate::SwitchActiveUser(const std::string& user_id) { 87 NOTIMPLEMENTED(); 88 } 89 90 void SessionStateDelegate::CycleActiveUser(CycleUser cycle_user) { 91 NOTIMPLEMENTED(); 92 } 93 94 bool SessionStateDelegate::IsMultiProfileAllowedByPrimaryUserPolicy() const { 95 return true; 96 } 97 98 void SessionStateDelegate::AddSessionStateObserver( 99 ash::SessionStateObserver* observer) { 100 NOTIMPLEMENTED(); 101 } 102 103 void SessionStateDelegate::RemoveSessionStateObserver( 104 ash::SessionStateObserver* observer) { 105 NOTIMPLEMENTED(); 106 } 107