OLD | NEW |
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 Loading... |
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( |
147 SessionControllerClient::DoCycleActiveUser(cycle_user == CYCLE_TO_NEXT_USER); | 147 ash::CycleUserDirection direction) { |
| 148 SessionControllerClient::DoCycleActiveUser(direction); |
148 } | 149 } |
149 | 150 |
150 bool SessionStateDelegateChromeos::IsMultiProfileAllowedByPrimaryUserPolicy() | 151 bool SessionStateDelegateChromeos::IsMultiProfileAllowedByPrimaryUserPolicy() |
151 const { | 152 const { |
152 return chromeos::MultiProfileUserController::GetPrimaryUserPolicy() == | 153 return chromeos::MultiProfileUserController::GetPrimaryUserPolicy() == |
153 chromeos::MultiProfileUserController::ALLOWED; | 154 chromeos::MultiProfileUserController::ALLOWED; |
154 } | 155 } |
155 | 156 |
156 void SessionStateDelegateChromeos::AddSessionStateObserver( | 157 void SessionStateDelegateChromeos::AddSessionStateObserver( |
157 ash::SessionStateObserver* observer) { | 158 ash::SessionStateObserver* observer) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 return; | 198 return; |
198 | 199 |
199 session_state_ = new_state; | 200 session_state_ = new_state; |
200 NotifySessionStateChanged(); | 201 NotifySessionStateChanged(); |
201 } | 202 } |
202 | 203 |
203 void SessionStateDelegateChromeos::NotifySessionStateChanged() { | 204 void SessionStateDelegateChromeos::NotifySessionStateChanged() { |
204 for (ash::SessionStateObserver& observer : session_state_observer_list_) | 205 for (ash::SessionStateObserver& observer : session_state_observer_list_) |
205 observer.SessionStateChanged(session_state_); | 206 observer.SessionStateChanged(session_state_); |
206 } | 207 } |
OLD | NEW |