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

Side by Side Diff: components/session_manager/core/session_manager.h

Issue 2637403007: cros: Change max users to be a constant (Closed)
Patch Set: fix test Created 3 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ 5 #ifndef COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_
6 #define COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ 6 #define COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_
7 7
8 #include <stdint.h>
9
10 #include <vector> 8 #include <vector>
11 9
12 #include "base/macros.h" 10 #include "base/macros.h"
13 #include "base/observer_list.h" 11 #include "base/observer_list.h"
14 #include "components/session_manager/session_manager_export.h" 12 #include "components/session_manager/session_manager_export.h"
15 #include "components/session_manager/session_manager_types.h" 13 #include "components/session_manager/session_manager_types.h"
16 14
17 class AccountId; 15 class AccountId;
18 16
19 namespace session_manager { 17 namespace session_manager {
(...skipping 28 matching lines...) Expand all
48 // When user is at the image screen IsUserLoggedIn() will return true 46 // When user is at the image screen IsUserLoggedIn() will return true
49 // but IsSessionStarted() will return false. During the kiosk splash screen, 47 // but IsSessionStarted() will return false. During the kiosk splash screen,
50 // we perform additional initialization after the user is logged in but 48 // we perform additional initialization after the user is logged in but
51 // before the session has been started. 49 // before the session has been started.
52 virtual void SessionStarted(); 50 virtual void SessionStarted();
53 51
54 // Convenience wrapps of session state. 52 // Convenience wrapps of session state.
55 bool IsInSecondaryLoginScreen() const; 53 bool IsInSecondaryLoginScreen() const;
56 bool IsScreenLocked() const; 54 bool IsScreenLocked() const;
57 55
58 // Returns the maximum number of allowed user sessions.
59 uint32_t GetMaximumNumberOfUserSessions() const;
60
61 void AddObserver(SessionManagerObserver* observer); 56 void AddObserver(SessionManagerObserver* observer);
62 void RemoveObserver(SessionManagerObserver* observer); 57 void RemoveObserver(SessionManagerObserver* observer);
63 58
64 SessionState session_state() const { return session_state_; } 59 SessionState session_state() const { return session_state_; }
65 const std::vector<Session>& sessions() const { return sessions_; } 60 const std::vector<Session>& sessions() const { return sessions_; }
66 61
67 protected: 62 protected:
68 // Notifies UserManager about a user signs in when creating a user session. 63 // Notifies UserManager about a user signs in when creating a user session.
69 virtual void NotifyUserLoggedIn(const AccountId& user_account_id, 64 virtual void NotifyUserLoggedIn(const AccountId& user_account_id,
70 const std::string& user_id_hash, 65 const std::string& user_id_hash,
(...skipping 29 matching lines...) Expand all
100 std::vector<Session> sessions_; 95 std::vector<Session> sessions_;
101 96
102 base::ObserverList<SessionManagerObserver> observers_; 97 base::ObserverList<SessionManagerObserver> observers_;
103 98
104 DISALLOW_COPY_AND_ASSIGN(SessionManager); 99 DISALLOW_COPY_AND_ASSIGN(SessionManager);
105 }; 100 };
106 101
107 } // namespace session_manager 102 } // namespace session_manager
108 103
109 #endif // COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ 104 #endif // COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.cc ('k') | components/session_manager/core/session_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698