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

Side by Side Diff: ash/session_state_delegate.h

Issue 15718003: Add SessionStateObserver with ActiveUserChanged() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: close button when switching users, notify observers with ActiveUserChanged() when new user logs in 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
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_SESSION_STATE_DELEGATE_H_ 5 #ifndef ASH_SESSION_STATE_DELEGATE_H_
6 #define ASH_SESSION_STATE_DELEGATE_H_ 6 #define ASH_SESSION_STATE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ash/session_state_observer.h"
12 #include "base/string16.h" 13 #include "base/string16.h"
13 14
14 namespace gfx { 15 namespace gfx {
15 class ImageSkia; 16 class ImageSkia;
16 } // namespace gfx 17 } // namespace gfx
17 18
18 namespace ash { 19 namespace ash {
19 20
20 // The index for the multi-profile item to use. The list is always LRU sorted 21 // The index for the multi-profile item to use. The list is always LRU sorted
21 // So that the index #0 is the currently active user. 22 // So that the index #0 is the currently active user.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 66
66 // Gets the avatar image for the user with the given |index|. 67 // Gets the avatar image for the user with the given |index|.
67 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. 68 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|.
68 virtual const gfx::ImageSkia& GetUserImage(MultiProfileIndex index) const = 0; 69 virtual const gfx::ImageSkia& GetUserImage(MultiProfileIndex index) const = 0;
69 70
70 // Returns a list of all logged in users. 71 // Returns a list of all logged in users.
71 virtual void GetLoggedInUsers(UserEmailList* users) = 0; 72 virtual void GetLoggedInUsers(UserEmailList* users) = 0;
72 73
73 // Switches to another active user (if that user has already signed in). 74 // Switches to another active user (if that user has already signed in).
74 virtual void SwitchActiveUser(const std::string& email) = 0; 75 virtual void SwitchActiveUser(const std::string& email) = 0;
76
77 // Adds or removes sessions state observer.
78 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0;
79 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0;
75 }; 80 };
76 81
77 } // namespace ash 82 } // namespace ash
78 83
79 #endif // ASH_SESSION_STATE_DELEGATE_H_ 84 #endif // ASH_SESSION_STATE_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/session_state_delegate_stub.h » ('j') | ash/session_state_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698