Index: ash/wm/workspace/workspace_cycler_animator.cc |
diff --git a/ash/wm/workspace/workspace_cycler_animator.cc b/ash/wm/workspace/workspace_cycler_animator.cc |
index a22375c4e84c3d6fae22c83b3c8256085dc44ad9..a795cd08581e57767d993b7ac6c1efa93ec1d382 100644 |
--- a/ash/wm/workspace/workspace_cycler_animator.cc |
+++ b/ash/wm/workspace/workspace_cycler_animator.cc |
@@ -10,9 +10,10 @@ |
#include "ash/launcher/launcher.h" |
#include "ash/root_window_controller.h" |
#include "ash/screen_ash.h" |
+#include "ash/shelf/shelf_layout_manager.h" |
+#include "ash/shelf/shelf_widget.h" |
#include "ash/shell_window_ids.h" |
#include "ash/wm/property_util.h" |
-#include "ash/wm/shelf_layout_manager.h" |
#include "ash/wm/workspace/colored_window_controller.h" |
#include "ash/wm/workspace/workspace.h" |
#include "ash/wm/workspace/workspace_cycler_configuration.h" |
@@ -660,17 +661,16 @@ void WorkspaceCyclerAnimator::CreateLauncherBackground() { |
if (screen_bounds_ == maximized_bounds_) |
return; |
- aura::Window* random_workspace_window = workspaces_[0]->window(); |
- ash::Launcher* launcher = ash::Launcher::ForWindow(random_workspace_window); |
- aura::Window* launcher_window = launcher->widget()->GetNativeWindow(); |
- |
// TODO(pkotwicz): Figure out what to do when the launcher visible state is |
// SHELF_AUTO_HIDE. |
ShelfLayoutManager* shelf_layout_manager = |
- ShelfLayoutManager::ForLauncher(launcher_window); |
+ ShelfLayoutManager::ForLauncher(workspaces_[0]->window()); |
if (!shelf_layout_manager->IsVisible()) |
return; |
+ aura::Window* launcher_window = shelf_layout_manager->shelf_widget()-> |
+ GetNativeWindow(); |
+ |
gfx::Rect shelf_bounds = shelf_layout_manager->GetIdealBounds(); |
launcher_background_controller_.reset(new ColoredWindowController( |