OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ | 5 #ifndef ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ |
6 #define ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ | 6 #define ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/public/cpp/session_types.h" | 9 #include "ash/public/cpp/session_types.h" |
10 #include "components/session_manager/session_manager_types.h" | 10 #include "components/session_manager/session_manager_types.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace ash { | 22 namespace ash { |
23 | 23 |
24 class SessionStateObserver; | 24 class SessionStateObserver; |
25 class WmWindow; | 25 class WmWindow; |
26 | 26 |
27 // Delegate for checking and modifying the session state. | 27 // Delegate for checking and modifying the session state. |
28 // DEPRECATED in favor of SessionController/SessionControllerClient for mash. | 28 // DEPRECATED in favor of SessionController/SessionControllerClient for mash. |
29 // TODO(xiyuan): Remove this when SessionController etc are ready. | 29 // TODO(xiyuan): Remove this when SessionController etc are ready. |
30 class ASH_EXPORT SessionStateDelegate { | 30 class ASH_EXPORT SessionStateDelegate { |
31 public: | 31 public: |
32 // Defines the cycle direction for |CycleActiveUser|. | |
33 enum CycleUser { | |
34 CYCLE_TO_NEXT_USER = 0, // Cycle to the next user. | |
35 CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. | |
36 }; | |
37 | |
38 virtual ~SessionStateDelegate() {} | 32 virtual ~SessionStateDelegate() {} |
39 | 33 |
40 // Returns the maximum possible number of logged in users. | 34 // Returns the maximum possible number of logged in users. |
41 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; | 35 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; |
42 | 36 |
43 // Returns the number of signed in users. If 0 is returned, there is either | 37 // Returns the number of signed in users. If 0 is returned, there is either |
44 // no session in progress or no active user. | 38 // no session in progress or no active user. |
45 virtual int NumberOfLoggedInUsers() const = 0; | 39 virtual int NumberOfLoggedInUsers() const = 0; |
46 | 40 |
47 // Gets the policy of adding a user session to ash. | 41 // Gets the policy of adding a user session to ash. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // Adds or removes sessions state observer. | 96 // Adds or removes sessions state observer. |
103 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 97 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
104 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 98 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
105 | 99 |
106 bool IsInSecondaryLoginScreen() const; | 100 bool IsInSecondaryLoginScreen() const; |
107 }; | 101 }; |
108 | 102 |
109 } // namespace ash | 103 } // namespace ash |
110 | 104 |
111 #endif // ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ | 105 #endif // ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |