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

Side by Side Diff: chrome/browser/ui/ash/session_state_delegate_chromeos.h

Issue 15718003: Add SessionStateObserver with ActiveUserChanged() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge & add SessionStateDelegateChromeos Created 7 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 | Annotate | Revision Log
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 CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
7
8 #include "ash/session_state_delegate.h"
9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h"
11 #include "base/observer_list.h"
12 #include "chrome/browser/chromeos/login/user_manager.h"
13
14 namespace ash {
15 class SessionStateObserver;
16 } // namespace ash
17
18 class SessionStateDelegateChromeos
19 : public ash::SessionStateDelegate,
20 public chromeos::UserManager::UserSessionStateObserver {
21 public:
22 SessionStateDelegateChromeos();
23 virtual ~SessionStateDelegateChromeos();
24
25 // ash::SessionStateDelegate:
26 virtual int GetMaximumNumberOfLoggedInUsers() const OVERRIDE;
27 virtual int NumberOfLoggedInUsers() const OVERRIDE;
28 virtual bool IsActiveUserSessionStarted() const OVERRIDE;
29 virtual bool CanLockScreen() const OVERRIDE;
30 virtual bool IsScreenLocked() const OVERRIDE;
31 virtual void LockScreen() OVERRIDE;
32 virtual void UnlockScreen() OVERRIDE;
33 virtual const base::string16 GetUserDisplayName(
34 ash::MultiProfileIndex index) const OVERRIDE;
35 virtual const std::string GetUserEmail(
36 ash::MultiProfileIndex index) const OVERRIDE;
37 virtual const gfx::ImageSkia& GetUserImage(
38 ash::MultiProfileIndex index) const OVERRIDE;
39 virtual void GetLoggedInUsers(ash::UserIdList* users) OVERRIDE;
40 virtual void SwitchActiveUser(const std::string& user_id) OVERRIDE;
41 virtual void AddSessionStateObserver(
42 ash::SessionStateObserver* observer) OVERRIDE;
43 virtual void RemoveSessionStateObserver(
44 ash::SessionStateObserver* observer) OVERRIDE;
45
46 // UserManager::UserSessionStateObserver:
47 virtual void ActiveUserChanged(const chromeos::User* active_user) OVERRIDE;
48
49 private:
50 // List of observers is only used on Chrome OS for now.
51 ObserverList<ash::SessionStateObserver> session_state_observer_list_;
52
53 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateChromeos);
54 };
55
56 #endif // CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/session_state_delegate.h ('k') | chrome/browser/ui/ash/session_state_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698