OLD | NEW |
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/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
10 #include "ash/shelf/wm_shelf.h" | 10 #include "ash/shelf/wm_shelf.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 break; | 357 break; |
358 } | 358 } |
359 case ANIMATION_STEP_SHOW_NEW_USER: { | 359 case ANIMATION_STEP_SHOW_NEW_USER: { |
360 // In order to make the animation look better, we had to move the code | 360 // In order to make the animation look better, we had to move the code |
361 // that shows the new user to the previous step. Hence, we do nothing | 361 // that shows the new user to the previous step. Hence, we do nothing |
362 // here. | 362 // here. |
363 break; | 363 break; |
364 } | 364 } |
365 case ANIMATION_STEP_FINALIZE: { | 365 case ANIMATION_STEP_FINALIZE: { |
366 // Reactivate the MRU window of the new user. | 366 // Reactivate the MRU window of the new user. |
367 aura::Window::Windows mru_list = ash::WmWindow::ToAuraWindows( | 367 aura::Window::Windows mru_list = |
368 ash::Shell::Get()->mru_window_tracker()->BuildMruWindowList()); | 368 ash::Shell::Get()->mru_window_tracker()->BuildMruWindowList(); |
369 if (!mru_list.empty()) { | 369 if (!mru_list.empty()) { |
370 aura::Window* window = mru_list[0]; | 370 aura::Window* window = mru_list[0]; |
371 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); | 371 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); |
372 if (owner_->IsWindowOnDesktopOfUser(window, new_account_id_) && | 372 if (owner_->IsWindowOnDesktopOfUser(window, new_account_id_) && |
373 !window_state->IsMinimized()) { | 373 !window_state->IsMinimized()) { |
374 // Several unit tests come here without an activation client. | 374 // Several unit tests come here without an activation client. |
375 aura::client::ActivationClient* client = | 375 aura::client::ActivationClient* client = |
376 aura::client::GetActivationClient(window->GetRootWindow()); | 376 aura::client::GetActivationClient(window->GetRootWindow()); |
377 if (client) | 377 if (client) |
378 client->ActivateWindow(window); | 378 client->ActivateWindow(window); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 if (itr != window_to_entry_map.end()) { | 434 if (itr != window_to_entry_map.end()) { |
435 windows_by_account_id_[itr->second->show_for_user()].push_back( | 435 windows_by_account_id_[itr->second->show_for_user()].push_back( |
436 child_window); | 436 child_window); |
437 } | 437 } |
438 } | 438 } |
439 } | 439 } |
440 } | 440 } |
441 } | 441 } |
442 | 442 |
443 } // namespace chrome | 443 } // namespace chrome |
OLD | NEW |