| Index: ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| index d2bc5da1d81a3d11d70bf767a9fe4fd57a0f392a..918b2fd0a6c38216d7c9a565b75ce11cf70db465 100644
|
| --- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| +++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
|
| @@ -12,6 +12,7 @@
|
| #include "ash/root_window_controller.h"
|
| #include "ash/screen_util.h"
|
| #include "ash/session/session_state_delegate.h"
|
| +#include "ash/shelf/shelf.h"
|
| #include "ash/shelf/shelf_layout_manager.h"
|
| #include "ash/shell.h"
|
| #include "ash/shell_observer.h"
|
| @@ -315,8 +316,8 @@ class DontClobberRestoreBoundsWindowObserver : public aura::WindowObserver {
|
| aura::Window* w = window_;
|
| window_ = nullptr;
|
|
|
| - gfx::Rect shelf_bounds(Shell::GetPrimaryRootWindowController()->
|
| - GetShelfLayoutManager()->GetIdealBounds());
|
| + gfx::Rect shelf_bounds(
|
| + Shelf::ForPrimaryDisplay()->shelf_layout_manager()->GetIdealBounds());
|
| const gfx::Rect& window_bounds(w->bounds());
|
| w->SetBounds(gfx::Rect(window_bounds.x(), shelf_bounds.y() - 1,
|
| window_bounds.width(), window_bounds.height()));
|
| @@ -792,8 +793,9 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
|
| window->SetProperty(aura::client::kAlwaysOnTopKey, true);
|
| window->Show();
|
|
|
| - ShelfLayoutManager* shelf = ShelfLayoutManager::ForShelf(window.get());
|
| - shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| + ShelfLayoutManager* shelf_layout_manager =
|
| + Shelf::ForWindow(window.get())->shelf_layout_manager();
|
| + shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
|
|
| window->SetBounds(ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()));
|
| gfx::Rect window_bounds = window->bounds();
|
| @@ -803,12 +805,12 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
|
|
|
| // The window size should not get touched while we are in lock screen.
|
| Shell::GetInstance()->session_state_delegate()->LockScreen();
|
| - shelf->UpdateVisibilityState();
|
| + shelf_layout_manager->UpdateVisibilityState();
|
| EXPECT_EQ(window_bounds.ToString(), window->bounds().ToString());
|
|
|
| // Coming out of the lock screen the window size should still remain.
|
| Shell::GetInstance()->session_state_delegate()->UnlockScreen();
|
| - shelf->UpdateVisibilityState();
|
| + shelf_layout_manager->UpdateVisibilityState();
|
| EXPECT_EQ(
|
| ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()).ToString(),
|
| window_bounds.ToString());
|
| @@ -984,7 +986,7 @@ TEST_F(WorkspaceLayoutManagerBackdropTest, VerifyBackdropAndItsStacking) {
|
| // entire workspace area.
|
| TEST_F(WorkspaceLayoutManagerBackdropTest, ShelfVisibilityChangesBounds) {
|
| ShelfLayoutManager* shelf_layout_manager =
|
| - Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
|
| + Shelf::ForPrimaryDisplay()->shelf_layout_manager();
|
| ShowTopWindowBackdrop(true);
|
| RunAllPendingInMessageLoop();
|
|
|
|
|