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

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

Issue 2041233004: mash: Move //ash/session to //ash/common/session (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 <string>
9
10 #include "ash/ash_export.h"
11 #include "ash/session/session_state_delegate.h"
12 #include "base/macros.h"
13
14 class AccountId;
15
16 namespace ash {
17
18 class ASH_EXPORT SessionStateObserver {
19 public:
20 // Called when active user has changed.
21 virtual void ActiveUserChanged(const AccountId& account_id) {}
22
23 // Called when another user gets added to the existing session.
24 virtual void UserAddedToSession(const AccountId& account_id) {}
25
26 // Called when session state is changed.
27 virtual void SessionStateChanged(SessionStateDelegate::SessionState state) {}
28
29 protected:
30 virtual ~SessionStateObserver() {}
31 };
32
33 // A class to attach / detach an object as a session state observer with a
34 // scoped pointer.
35 class ASH_EXPORT ScopedSessionStateObserver {
36 public:
37 explicit ScopedSessionStateObserver(ash::SessionStateObserver* observer);
38 virtual ~ScopedSessionStateObserver();
39
40 private:
41 ash::SessionStateObserver* observer_;
42
43 DISALLOW_COPY_AND_ASSIGN(ScopedSessionStateObserver);
44 };
45
46 } // namespace ash
47
48 #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