| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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_SESSION_SESSION_OBSERVER_H_ | 5 #ifndef ASH_SESSION_SESSION_OBSERVER_H_ |
| 6 #define ASH_SESSION_SESSION_OBSERVER_H_ | 6 #define ASH_SESSION_SESSION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/session_manager/session_manager_types.h" | 10 #include "components/session_manager/session_manager_types.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 // Called when the login status is changed. |login_status| is the new status. | 32 // Called when the login status is changed. |login_status| is the new status. |
| 33 virtual void OnLoginStatusChanged(LoginStatus login_status) {} | 33 virtual void OnLoginStatusChanged(LoginStatus login_status) {} |
| 34 | 34 |
| 35 // Called when the lock state is changed. |locked| is the current lock stated. | 35 // Called when the lock state is changed. |locked| is the current lock stated. |
| 36 virtual void OnLockStateChanged(bool locked) {} | 36 virtual void OnLockStateChanged(bool locked) {} |
| 37 | 37 |
| 38 // Called when chrome is terminating. | 38 // Called when chrome is terminating. |
| 39 virtual void OnChromeTerminating() {} | 39 virtual void OnChromeTerminating() {} |
| 40 | 40 |
| 41 // Called when the limit becomes available and when it changes. |
| 42 virtual void OnSessionLengthLimitChanged() {} |
| 43 |
| 41 protected: | 44 protected: |
| 42 virtual ~SessionObserver() {} | 45 virtual ~SessionObserver() {} |
| 43 }; | 46 }; |
| 44 | 47 |
| 45 // A class to attach / detach an object as a session state observer. | 48 // A class to attach / detach an object as a session state observer. |
| 46 class ASH_EXPORT ScopedSessionObserver { | 49 class ASH_EXPORT ScopedSessionObserver { |
| 47 public: | 50 public: |
| 48 explicit ScopedSessionObserver(SessionObserver* observer); | 51 explicit ScopedSessionObserver(SessionObserver* observer); |
| 49 virtual ~ScopedSessionObserver(); | 52 virtual ~ScopedSessionObserver(); |
| 50 | 53 |
| 51 private: | 54 private: |
| 52 SessionObserver* const observer_; | 55 SessionObserver* const observer_; |
| 53 | 56 |
| 54 DISALLOW_COPY_AND_ASSIGN(ScopedSessionObserver); | 57 DISALLOW_COPY_AND_ASSIGN(ScopedSessionObserver); |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 } // namespace ash | 60 } // namespace ash |
| 58 | 61 |
| 59 #endif // ASH_SESSION_SESSION_OBSERVER_H_ | 62 #endif // ASH_SESSION_SESSION_OBSERVER_H_ |
| OLD | NEW |