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

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

Issue 2724163002: ash: Use enum for SessionController::CycleActiveUser (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
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 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h"
6 6
7 #include "ash/common/session/session_state_observer.h" 7 #include "ash/common/session/session_state_observer.h"
8 #include "ash/common/wm_window.h" 8 #include "ash/common/wm_window.h"
9 #include "ash/content/shell_content_state.h" 9 #include "ash/content/shell_content_state.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow( 136 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow(
137 ash::WmWindow::GetAuraWindow(window)); 137 ash::WmWindow::GetAuraWindow(window));
138 return GetAvatarImageForContext(context); 138 return GetAvatarImageForContext(context);
139 } 139 }
140 140
141 void SessionStateDelegateChromeos::SwitchActiveUser( 141 void SessionStateDelegateChromeos::SwitchActiveUser(
142 const AccountId& account_id) { 142 const AccountId& account_id) {
143 SessionControllerClient::DoSwitchActiveUser(account_id); 143 SessionControllerClient::DoSwitchActiveUser(account_id);
144 } 144 }
145 145
146 void SessionStateDelegateChromeos::CycleActiveUser(CycleUser cycle_user) { 146 void SessionStateDelegateChromeos::CycleActiveUser(ash::CycleUser cycle_user) {
147 SessionControllerClient::DoCycleActiveUser(cycle_user == CYCLE_TO_NEXT_USER); 147 SessionControllerClient::DoCycleActiveUser(cycle_user);
148 } 148 }
149 149
150 bool SessionStateDelegateChromeos::IsMultiProfileAllowedByPrimaryUserPolicy() 150 bool SessionStateDelegateChromeos::IsMultiProfileAllowedByPrimaryUserPolicy()
151 const { 151 const {
152 return chromeos::MultiProfileUserController::GetPrimaryUserPolicy() == 152 return chromeos::MultiProfileUserController::GetPrimaryUserPolicy() ==
153 chromeos::MultiProfileUserController::ALLOWED; 153 chromeos::MultiProfileUserController::ALLOWED;
154 } 154 }
155 155
156 void SessionStateDelegateChromeos::AddSessionStateObserver( 156 void SessionStateDelegateChromeos::AddSessionStateObserver(
157 ash::SessionStateObserver* observer) { 157 ash::SessionStateObserver* observer) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 return; 197 return;
198 198
199 session_state_ = new_state; 199 session_state_ = new_state;
200 NotifySessionStateChanged(); 200 NotifySessionStateChanged();
201 } 201 }
202 202
203 void SessionStateDelegateChromeos::NotifySessionStateChanged() { 203 void SessionStateDelegateChromeos::NotifySessionStateChanged() {
204 for (ash::SessionStateObserver& observer : session_state_observer_list_) 204 for (ash::SessionStateObserver& observer : session_state_observer_list_)
205 observer.SessionStateChanged(session_state_); 205 observer.SessionStateChanged(session_state_);
206 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698