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 user on which the window is currently shown. An empty string | |
85 // means the window will be shown for every user. | |
86 virtual const std::string& GetUserPresentingWindow(aura::Window* window) = 0; | |
oshima
2015/04/07 19:53:44
Is it hard to return BrowserContext instead of std
xdai1
2015/04/09 17:22:40
Done.
| |
87 | |
84 // Returns the maximum possible number of logged in users. | 88 // Returns the maximum possible number of logged in users. |
85 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; | 89 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; |
86 | 90 |
87 // Returns the number of signed in users. If 0 is returned, there is either | 91 // Returns the number of signed in users. If 0 is returned, there is either |
88 // no session in progress or no active user. | 92 // no session in progress or no active user. |
89 virtual int NumberOfLoggedInUsers() const = 0; | 93 virtual int NumberOfLoggedInUsers() const = 0; |
90 | 94 |
91 // Returns true if there is possible to add more users to multiprofile | 95 // 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 | 96 // session. Error is stored in |error| if it is not NULL and function |
93 // returned false. | 97 // returned false. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 // Adds or removes sessions state observer. | 155 // Adds or removes sessions state observer. |
152 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 156 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
153 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 157 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
154 | 158 |
155 bool IsInSecondaryLoginScreen() const; | 159 bool IsInSecondaryLoginScreen() const; |
156 }; | 160 }; |
157 | 161 |
158 } // namespace ash | 162 } // namespace ash |
159 | 163 |
160 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 164 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |