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

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

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ 6 #define CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
7 7
8 #include "ash/session/session_state_delegate.h" 8 #include "ash/session/session_state_delegate.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool ShouldLockScreenBeforeSuspending() const override; 42 bool ShouldLockScreenBeforeSuspending() const override;
43 void LockScreen() override; 43 void LockScreen() override;
44 void UnlockScreen() override; 44 void UnlockScreen() override;
45 bool IsUserSessionBlocked() const override; 45 bool IsUserSessionBlocked() const override;
46 SessionState GetSessionState() const override; 46 SessionState GetSessionState() const override;
47 const user_manager::UserInfo* GetUserInfo( 47 const user_manager::UserInfo* GetUserInfo(
48 ash::MultiProfileIndex index) const override; 48 ash::MultiProfileIndex index) const override;
49 const user_manager::UserInfo* GetUserInfo( 49 const user_manager::UserInfo* GetUserInfo(
50 content::BrowserContext* context) const override; 50 content::BrowserContext* context) const override;
51 bool ShouldShowAvatar(aura::Window* window) const override; 51 bool ShouldShowAvatar(aura::Window* window) const override;
52 void SwitchActiveUser(const std::string& user_id) override; 52 void SwitchActiveUser(const user_manager::UserID& user_id) override;
53 void CycleActiveUser(CycleUser cycle_user) override; 53 void CycleActiveUser(CycleUser cycle_user) override;
54 bool IsMultiProfileAllowedByPrimaryUserPolicy() const override; 54 bool IsMultiProfileAllowedByPrimaryUserPolicy() const override;
55 void AddSessionStateObserver(ash::SessionStateObserver* observer) override; 55 void AddSessionStateObserver(ash::SessionStateObserver* observer) override;
56 void RemoveSessionStateObserver(ash::SessionStateObserver* observer) override; 56 void RemoveSessionStateObserver(ash::SessionStateObserver* observer) override;
57 57
58 // chromeos::LoginState::Observer overrides. 58 // chromeos::LoginState::Observer overrides.
59 void LoggedInStateChanged() override; 59 void LoggedInStateChanged() override;
60 60
61 // user_manager::UserManager::UserSessionStateObserver: 61 // user_manager::UserManager::UserSessionStateObserver:
62 void ActiveUserChanged(const user_manager::User* active_user) override; 62 void ActiveUserChanged(const user_manager::User* active_user) override;
63 void UserAddedToSession(const user_manager::User* added_user) override; 63 void UserAddedToSession(const user_manager::User* added_user) override;
64 64
65 // chromeos::UserAddingScreen::Observer: 65 // chromeos::UserAddingScreen::Observer:
66 void OnUserAddingStarted() override; 66 void OnUserAddingStarted() override;
67 void OnUserAddingFinished() override; 67 void OnUserAddingFinished() override;
68 68
69 private: 69 private:
70 // Sets session state to |new_state|. 70 // Sets session state to |new_state|.
71 // If |force| is true then |new_state| is set even if existing session 71 // If |force| is true then |new_state| is set even if existing session
72 // state is the same (used for explicit initialization). 72 // state is the same (used for explicit initialization).
73 void SetSessionState(SessionState new_state, bool force); 73 void SetSessionState(SessionState new_state, bool force);
74 74
75 // Notify observers about session state change. 75 // Notify observers about session state change.
76 void NotifySessionStateChanged(); 76 void NotifySessionStateChanged();
77 77
78 // Switches to a new user. This call might show a dialog asking the user if he 78 // Switches to a new user. This call might show a dialog asking the user if he
79 // wants to stop desktop casting before switching. 79 // wants to stop desktop casting before switching.
80 void TryToSwitchUser(const std::string& user_id); 80 void TryToSwitchUser(const user_manager::UserID& user_id);
81 81
82 // List of observers is only used on Chrome OS for now. 82 // List of observers is only used on Chrome OS for now.
83 ObserverList<ash::SessionStateObserver> session_state_observer_list_; 83 ObserverList<ash::SessionStateObserver> session_state_observer_list_;
84 84
85 // Session state (e.g. login screen vs. user session). 85 // Session state (e.g. login screen vs. user session).
86 SessionState session_state_; 86 SessionState session_state_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateChromeos); 88 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateChromeos);
89 }; 89 };
90 90
91 #endif // CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_ 91 #endif // CHROME_BROWSER_UI_ASH_SESSION_STATE_DELEGATE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698