| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #ifndef CHROME_BROWSER_UI_ASH_SESSION_UTIL_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_SESSION_UTIL_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_SESSION_UTIL_H_ | 6 #define CHROME_BROWSER_UI_ASH_SESSION_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 class Window; | 12 class Window; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class BrowserContext; | 16 class BrowserContext; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace user_manager { |
| 20 class User; |
| 21 } |
| 22 |
| 19 content::BrowserContext* GetActiveBrowserContext(); | 23 content::BrowserContext* GetActiveBrowserContext(); |
| 20 | 24 |
| 21 using GetActiveBrowserContextCallback = | 25 using GetActiveBrowserContextCallback = |
| 22 base::Callback<content::BrowserContext*(void)>; | 26 base::Callback<content::BrowserContext*(void)>; |
| 23 | 27 |
| 24 // See documentation in ash::ShellDelegate for the method of the same name. | 28 // See documentation in ash::ShellDelegate for the method of the same name. |
| 25 // |context| is the content::BrowserContext deemed active for the current | 29 // |context| is the content::BrowserContext deemed active for the current |
| 26 // scenario. This is passed in because it can differ in tests vs. production. | 30 // scenario. This is passed in because it can differ in tests vs. production. |
| 27 // See for example MultiUserWindowManagerTestChromeOS. | 31 // See for example MultiUserWindowManagerTestChromeOS. |
| 28 bool CanShowWindowForUser( | 32 bool CanShowWindowForUser( |
| 29 aura::Window* window, | 33 aura::Window* window, |
| 30 const GetActiveBrowserContextCallback& get_context_callback); | 34 const GetActiveBrowserContextCallback& get_context_callback); |
| 31 | 35 |
| 32 gfx::ImageSkia GetAvatarImageForContext(content::BrowserContext* context); | 36 gfx::ImageSkia GetAvatarImageForContext(content::BrowserContext* context); |
| 37 gfx::ImageSkia GetAvatarImageForUser(const user_manager::User* user); |
| 33 | 38 |
| 34 #endif // CHROME_BROWSER_UI_ASH_SESSION_UTIL_H_ | 39 #endif // CHROME_BROWSER_UI_ASH_SESSION_UTIL_H_ |
| OLD | NEW |