Chromium Code Reviews| 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/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/wm/mru_window_tracker.h" | 8 #include "ash/common/wm/mru_window_tracker.h" |
| 9 #include "ash/common/wm/window_positioner.h" | 9 #include "ash/common/wm/window_positioner.h" |
| 10 #include "ash/common/wm/window_state.h" | 10 #include "ash/common/wm/window_state.h" |
| 11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
| 12 #include "ash/desktop_background/user_wallpaper_delegate.h" | 12 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| 13 #include "ash/root_window_controller.h" | 13 #include "ash/root_window_controller.h" |
| 14 #include "ash/shelf/shelf_layout_manager.h" | 14 #include "ash/shelf/shelf_layout_manager.h" |
| 15 #include "ash/shelf/shelf_widget.h" | 15 #include "ash/shelf/shelf_widget.h" |
| 16 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 17 #include "ash/wm/window_state_aura.h" | 17 #include "ash/wm/window_state_aura.h" |
| 18 #include "ash/wm/window_util.h" | 18 #include "ash/wm/window_util.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 20 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 22 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chrom eos.h" | 22 #include "chrome/browser/ui/ash/multi_user/multi_user_notification_blocker_chrom eos.h" |
| 23 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" | 23 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" |
| 24 #include "chrome/browser/ui/browser.h" | |
| 25 #include "chrome/browser/ui/browser_list.h" | |
| 24 #include "ui/compositor/layer_animation_observer.h" | 26 #include "ui/compositor/layer_animation_observer.h" |
| 25 #include "ui/compositor/layer_tree_owner.h" | 27 #include "ui/compositor/layer_tree_owner.h" |
| 26 #include "ui/wm/core/window_util.h" | 28 #include "ui/wm/core/window_util.h" |
| 27 #include "ui/wm/public/activation_client.h" | 29 #include "ui/wm/public/activation_client.h" |
| 28 | 30 |
| 29 namespace chrome { | 31 namespace chrome { |
| 30 | 32 |
| 31 namespace { | 33 namespace { |
| 32 | 34 |
| 33 // The minimal possible animation time for animations which should happen | 35 // The minimal possible animation time for animations which should happen |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 370 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); | 372 ash::wm::WindowState* window_state = ash::wm::GetWindowState(window); |
| 371 if (owner_->IsWindowOnDesktopOfUser(window, new_account_id_) && | 373 if (owner_->IsWindowOnDesktopOfUser(window, new_account_id_) && |
| 372 !window_state->IsMinimized()) { | 374 !window_state->IsMinimized()) { |
| 373 // Several unit tests come here without an activation client. | 375 // Several unit tests come here without an activation client. |
| 374 aura::client::ActivationClient* client = | 376 aura::client::ActivationClient* client = |
| 375 aura::client::GetActivationClient(window->GetRootWindow()); | 377 aura::client::GetActivationClient(window->GetRootWindow()); |
| 376 if (client) | 378 if (client) |
| 377 client->ActivateWindow(window); | 379 client->ActivateWindow(window); |
| 378 } | 380 } |
| 379 } | 381 } |
| 382 // The user shelf transition animation may cause browser's status | |
|
sky
2016/07/25 15:23:40
Seems like you are working around a bug in the she
Qiang(Joe) Xu
2016/07/25 21:19:36
Yes. The reason is shelf animation between transit
| |
| 383 // bubble misplaced. See crbug.com/624806. | |
| 384 for (auto* browser : *BrowserList::GetInstance()) | |
| 385 browser->UpdateStatusBubblePosition(); | |
| 380 | 386 |
| 381 owner_->notification_blocker()->ActiveUserChanged(new_account_id_); | 387 owner_->notification_blocker()->ActiveUserChanged(new_account_id_); |
| 382 break; | 388 break; |
| 383 } | 389 } |
| 384 case ANIMATION_STEP_ENDED: | 390 case ANIMATION_STEP_ENDED: |
| 385 NOTREACHED(); | 391 NOTREACHED(); |
| 386 break; | 392 break; |
| 387 } | 393 } |
| 388 } | 394 } |
| 389 | 395 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 433 if (itr != window_to_entry_map.end()) { | 439 if (itr != window_to_entry_map.end()) { |
| 434 windows_by_account_id_[itr->second->show_for_user()].push_back( | 440 windows_by_account_id_[itr->second->show_for_user()].push_back( |
| 435 child_window); | 441 child_window); |
| 436 } | 442 } |
| 437 } | 443 } |
| 438 } | 444 } |
| 439 } | 445 } |
| 440 } | 446 } |
| 441 | 447 |
| 442 } // namespace chrome | 448 } // namespace chrome |
| OLD | NEW |