| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/content/shell_content_state.h" | 7 #include "ash/content/shell_content_state.h" |
| 8 #include "ash/wm_window.h" | |
| 9 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 8 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
| 10 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 9 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
| 11 #include "chrome/browser/ui/ash/session_util.h" | 10 #include "chrome/browser/ui/ash/session_util.h" |
| 12 #include "ui/gfx/image/image_skia.h" | 11 #include "ui/gfx/image/image_skia.h" |
| 13 | 12 |
| 14 SessionStateDelegateChromeos::SessionStateDelegateChromeos() {} | 13 SessionStateDelegateChromeos::SessionStateDelegateChromeos() {} |
| 15 | 14 |
| 16 SessionStateDelegateChromeos::~SessionStateDelegateChromeos() {} | 15 SessionStateDelegateChromeos::~SessionStateDelegateChromeos() {} |
| 17 | 16 |
| 18 bool SessionStateDelegateChromeos::ShouldShowAvatar( | 17 bool SessionStateDelegateChromeos::ShouldShowAvatar( |
| 19 ash::WmWindow* window) const { | 18 aura::Window* window) const { |
| 20 return chrome::MultiUserWindowManager::GetInstance()->ShouldShowAvatar( | 19 return chrome::MultiUserWindowManager::GetInstance()->ShouldShowAvatar( |
| 21 ash::WmWindow::GetAuraWindow(window)); | 20 window); |
| 22 } | 21 } |
| 23 | 22 |
| 24 gfx::ImageSkia SessionStateDelegateChromeos::GetAvatarImageForWindow( | 23 gfx::ImageSkia SessionStateDelegateChromeos::GetAvatarImageForWindow( |
| 25 ash::WmWindow* window) const { | 24 aura::Window* window) const { |
| 26 content::BrowserContext* context = | 25 content::BrowserContext* context = |
| 27 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow( | 26 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow(window); |
| 28 ash::WmWindow::GetAuraWindow(window)); | |
| 29 return GetAvatarImageForContext(context); | 27 return GetAvatarImageForContext(context); |
| 30 } | 28 } |
| OLD | NEW |