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

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

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 years, 11 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/aura/wm_window_aura.h"
8 #include "ash/common/session/session_state_observer.h" 7 #include "ash/common/session/session_state_observer.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"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 14 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
15 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 15 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
16 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" 16 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
17 #include "chrome/browser/chromeos/profiles/profile_helper.h" 17 #include "chrome/browser/chromeos/profiles/profile_helper.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 const user_manager::UserInfo* SessionStateDelegateChromeos::GetUserInfo( 121 const user_manager::UserInfo* SessionStateDelegateChromeos::GetUserInfo(
122 ash::UserIndex index) const { 122 ash::UserIndex index) const {
123 DCHECK_LT(index, NumberOfLoggedInUsers()); 123 DCHECK_LT(index, NumberOfLoggedInUsers());
124 return user_manager::UserManager::Get()->GetLRULoggedInUsers()[index]; 124 return user_manager::UserManager::Get()->GetLRULoggedInUsers()[index];
125 } 125 }
126 126
127 bool SessionStateDelegateChromeos::ShouldShowAvatar( 127 bool SessionStateDelegateChromeos::ShouldShowAvatar(
128 ash::WmWindow* window) const { 128 ash::WmWindow* window) const {
129 return chrome::MultiUserWindowManager::GetInstance()->ShouldShowAvatar( 129 return chrome::MultiUserWindowManager::GetInstance()->ShouldShowAvatar(
130 ash::WmWindowAura::GetAuraWindow(window)); 130 ash::WmWindow::GetAuraWindow(window));
131 } 131 }
132 132
133 gfx::ImageSkia SessionStateDelegateChromeos::GetAvatarImageForWindow( 133 gfx::ImageSkia SessionStateDelegateChromeos::GetAvatarImageForWindow(
134 ash::WmWindow* window) const { 134 ash::WmWindow* window) const {
135 content::BrowserContext* context = 135 content::BrowserContext* context =
136 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow( 136 ash::ShellContentState::GetInstance()->GetBrowserContextForWindow(
137 ash::WmWindowAura::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(CycleUser cycle_user) {
147 SessionControllerClient::DoCycleActiveUser(cycle_user == CYCLE_TO_NEXT_USER); 147 SessionControllerClient::DoCycleActiveUser(cycle_user == CYCLE_TO_NEXT_USER);
(...skipping 49 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
« no previous file with comments | « chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc ('k') | chrome/browser/ui/ash/shelf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698