| OLD | NEW |
| 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 <string> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 12 #include "components/session_manager/session_manager_export.h" | 13 #include "components/session_manager/session_manager_export.h" |
| 13 #include "components/session_manager/session_manager_types.h" | 14 #include "components/session_manager/session_manager_types.h" |
| 14 | 15 |
| 15 class AccountId; | 16 class AccountId; |
| 16 | 17 |
| 17 namespace session_manager { | 18 namespace session_manager { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 42 bool IsSessionStarted() const; | 43 bool IsSessionStarted() const; |
| 43 | 44 |
| 44 // Called when browser session is started i.e. after | 45 // Called when browser session is started i.e. after |
| 45 // browser_creator.LaunchBrowser(...) was called after user sign in. | 46 // browser_creator.LaunchBrowser(...) was called after user sign in. |
| 46 // When user is at the image screen IsUserLoggedIn() will return true | 47 // When user is at the image screen IsUserLoggedIn() will return true |
| 47 // but IsSessionStarted() will return false. During the kiosk splash screen, | 48 // but IsSessionStarted() will return false. During the kiosk splash screen, |
| 48 // we perform additional initialization after the user is logged in but | 49 // we perform additional initialization after the user is logged in but |
| 49 // before the session has been started. | 50 // before the session has been started. |
| 50 virtual void SessionStarted(); | 51 virtual void SessionStarted(); |
| 51 | 52 |
| 53 // Returns true if the session for the given user was started. |
| 54 bool HasSessionForAccountId(const AccountId& user_account_id) const; |
| 55 |
| 52 // Convenience wrapps of session state. | 56 // Convenience wrapps of session state. |
| 53 bool IsInSecondaryLoginScreen() const; | 57 bool IsInSecondaryLoginScreen() const; |
| 54 bool IsScreenLocked() const; | 58 bool IsScreenLocked() const; |
| 55 bool IsUserSessionBlocked() const; | 59 bool IsUserSessionBlocked() const; |
| 56 | 60 |
| 57 void AddObserver(SessionManagerObserver* observer); | 61 void AddObserver(SessionManagerObserver* observer); |
| 58 void RemoveObserver(SessionManagerObserver* observer); | 62 void RemoveObserver(SessionManagerObserver* observer); |
| 59 | 63 |
| 60 SessionState session_state() const { return session_state_; } | 64 SessionState session_state() const { return session_state_; } |
| 61 const std::vector<Session>& sessions() const { return sessions_; } | 65 const std::vector<Session>& sessions() const { return sessions_; } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 std::vector<Session> sessions_; | 100 std::vector<Session> sessions_; |
| 97 | 101 |
| 98 base::ObserverList<SessionManagerObserver> observers_; | 102 base::ObserverList<SessionManagerObserver> observers_; |
| 99 | 103 |
| 100 DISALLOW_COPY_AND_ASSIGN(SessionManager); | 104 DISALLOW_COPY_AND_ASSIGN(SessionManager); |
| 101 }; | 105 }; |
| 102 | 106 |
| 103 } // namespace session_manager | 107 } // namespace session_manager |
| 104 | 108 |
| 105 #endif // COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ | 109 #endif // COMPONENTS_SESSION_MANAGER_CORE_SESSION_MANAGER_H_ |
| OLD | NEW |