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

Side by Side Diff: chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.cc

Issue 2042913002: Converts MruWindowTracker to work with common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not equal Created 4 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
« no previous file with comments | « chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/multi_user/user_switch_animator_chromeos.h" 5 #include "chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h"
6 6
7 #include "ash/aura/wm_window_aura.h"
7 #include "ash/common/wm/window_positioner.h" 8 #include "ash/common/wm/window_positioner.h"
8 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
9 #include "ash/desktop_background/user_wallpaper_delegate.h" 10 #include "ash/desktop_background/user_wallpaper_delegate.h"
10 #include "ash/root_window_controller.h" 11 #include "ash/root_window_controller.h"
11 #include "ash/shelf/shelf_layout_manager.h" 12 #include "ash/shelf/shelf_layout_manager.h"
12 #include "ash/shelf/shelf_widget.h" 13 #include "ash/shelf/shelf_widget.h"
13 #include "ash/shell.h" 14 #include "ash/shell.h"
14 #include "ash/wm/mru_window_tracker.h" 15 #include "ash/wm/mru_window_tracker.h"
15 #include "ash/wm/window_state_aura.h" 16 #include "ash/wm/window_state_aura.h"
16 #include "ash/wm/window_util.h" 17 #include "ash/wm/window_util.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 break; 356 break;
356 } 357 }
357 case ANIMATION_STEP_SHOW_NEW_USER: { 358 case ANIMATION_STEP_SHOW_NEW_USER: {
358 // In order to make the animation look better, we had to move the code 359 // In order to make the animation look better, we had to move the code
359 // that shows the new user to the previous step. Hence, we do nothing 360 // that shows the new user to the previous step. Hence, we do nothing
360 // here. 361 // here.
361 break; 362 break;
362 } 363 }
363 case ANIMATION_STEP_FINALIZE: { 364 case ANIMATION_STEP_FINALIZE: {
364 // Reactivate the MRU window of the new user. 365 // Reactivate the MRU window of the new user.
365 ash::MruWindowTracker::WindowList mru_list = 366 aura::Window::Windows mru_list =
366 ash::Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList(); 367 ash::WmWindowAura::ToAuraWindows(ash::Shell::GetInstance()
368 ->mru_window_tracker()
369 ->BuildMruWindowList());
367 if (!mru_list.empty()) { 370 if (!mru_list.empty()) {
368 aura::Window* window = mru_list[0]; 371 aura::Window* window = mru_list[0];
369 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); 372 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window);
370 if (owner_->IsWindowOnDesktopOfUser(window, new_account_id_) && 373 if (owner_->IsWindowOnDesktopOfUser(window, new_account_id_) &&
371 !window_state->IsMinimized()) { 374 !window_state->IsMinimized()) {
372 // Several unit tests come here without an activation client. 375 // Several unit tests come here without an activation client.
373 aura::client::ActivationClient* client = 376 aura::client::ActivationClient* client =
374 aura::client::GetActivationClient(window->GetRootWindow()); 377 aura::client::GetActivationClient(window->GetRootWindow());
375 if (client) 378 if (client)
376 client->ActivateWindow(window); 379 client->ActivateWindow(window);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 if (itr != window_to_entry_map.end()) { 435 if (itr != window_to_entry_map.end()) {
433 windows_by_account_id_[itr->second->show_for_user()].push_back( 436 windows_by_account_id_[itr->second->show_for_user()].push_back(
434 child_window); 437 child_window);
435 } 438 }
436 } 439 }
437 } 440 }
438 } 441 }
439 } 442 }
440 443
441 } // namespace chrome 444 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698