Chromium Code Reviews| 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/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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 // available. Only once this method starts returning |true| is the browser | 58 // available. Only once this method starts returning |true| is the browser |
| 59 // startup complete and both profile and UI are fully available. | 59 // startup complete and both profile and UI are fully available. |
| 60 virtual bool IsActiveUserSessionStarted() const = 0; | 60 virtual bool IsActiveUserSessionStarted() const = 0; |
| 61 | 61 |
| 62 // Returns true if the screen can be locked. | 62 // Returns true if the screen can be locked. |
| 63 virtual bool CanLockScreen() const = 0; | 63 virtual bool CanLockScreen() const = 0; |
| 64 | 64 |
| 65 // Returns true if the screen is currently locked. | 65 // Returns true if the screen is currently locked. |
| 66 virtual bool IsScreenLocked() const = 0; | 66 virtual bool IsScreenLocked() const = 0; |
| 67 | 67 |
| 68 // Returns true if the screen should be locked when the system is about to | 68 // Returns true if the screen should be locked automatically. |
|
Daniel Erat
2016/10/21 22:48:51
how about adding something like "... when the scre
Qiang(Joe) Xu
2016/10/24 17:53:55
Done.
| |
| 69 // suspend. | 69 virtual bool ShouldLockScreenAutomatically() const = 0; |
| 70 virtual bool ShouldLockScreenBeforeSuspending() const = 0; | |
| 71 | 70 |
| 72 // Locks the screen. The locking happens asynchronously. | 71 // Locks the screen. The locking happens asynchronously. |
| 73 virtual void LockScreen() = 0; | 72 virtual void LockScreen() = 0; |
| 74 | 73 |
| 75 // Unlocks the screen. | 74 // Unlocks the screen. |
| 76 virtual void UnlockScreen() = 0; | 75 virtual void UnlockScreen() = 0; |
| 77 | 76 |
| 78 // Returns |true| if user session blocked by some overlying UI. It can be | 77 // Returns |true| if user session blocked by some overlying UI. It can be |
| 79 // login screen, lock screen or screen for adding users into multi-profile | 78 // login screen, lock screen or screen for adding users into multi-profile |
| 80 // session. | 79 // session. |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 108 // Adds or removes sessions state observer. | 107 // Adds or removes sessions state observer. |
| 109 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 108 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
| 110 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 109 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
| 111 | 110 |
| 112 bool IsInSecondaryLoginScreen() const; | 111 bool IsInSecondaryLoginScreen() const; |
| 113 }; | 112 }; |
| 114 | 113 |
| 115 } // namespace ash | 114 } // namespace ash |
| 116 | 115 |
| 117 #endif // ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ | 116 #endif // ASH_COMMON_SESSION_SESSION_STATE_DELEGATE_H_ |
| OLD | NEW |