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

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

Issue 2780963002: ash: Fix system tray avatar not updated regression (Closed)
Patch Set: resized_ -> resized_image_ 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
« no previous file with comments | « ash/common/session/session_controller.cc ('k') | ash/common/system/tray/system_tray_notifier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class ASH_EXPORT SessionStateObserver { 16 class ASH_EXPORT SessionStateObserver {
17 public: 17 public:
18 // Called when active user has changed. 18 // Called when active user has changed.
19 virtual void ActiveUserChanged(const AccountId& account_id) {} 19 virtual void ActiveUserChanged(const AccountId& account_id) {}
20 20
21 // Called when another user gets added to the existing session. 21 // Called when another user gets added to the existing session.
22 virtual void UserAddedToSession(const AccountId& account_id) {} 22 virtual void UserAddedToSession(const AccountId& account_id) {}
23 23
24 // Called when a user session is updated, such as avatar change.
25 virtual void UserSessionUpdated(const AccountId& account_id) {}
26
24 // Called when session state is changed. 27 // Called when session state is changed.
25 virtual void SessionStateChanged(session_manager::SessionState state) {} 28 virtual void SessionStateChanged(session_manager::SessionState state) {}
26 29
27 protected: 30 protected:
28 virtual ~SessionStateObserver() {} 31 virtual ~SessionStateObserver() {}
29 }; 32 };
30 33
31 // A class to attach / detach an object as a session state observer. 34 // A class to attach / detach an object as a session state observer.
32 class ASH_EXPORT ScopedSessionStateObserver { 35 class ASH_EXPORT ScopedSessionStateObserver {
33 public: 36 public:
34 explicit ScopedSessionStateObserver(SessionStateObserver* observer); 37 explicit ScopedSessionStateObserver(SessionStateObserver* observer);
35 virtual ~ScopedSessionStateObserver(); 38 virtual ~ScopedSessionStateObserver();
36 39
37 private: 40 private:
38 ash::SessionStateObserver* observer_; 41 ash::SessionStateObserver* observer_;
39 42
40 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver); 43 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver);
41 }; 44 };
42 45
43 } // namespace ash 46 } // namespace ash
44 47
45 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ 48 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_
OLDNEW
« no previous file with comments | « ash/common/session/session_controller.cc ('k') | ash/common/system/tray/system_tray_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698