| Index: ash/root_window_controller.cc
|
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
|
| index 85122bd83b767048501dbb949221c1aa1603f852..b7b2ff44fac0fdab3cd59d826d4705b817ceef99 100644
|
| --- a/ash/root_window_controller.cc
|
| +++ b/ash/root_window_controller.cc
|
| @@ -38,7 +38,6 @@
|
| #include "ash/common/wm/workspace/workspace_layout_manager.h"
|
| #include "ash/common/wm_shell.h"
|
| #include "ash/common/wm_window.h"
|
| -#include "ash/desktop_background/desktop_background_widget_controller.h"
|
| #include "ash/display/display_manager.h"
|
| #include "ash/high_contrast/high_contrast_controller.h"
|
| #include "ash/host/ash_window_tree_host.h"
|
| @@ -48,12 +47,13 @@
|
| #include "ash/touch/touch_hud_debug.h"
|
| #include "ash/touch/touch_hud_projection.h"
|
| #include "ash/touch/touch_observer_hud.h"
|
| +#include "ash/wallpaper/wallpaper_widget_controller.h"
|
| #include "ash/wm/lock_layout_manager.h"
|
| #include "ash/wm/panels/attached_panel_window_targeter.h"
|
| #include "ash/wm/panels/panel_window_event_handler.h"
|
| #include "ash/wm/stacking_controller.h"
|
| -#include "ash/wm/system_background_controller.h"
|
| #include "ash/wm/system_modal_container_layout_manager.h"
|
| +#include "ash/wm/system_wallpaper_controller.h"
|
| #include "ash/wm/window_properties.h"
|
| #include "ash/wm/window_state_aura.h"
|
| #include "ash/wm/window_util.h"
|
| @@ -99,7 +99,7 @@ namespace {
|
| // Duration for the animation that hides the boot splash screen, in
|
| // milliseconds. This should be short enough in relation to
|
| // wm/window_animation.cc's brightness/grayscale fade animation that the login
|
| -// background image animation isn't hidden by the splash screen animation.
|
| +// wallpaper image animation isn't hidden by the splash screen animation.
|
| const int kBootSplashScreenHideDurationMs = 500;
|
| #endif
|
|
|
| @@ -163,7 +163,7 @@ void ReparentAllWindows(aura::Window* src, aura::Window* dst) {
|
| };
|
| const int kExtraContainerIdsToMoveInUnifiedMode[] = {
|
| kShellWindowId_LockScreenContainer,
|
| - kShellWindowId_LockScreenBackgroundContainer,
|
| + kShellWindowId_LockScreenWallpaperContainer,
|
| };
|
| std::vector<int> container_ids(
|
| kContainerIdsToMove,
|
| @@ -332,7 +332,7 @@ const aura::Window* RootWindowController::GetRootWindow() const {
|
| }
|
|
|
| void RootWindowController::SetWallpaperController(
|
| - DesktopBackgroundWidgetController* controller) {
|
| + WallpaperWidgetController* controller) {
|
| wallpaper_controller_.reset(controller);
|
| }
|
|
|
| @@ -380,7 +380,7 @@ void RootWindowController::Shutdown() {
|
| display::Display::kInvalidDisplayID;
|
| ash_host_->PrepareForShutdown();
|
|
|
| - system_background_.reset();
|
| + system_wallpaper_.reset();
|
| aura::client::SetScreenPositionClient(root_window, NULL);
|
| }
|
|
|
| @@ -507,13 +507,13 @@ void RootWindowController::UpdateAfterLoginStatusChange(LoginStatus status) {
|
| shelf_widget_->status_area_widget()->UpdateAfterLoginStatusChange(status);
|
| }
|
|
|
| -void RootWindowController::HandleInitialDesktopBackgroundAnimationStarted() {
|
| +void RootWindowController::HandleInitialWallpaperAnimationStarted() {
|
| #if defined(OS_CHROMEOS)
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kAshAnimateFromBootSplashScreen) &&
|
| boot_splash_screen_.get()) {
|
| - // Make the splash screen fade out so it doesn't obscure the desktop
|
| - // wallpaper's brightness/grayscale animation.
|
| + // Make the splash screen fade out so it doesn't obscure the wallpaper's
|
| + // brightness/grayscale animation.
|
| boot_splash_screen_->StartHideAnimation(
|
| base::TimeDelta::FromMilliseconds(kBootSplashScreenHideDurationMs));
|
| }
|
| @@ -522,7 +522,7 @@ void RootWindowController::HandleInitialDesktopBackgroundAnimationStarted() {
|
|
|
| void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) {
|
| // Make sure the wallpaper is visible.
|
| - system_background_->SetColor(SK_ColorBLACK);
|
| + system_wallpaper_->SetColor(SK_ColorBLACK);
|
| #if defined(OS_CHROMEOS)
|
| boot_splash_screen_.reset();
|
| #endif
|
| @@ -532,13 +532,10 @@ void RootWindowController::OnWallpaperAnimationFinished(views::Widget* widget) {
|
| // remove the old one before the new wallpaper is done fading in there will
|
| // be a white flash during the animation.
|
| if (animating_wallpaper_controller()) {
|
| - DesktopBackgroundWidgetController* controller =
|
| + WallpaperWidgetController* controller =
|
| animating_wallpaper_controller()->GetController(true);
|
| - // |desktop_widget_| should be the same animating widget we try to move
|
| - // to |kDesktopController|. Otherwise, we may close |desktop_widget_|
|
| - // before move it to |kDesktopController|.
|
| DCHECK_EQ(controller->widget(), widget);
|
| - // Release the old controller and close its background widget.
|
| + // Release the old controller and close its wallpaper widget.
|
| SetWallpaperController(controller);
|
| }
|
| }
|
| @@ -573,7 +570,7 @@ void RootWindowController::CloseChildWindows() {
|
| if (shelf_widget_)
|
| shelf_widget_->Shutdown();
|
|
|
| - // Close background widget first as it depends on tooltip.
|
| + // Close wallpaper widget first as it depends on tooltip.
|
| wallpaper_controller_.reset();
|
| animating_wallpaper_controller_.reset();
|
|
|
| @@ -648,7 +645,7 @@ void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen,
|
| menu_model_.get(),
|
| base::Bind(&RootWindowController::OnMenuClosed, base::Unretained(this))));
|
|
|
| - // Background controller may not be set yet if user clicked on status are
|
| + // Wallpaper controller may not be set yet if user clicked on status are
|
| // before initial animation completion. See crbug.com/222218
|
| if (!wallpaper_controller_.get())
|
| return;
|
| @@ -759,7 +756,7 @@ void RootWindowController::Init(RootWindowType root_window_type,
|
|
|
| root_window_controller_common_->CreateContainers();
|
|
|
| - CreateSystemBackground(first_run_after_boot);
|
| + CreateSystemWallpaper(first_run_after_boot);
|
|
|
| InitLayoutManagers();
|
| InitTouchHuds();
|
| @@ -848,9 +845,9 @@ void RootWindowController::InitLayoutManagers() {
|
| mouse_event_target_.reset(new aura::Window(new EmptyWindowDelegate));
|
| mouse_event_target_->Init(ui::LAYER_NOT_DRAWN);
|
|
|
| - aura::Window* lock_background_container =
|
| - GetContainer(kShellWindowId_LockScreenBackgroundContainer);
|
| - lock_background_container->AddChild(mouse_event_target_.get());
|
| + aura::Window* lock_wallpaper_container =
|
| + GetContainer(kShellWindowId_LockScreenWallpaperContainer);
|
| + lock_wallpaper_container->AddChild(mouse_event_target_.get());
|
| mouse_event_target_->Show();
|
| }
|
|
|
| @@ -892,19 +889,18 @@ void RootWindowController::InitTouchHuds() {
|
| EnableTouchHudProjection();
|
| }
|
|
|
| -void RootWindowController::CreateSystemBackground(
|
| - bool is_first_run_after_boot) {
|
| +void RootWindowController::CreateSystemWallpaper(bool is_first_run_after_boot) {
|
| SkColor color = SK_ColorBLACK;
|
| #if defined(OS_CHROMEOS)
|
| if (is_first_run_after_boot)
|
| color = kChromeOsBootColor;
|
| #endif
|
| - system_background_.reset(
|
| - new SystemBackgroundController(GetRootWindow(), color));
|
| + system_wallpaper_.reset(
|
| + new SystemWallpaperController(GetRootWindow(), color));
|
|
|
| #if defined(OS_CHROMEOS)
|
| // Make a copy of the system's boot splash screen so we can composite it
|
| - // onscreen until the desktop background is ready.
|
| + // onscreen until the wallpaper is ready.
|
| if (is_first_run_after_boot &&
|
| (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| switches::kAshCopyHostBackgroundAtBoot) ||
|
|
|