| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/root_window_controller.h" | 5 #include "ash/root_window_controller.h" | 
| 6 | 6 | 
| 7 #include <queue> | 7 #include <queue> | 
| 8 #include <vector> | 8 #include <vector> | 
| 9 | 9 | 
| 10 #include "ash/aura/aura_layout_manager_adapter.h" | 10 #include "ash/aura/aura_layout_manager_adapter.h" | 
| 11 #include "ash/aura/wm_shelf_aura.h" | 11 #include "ash/aura/wm_shelf_aura.h" | 
| 12 #include "ash/aura/wm_window_aura.h" | 12 #include "ash/aura/wm_window_aura.h" | 
| 13 #include "ash/common/ash_constants.h" | 13 #include "ash/common/ash_constants.h" | 
| 14 #include "ash/common/ash_switches.h" | 14 #include "ash/common/ash_switches.h" | 
| 15 #include "ash/common/focus_cycler.h" | 15 #include "ash/common/focus_cycler.h" | 
| 16 #include "ash/common/login_status.h" | 16 #include "ash/common/login_status.h" | 
| 17 #include "ash/common/root_window_controller_common.h" | 17 #include "ash/common/root_window_controller_common.h" | 
| 18 #include "ash/common/session/session_state_delegate.h" | 18 #include "ash/common/session/session_state_delegate.h" | 
| 19 #include "ash/common/shelf/shelf.h" | 19 #include "ash/common/shelf/shelf.h" | 
| 20 #include "ash/common/shelf/shelf_delegate.h" | 20 #include "ash/common/shelf/shelf_delegate.h" | 
| 21 #include "ash/common/shelf/shelf_layout_manager.h" | 21 #include "ash/common/shelf/shelf_layout_manager.h" | 
| 22 #include "ash/common/shelf/shelf_types.h" | 22 #include "ash/common/shelf/shelf_types.h" | 
| 23 #include "ash/common/shelf/shelf_widget.h" | 23 #include "ash/common/shelf/shelf_widget.h" | 
| 24 #include "ash/common/shell_delegate.h" | 24 #include "ash/common/shell_delegate.h" | 
| 25 #include "ash/common/shell_window_ids.h" | 25 #include "ash/common/shell_window_ids.h" | 
| 26 #include "ash/common/system/status_area_layout_manager.h" | 26 #include "ash/common/system/status_area_layout_manager.h" | 
| 27 #include "ash/common/system/status_area_widget.h" | 27 #include "ash/common/system/status_area_widget.h" | 
| 28 #include "ash/common/system/tray/system_tray_delegate.h" | 28 #include "ash/common/system/tray/system_tray_delegate.h" | 
|  | 29 #include "ash/common/wallpaper/wallpaper_delegate.h" | 
| 29 #include "ash/common/wm/always_on_top_controller.h" | 30 #include "ash/common/wm/always_on_top_controller.h" | 
| 30 #include "ash/common/wm/container_finder.h" | 31 #include "ash/common/wm/container_finder.h" | 
| 31 #include "ash/common/wm/dock/docked_window_layout_manager.h" | 32 #include "ash/common/wm/dock/docked_window_layout_manager.h" | 
| 32 #include "ash/common/wm/fullscreen_window_finder.h" | 33 #include "ash/common/wm/fullscreen_window_finder.h" | 
| 33 #include "ash/common/wm/panels/panel_layout_manager.h" | 34 #include "ash/common/wm/panels/panel_layout_manager.h" | 
| 34 #include "ash/common/wm/root_window_layout_manager.h" | 35 #include "ash/common/wm/root_window_layout_manager.h" | 
| 35 #include "ash/common/wm/switchable_windows.h" | 36 #include "ash/common/wm/switchable_windows.h" | 
| 36 #include "ash/common/wm/window_state.h" | 37 #include "ash/common/wm/window_state.h" | 
| 37 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 38 #include "ash/common/wm/workspace/workspace_layout_manager.h" | 
| 38 #include "ash/common/wm_shell.h" | 39 #include "ash/common/wm_shell.h" | 
| 39 #include "ash/common/wm_window.h" | 40 #include "ash/common/wm_window.h" | 
| 40 #include "ash/desktop_background/desktop_background_widget_controller.h" | 41 #include "ash/desktop_background/desktop_background_widget_controller.h" | 
| 41 #include "ash/desktop_background/user_wallpaper_delegate.h" |  | 
| 42 #include "ash/display/display_manager.h" | 42 #include "ash/display/display_manager.h" | 
| 43 #include "ash/high_contrast/high_contrast_controller.h" | 43 #include "ash/high_contrast/high_contrast_controller.h" | 
| 44 #include "ash/host/ash_window_tree_host.h" | 44 #include "ash/host/ash_window_tree_host.h" | 
| 45 #include "ash/root_window_settings.h" | 45 #include "ash/root_window_settings.h" | 
| 46 #include "ash/shelf/shelf_window_targeter.h" | 46 #include "ash/shelf/shelf_window_targeter.h" | 
| 47 #include "ash/shell.h" | 47 #include "ash/shell.h" | 
| 48 #include "ash/touch/touch_hud_debug.h" | 48 #include "ash/touch/touch_hud_debug.h" | 
| 49 #include "ash/touch/touch_hud_projection.h" | 49 #include "ash/touch/touch_hud_projection.h" | 
| 50 #include "ash/touch/touch_observer_hud.h" | 50 #include "ash/touch/touch_observer_hud.h" | 
| 51 #include "ash/wm/lock_layout_manager.h" | 51 #include "ash/wm/lock_layout_manager.h" | 
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 520 #endif | 520 #endif | 
| 521 } | 521 } | 
| 522 | 522 | 
| 523 void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) { | 523 void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) { | 
| 524   // Make sure the wallpaper is visible. | 524   // Make sure the wallpaper is visible. | 
| 525   system_background_->SetColor(SK_ColorBLACK); | 525   system_background_->SetColor(SK_ColorBLACK); | 
| 526 #if defined(OS_CHROMEOS) | 526 #if defined(OS_CHROMEOS) | 
| 527   boot_splash_screen_.reset(); | 527   boot_splash_screen_.reset(); | 
| 528 #endif | 528 #endif | 
| 529 | 529 | 
| 530   Shell::GetInstance() | 530   WmShell::Get()->wallpaper_delegate()->OnWallpaperAnimationFinished(); | 
| 531       ->user_wallpaper_delegate() |  | 
| 532       ->OnWallpaperAnimationFinished(); |  | 
| 533   // Only removes old component when wallpaper animation finished. If we | 531   // Only removes old component when wallpaper animation finished. If we | 
| 534   // remove the old one before the new wallpaper is done fading in there will | 532   // remove the old one before the new wallpaper is done fading in there will | 
| 535   // be a white flash during the animation. | 533   // be a white flash during the animation. | 
| 536   if (animating_wallpaper_controller()) { | 534   if (animating_wallpaper_controller()) { | 
| 537     DesktopBackgroundWidgetController* controller = | 535     DesktopBackgroundWidgetController* controller = | 
| 538         animating_wallpaper_controller()->GetController(true); | 536         animating_wallpaper_controller()->GetController(true); | 
| 539     // |desktop_widget_| should be the same animating widget we try to move | 537     // |desktop_widget_| should be the same animating widget we try to move | 
| 540     // to |kDesktopController|. Otherwise, we may close |desktop_widget_| | 538     // to |kDesktopController|. Otherwise, we may close |desktop_widget_| | 
| 541     // before move it to |kDesktopController|. | 539     // before move it to |kDesktopController|. | 
| 542     DCHECK_EQ(controller->widget(), widget); | 540     DCHECK_EQ(controller->widget(), widget); | 
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 959     aura::Window* primary_root_window = Shell::GetInstance() | 957     aura::Window* primary_root_window = Shell::GetInstance() | 
| 960                                             ->window_tree_host_manager() | 958                                             ->window_tree_host_manager() | 
| 961                                             ->GetPrimaryRootWindow(); | 959                                             ->GetPrimaryRootWindow(); | 
| 962     return GetRootWindowSettings(primary_root_window)->controller; | 960     return GetRootWindowSettings(primary_root_window)->controller; | 
| 963   } | 961   } | 
| 964 | 962 | 
| 965   return GetRootWindowSettings(root_window)->controller; | 963   return GetRootWindowSettings(root_window)->controller; | 
| 966 } | 964 } | 
| 967 | 965 | 
| 968 }  // namespace ash | 966 }  // namespace ash | 
| OLD | NEW | 
|---|