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

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

Issue 2416253004: ash: Use session_manager::SessionState (Closed)
Patch Set: add comment about session state in SessionStaetDelegateChromeos Created 4 years, 2 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_state_delegate.cc ('k') | ash/common/shelf/shelf_layout_manager.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 "ash/common/session/session_state_delegate.h"
10 #include "base/macros.h" 9 #include "base/macros.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 session state is changed. 24 // Called when session state is changed.
25 virtual void SessionStateChanged(SessionStateDelegate::SessionState state) {} 25 virtual void SessionStateChanged(session_manager::SessionState state) {}
26 26
27 protected: 27 protected:
28 virtual ~SessionStateObserver() {} 28 virtual ~SessionStateObserver() {}
29 }; 29 };
30 30
31 // A class to attach / detach an object as a session state observer. 31 // A class to attach / detach an object as a session state observer.
32 class ASH_EXPORT ScopedSessionStateObserver { 32 class ASH_EXPORT ScopedSessionStateObserver {
33 public: 33 public:
34 explicit ScopedSessionStateObserver(SessionStateObserver* observer); 34 explicit ScopedSessionStateObserver(SessionStateObserver* observer);
35 virtual ~ScopedSessionStateObserver(); 35 virtual ~ScopedSessionStateObserver();
36 36
37 private: 37 private:
38 ash::SessionStateObserver* observer_; 38 ash::SessionStateObserver* observer_;
39 39
40 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver); 40 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver);
41 }; 41 };
42 42
43 } // namespace ash 43 } // namespace ash
44 44
45 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_ 45 #endif // ASH_COMMON_SESSION_SESSION_STATE_OBSERVER_H_
OLDNEW
« no previous file with comments | « ash/common/session/session_state_delegate.cc ('k') | ash/common/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698