Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: ash/common/session/session_state_observer.h

Issue 2797743002: ash: Merge LoginStatus update code path (Closed)
Patch Set: fix post unlock animation not run, and tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 11
12 class AccountId; 12 class AccountId;
13 13
14 namespace ash { 14 namespace ash {
15 15
16 enum class LoginStatus;
17
16 class ASH_EXPORT SessionStateObserver { 18 class ASH_EXPORT SessionStateObserver {
17 public: 19 public:
18 // Called when active user has changed. 20 // Called when active user has changed.
19 virtual void ActiveUserChanged(const AccountId& account_id) {} 21 virtual void ActiveUserChanged(const AccountId& account_id) {}
20 22
21 // Called when another user gets added to the existing session. 23 // Called when another user gets added to the existing session.
22 virtual void UserAddedToSession(const AccountId& account_id) {} 24 virtual void UserAddedToSession(const AccountId& account_id) {}
23 25
24 // Called when a user session is updated, such as avatar change. 26 // Called when a user session is updated, such as avatar change.
25 virtual void UserSessionUpdated(const AccountId& account_id) {} 27 virtual void UserSessionUpdated(const AccountId& account_id) {}
26 28
27 // Called when session state is changed. 29 // Called when session state is changed.
28 virtual void SessionStateChanged(session_manager::SessionState state) {} 30 virtual void SessionStateChanged(session_manager::SessionState state) {}
29 31
32 // Called when login status is changed.
James Cook 2017/04/05 00:16:24 mention that |login_status| is the new status
xiyuan 2017/04/05 22:29:07 Done.
33 virtual void LoginStatusChanged(LoginStatus login_status) {}
34
30 protected: 35 protected:
31 virtual ~SessionStateObserver() {} 36 virtual ~SessionStateObserver() {}
32 }; 37 };
33 38
34 // A class to attach / detach an object as a session state observer. 39 // A class to attach / detach an object as a session state observer.
35 class ASH_EXPORT ScopedSessionStateObserver { 40 class ASH_EXPORT ScopedSessionStateObserver {
36 public: 41 public:
37 explicit ScopedSessionStateObserver(SessionStateObserver* observer); 42 explicit ScopedSessionStateObserver(SessionStateObserver* observer);
38 virtual ~ScopedSessionStateObserver(); 43 virtual ~ScopedSessionStateObserver();
39 44
40 private: 45 private:
41 ash::SessionStateObserver* observer_; 46 ash::SessionStateObserver* observer_;
42 47
43 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver); 48 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver);
44 }; 49 };
45 50
46 } // namespace ash 51 } // namespace ash
47 52
48 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ 53 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698