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 #ifndef ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 5 #ifndef ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
6 #define ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 6 #define ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual ~SessionStateDelegate() {}; | 74 virtual ~SessionStateDelegate() {}; |
75 | 75 |
76 // Returns the browser context for the user given by |index|. | 76 // Returns the browser context for the user given by |index|. |
77 virtual content::BrowserContext* GetBrowserContextByIndex( | 77 virtual content::BrowserContext* GetBrowserContextByIndex( |
78 MultiProfileIndex index) = 0; | 78 MultiProfileIndex index) = 0; |
79 | 79 |
80 // Returns the browser context associated with the window. | 80 // Returns the browser context associated with the window. |
81 virtual content::BrowserContext* GetBrowserContextForWindow( | 81 virtual content::BrowserContext* GetBrowserContextForWindow( |
82 aura::Window* window) = 0; | 82 aura::Window* window) = 0; |
83 | 83 |
| 84 // Returns the browser context on which the window is currently shown. NULL |
| 85 // means the window will be shown for every user. |
| 86 virtual content::BrowserContext* GetUserPresentingBrowserContextForWindow( |
| 87 aura::Window* window) = 0; |
| 88 |
84 // Returns the maximum possible number of logged in users. | 89 // Returns the maximum possible number of logged in users. |
85 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; | 90 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; |
86 | 91 |
87 // Returns the number of signed in users. If 0 is returned, there is either | 92 // Returns the number of signed in users. If 0 is returned, there is either |
88 // no session in progress or no active user. | 93 // no session in progress or no active user. |
89 virtual int NumberOfLoggedInUsers() const = 0; | 94 virtual int NumberOfLoggedInUsers() const = 0; |
90 | 95 |
91 // Returns true if there is possible to add more users to multiprofile | 96 // Returns true if there is possible to add more users to multiprofile |
92 // session. Error is stored in |error| if it is not NULL and function | 97 // session. Error is stored in |error| if it is not NULL and function |
93 // returned false. | 98 // returned false. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // Adds or removes sessions state observer. | 156 // Adds or removes sessions state observer. |
152 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 157 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
153 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 158 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
154 | 159 |
155 bool IsInSecondaryLoginScreen() const; | 160 bool IsInSecondaryLoginScreen() const; |
156 }; | 161 }; |
157 | 162 |
158 } // namespace ash | 163 } // namespace ash |
159 | 164 |
160 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 165 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |