| OLD | NEW |
| (Empty) |
| 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_chromeos.h" | |
| 6 | |
| 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" | |
| 10 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | |
| 11 #include "chrome/browser/ui/ash/session_util.h" | |
| 12 #include "ui/gfx/image/image_skia.h" | |
| 13 | |
| 14 SessionStateDelegateChromeos::SessionStateDelegateChromeos() {} | |
| 15 | |
| 16 SessionStateDelegateChromeos::~SessionStateDelegateChromeos() {} | |
| 17 | |
| 18 bool SessionStateDelegateChromeos::ShouldShowAvatar( | |
| 19 ash::WmWindow* window) const { | |
| 20 return chrome::MultiUserWindowManager::GetInstance()->ShouldShowAvatar( | |
| 21 ash::WmWindow::GetAuraWindow(window)); | |
| 22 } | |
| 23 | |
| 24 gfx::ImageSkia SessionStateDelegateChromeos::GetAvatarImageForWindow( | |
| 25 ash::WmWindow* window) const { | |
| 26 content::BrowserContext* context = | |
| 27 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow( | |
| 28 ash::WmWindow::GetAuraWindow(window)); | |
| 29 return GetAvatarImageForContext(context); | |
| 30 } | |
| OLD | NEW |