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

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

Issue 2512693003: ash: Replace SessionStateDelegate::CanAddUserToMultiProfile (Closed)
Patch Set: for #2 Created 4 years, 1 month 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 | « no previous file | ash/common/session/session_state_delegate.cc » ('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/common/session/session_types.h" 9 #include "ash/common/session/session_types.h"
10 #include "components/session_manager/session_manager_types.h" 10 #include "components/session_manager/session_manager_types.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // Delegate for checking and modifying the session state. 27 // Delegate for checking and modifying the session state.
28 class ASH_EXPORT SessionStateDelegate { 28 class ASH_EXPORT SessionStateDelegate {
29 public: 29 public:
30 // Defines the cycle direction for |CycleActiveUser|. 30 // Defines the cycle direction for |CycleActiveUser|.
31 enum CycleUser { 31 enum CycleUser {
32 CYCLE_TO_NEXT_USER = 0, // Cycle to the next user. 32 CYCLE_TO_NEXT_USER = 0, // Cycle to the next user.
33 CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. 33 CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user.
34 }; 34 };
35 35
36 enum AddUserError {
37 ADD_USER_ERROR_NOT_ALLOWED_PRIMARY_USER = 0,
38 ADD_USER_ERROR_OUT_OF_USERS,
39 ADD_USER_ERROR_MAXIMUM_USERS_REACHED,
40 };
41
42 virtual ~SessionStateDelegate() {} 36 virtual ~SessionStateDelegate() {}
43 37
44 // Returns the maximum possible number of logged in users. 38 // Returns the maximum possible number of logged in users.
45 virtual int GetMaximumNumberOfLoggedInUsers() const = 0; 39 virtual int GetMaximumNumberOfLoggedInUsers() const = 0;
46 40
47 // Returns the number of signed in users. If 0 is returned, there is either 41 // Returns the number of signed in users. If 0 is returned, there is either
48 // no session in progress or no active user. 42 // no session in progress or no active user.
49 virtual int NumberOfLoggedInUsers() const = 0; 43 virtual int NumberOfLoggedInUsers() const = 0;
50 44
51 // Returns true if there is possible to add more users to multiprofile 45 // Gets the policy of adding a user session to ash.
52 // session. Error is stored in |error| if it is not NULL and function 46 virtual AddUserSessionPolicy GetAddUserSessionPolicy() const;
53 // returned false.
54 virtual bool CanAddUserToMultiProfile(AddUserError* error) const;
55 47
56 // Returns |true| if the session has been fully started for the active user. 48 // Returns |true| if the session has been fully started for the active user.
57 // When a user becomes active, the profile and browser UI are not immediately 49 // When a user becomes active, the profile and browser UI are not immediately
58 // available. Only once this method starts returning |true| is the browser 50 // available. Only once this method starts returning |true| is the browser
59 // startup complete and both profile and UI are fully available. 51 // startup complete and both profile and UI are fully available.
60 virtual bool IsActiveUserSessionStarted() const = 0; 52 virtual bool IsActiveUserSessionStarted() const = 0;
61 53
62 // Returns true if the screen can be locked. 54 // Returns true if the screen can be locked.
63 virtual bool CanLockScreen() const = 0; 55 virtual bool CanLockScreen() const = 0;
64 56
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Adds or removes sessions state observer. 100 // Adds or removes sessions state observer.
109 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; 101 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0;
110 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; 102 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0;
111 103
112 bool IsInSecondaryLoginScreen() const; 104 bool IsInSecondaryLoginScreen() const;
113 }; 105 };
114 106
115 } // namespace ash 107 } // namespace ash
116 108
117 #endif // ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ 109 #endif // ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/session/session_state_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698