OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_SESSION_STATE_DELEGATE_H_ |
| 6 #define ASH_SESSION_STATE_DELEGATE_H_ |
| 7 |
| 8 #include "ash/ash_export.h" |
| 9 |
| 10 namespace ash { |
| 11 |
| 12 // Delegate for checking and modifying the session state. |
| 13 class ASH_EXPORT SessionStateDelegate { |
| 14 public: |
| 15 virtual ~SessionStateDelegate() {}; |
| 16 |
| 17 // Returns |true| if a session is in progress and there is an active user. |
| 18 virtual bool HasActiveUser() const = 0; |
| 19 |
| 20 // Returns |true| if the session has been fully started for the active user. |
| 21 // When a user becomes active, the profile and browser UI are not immediately |
| 22 // available. Only once this method starts returning |true| is the browser |
| 23 // startup complete and both profile and UI are fully available. |
| 24 virtual bool IsActiveUserSessionStarted() const = 0; |
| 25 |
| 26 // Returns true if the screen can be locked. |
| 27 virtual bool CanLockScreen() const = 0; |
| 28 |
| 29 // Returns true if the screen is currently locked. |
| 30 virtual bool IsScreenLocked() const = 0; |
| 31 |
| 32 // Locks the screen. The locking happens asynchronously. |
| 33 virtual void LockScreen() = 0; |
| 34 |
| 35 // Unlocks the screen. |
| 36 virtual void UnlockScreen() = 0; |
| 37 }; |
| 38 |
| 39 } // namespace ash |
| 40 |
| 41 #endif // ASH_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |