Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: ash/common/session/session_state_delegate.h

Issue 2724163002: ash: Use enum for SessionController::CycleActiveUser (Closed)
Patch Set: fix ash_shell_with_content compile Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/session/session_controller.cc ('k') | ash/common/test/test_session_state_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 81
88 // Returns the avatar image for the specified window. 82 // Returns the avatar image for the specified window.
89 virtual gfx::ImageSkia GetAvatarImageForWindow(WmWindow* window) const = 0; 83 virtual gfx::ImageSkia GetAvatarImageForWindow(WmWindow* window) const = 0;
90 84
91 // Switches to another active user with |account_id| 85 // Switches to another active user with |account_id|
92 // (if that user has already signed in). 86 // (if that user has already signed in).
93 virtual void SwitchActiveUser(const AccountId& account_id) = 0; 87 virtual void SwitchActiveUser(const AccountId& account_id) = 0;
94 88
95 // Switches the active user to the next or previous user, with the same 89 // Switches the active user to the next or previous user, with the same
96 // ordering as GetLoggedInUsers. 90 // ordering as GetLoggedInUsers.
97 virtual void CycleActiveUser(CycleUser cycle_user) = 0; 91 virtual void CycleActiveUser(CycleUserDirection direction) = 0;
98 92
99 // Returns true if primary user policy does not forbid multiple signin. 93 // Returns true if primary user policy does not forbid multiple signin.
100 virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0; 94 virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0;
101 95
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_
OLDNEW
« no previous file with comments | « ash/common/session/session_controller.cc ('k') | ash/common/test/test_session_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698