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

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

Issue 2734733002: Revert "chromeos: Move files in //ash/common to //ash, part 3" (Closed)
Patch Set: Created 3 years, 9 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/session/session_state_delegate.cc ('k') | ash/session/session_state_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_SESSION_SESSION_STATE_OBSERVER_H_
6 #define ASH_SESSION_SESSION_STATE_OBSERVER_H_
7
8 #include "ash/ash_export.h"
9 #include "base/macros.h"
10 #include "components/session_manager/session_manager_types.h"
11
12 class AccountId;
13
14 namespace ash {
15
16 class ASH_EXPORT SessionStateObserver {
17 public:
18 // Called when active user has changed.
19 virtual void ActiveUserChanged(const AccountId& account_id) {}
20
21 // Called when another user gets added to the existing session.
22 virtual void UserAddedToSession(const AccountId& account_id) {}
23
24 // Called when session state is changed.
25 virtual void SessionStateChanged(session_manager::SessionState state) {}
26
27 protected:
28 virtual ~SessionStateObserver() {}
29 };
30
31 // A class to attach / detach an object as a session state observer.
32 class ASH_EXPORT ScopedSessionStateObserver {
33 public:
34 explicit ScopedSessionStateObserver(SessionStateObserver* observer);
35 virtual ~ScopedSessionStateObserver();
36
37 private:
38 ash::SessionStateObserver* observer_;
39
40 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver);
41 };
42
43 } // namespace ash
44
45 #endif // ASH_SESSION_SESSION_STATE_OBSERVER_H_
OLDNEW
« no previous file with comments | « ash/session/session_state_delegate.cc ('k') | ash/session/session_state_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698