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_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ | 5 #ifndef ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ |
6 #define ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ | 6 #define ASH_COMMON_SESSION_SESSION_STATE_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 14 matching lines...) Expand all Loading... | |
25 | 25 |
26 // Called when a user session is updated, such as avatar change. | 26 // Called when a user session is updated, such as avatar change. |
27 virtual void UserSessionUpdated(const AccountId& account_id) {} | 27 virtual void UserSessionUpdated(const AccountId& account_id) {} |
28 | 28 |
29 // Called when the session state is changed. | 29 // Called when the session state is changed. |
30 virtual void SessionStateChanged(session_manager::SessionState state) {} | 30 virtual void SessionStateChanged(session_manager::SessionState state) {} |
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 LoginStatusChanged(LoginStatus login_status) {} | 33 virtual void LoginStatusChanged(LoginStatus login_status) {} |
34 | 34 |
35 // Called when the lock state is changed. |locked| is the current lock stated. | |
36 virtual void OnLockStateChanged(bool locked) {} | |
James Cook
2017/04/07 20:26:55
nit: Can this be LockStateChanged() to match the o
xiyuan
2017/04/07 21:50:01
Changed to LockStateChanged().
I will do the rena
| |
37 | |
35 protected: | 38 protected: |
36 virtual ~SessionStateObserver() {} | 39 virtual ~SessionStateObserver() {} |
37 }; | 40 }; |
38 | 41 |
39 // A class to attach / detach an object as a session state observer. | 42 // A class to attach / detach an object as a session state observer. |
40 class ASH_EXPORT ScopedSessionStateObserver { | 43 class ASH_EXPORT ScopedSessionStateObserver { |
41 public: | 44 public: |
42 explicit ScopedSessionStateObserver(SessionStateObserver* observer); | 45 explicit ScopedSessionStateObserver(SessionStateObserver* observer); |
43 virtual ~ScopedSessionStateObserver(); | 46 virtual ~ScopedSessionStateObserver(); |
44 | 47 |
45 private: | 48 private: |
46 ash::SessionStateObserver* observer_; | 49 ash::SessionStateObserver* observer_; |
47 | 50 |
48 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver); | 51 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver); |
49 }; | 52 }; |
50 | 53 |
51 } // namespace ash | 54 } // namespace ash |
52 | 55 |
53 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ | 56 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ |
OLD | NEW |