Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / ash / session_state_delegate_views.cc
index 4c86889..de814bd 100644 (file)
@@ -7,19 +7,27 @@
 #include "base/logging.h"
 #include "base/strings/string16.h"
 #include "base/strings/utf_string_conversions.h"
+#include "components/user_manager/empty_user_info.h"
 #include "ui/gfx/image/image_skia.h"
 
-namespace {
-// This isn't really used. It is mainly here to make the compiler happy.
-gfx::ImageSkia null_image;
-}
-
 SessionStateDelegate::SessionStateDelegate() {
 }
 
 SessionStateDelegate::~SessionStateDelegate() {
 }
 
+content::BrowserContext* SessionStateDelegate::GetBrowserContextByIndex(
+    ash::MultiProfileIndex index) {
+  NOTIMPLEMENTED();
+  return NULL;
+}
+
+content::BrowserContext* SessionStateDelegate::GetBrowserContextForWindow(
+    aura::Window* window) {
+  NOTIMPLEMENTED();
+  return NULL;
+}
+
 int SessionStateDelegate::GetMaximumNumberOfLoggedInUsers() const {
   return 3;
 }
@@ -54,41 +62,37 @@ bool SessionStateDelegate::IsUserSessionBlocked() const {
   return false;
 }
 
-const base::string16 SessionStateDelegate::GetUserDisplayName(
-    ash::MultiProfileIndex index) const {
-  NOTIMPLEMENTED();
-  return UTF8ToUTF16("");
+ash::SessionStateDelegate::SessionState SessionStateDelegate::GetSessionState()
+    const {
+  return SESSION_STATE_ACTIVE;
 }
 
-const std::string SessionStateDelegate::GetUserEmail(
+const user_manager::UserInfo* SessionStateDelegate::GetUserInfo(
     ash::MultiProfileIndex index) const {
-  NOTIMPLEMENTED();
-  return "";
+  return GetUserInfo(static_cast<content::BrowserContext*>(NULL));
 }
 
-const std::string SessionStateDelegate::GetUserID(
-    ash::MultiProfileIndex index) const {
-  NOTIMPLEMENTED();
-  return "";
+const user_manager::UserInfo* SessionStateDelegate::GetUserInfo(
+    content::BrowserContext* context) const {
+  static const user_manager::UserInfo* kUserInfo =
+      new user_manager::EmptyUserInfo();
+  return kUserInfo;
 }
 
-const gfx::ImageSkia& SessionStateDelegate::GetUserImage(
-    ash::MultiProfileIndex index) const {
-  NOTIMPLEMENTED();
-  // To make the compiler happy.
-  return null_image;
+bool SessionStateDelegate::ShouldShowAvatar(aura::Window* window) const {
+  return false;
 }
 
-void SessionStateDelegate::GetLoggedInUsers(ash::UserIdList* users) {
+void SessionStateDelegate::SwitchActiveUser(const std::string& user_id) {
   NOTIMPLEMENTED();
 }
 
-void SessionStateDelegate::SwitchActiveUser(const std::string& user_id) {
+void SessionStateDelegate::CycleActiveUser(CycleUser cycle_user) {
   NOTIMPLEMENTED();
 }
 
-void SessionStateDelegate::SwitchActiveUserToNext() {
-  NOTIMPLEMENTED();
+bool SessionStateDelegate::IsMultiProfileAllowedByPrimaryUserPolicy() const {
+  return true;
 }
 
 void SessionStateDelegate::AddSessionStateObserver(
@@ -100,10 +104,3 @@ void SessionStateDelegate::RemoveSessionStateObserver(
     ash::SessionStateObserver* observer) {
   NOTIMPLEMENTED();
 }
-
-bool SessionStateDelegate::TransferWindowToDesktopOfUser(
-    aura::Window* window,
-    ash::MultiProfileIndex index) {
-  NOTIMPLEMENTED();
-  return false;
-}