| Index: ash/common/test/test_shelf_delegate.cc
|
| diff --git a/ash/common/test/test_shelf_delegate.cc b/ash/common/test/test_shelf_delegate.cc
|
| index d0f21f0c51190495a36122f35fa2996416e8ba6b..24a1ad503cc4f3ee0c5e045f6d5861f3482082c6 100644
|
| --- a/ash/common/test/test_shelf_delegate.cc
|
| +++ b/ash/common/test/test_shelf_delegate.cc
|
| @@ -15,6 +15,7 @@
|
| #include "ash/common/wm_window_property.h"
|
| #include "ash/root_window_controller.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "ui/aura/window.h"
|
|
|
| namespace ash {
|
| namespace test {
|
| @@ -75,7 +76,7 @@ void TestShelfDelegate::AddShelfItem(WmWindow* window, ShelfItemStatus status) {
|
| ShelfID id = model->next_id();
|
| item.status = status;
|
| model->Add(item);
|
| - window->AddObserver(this);
|
| + window->aura_window()->AddObserver(this);
|
|
|
| model->SetShelfItemDelegate(id,
|
| base::MakeUnique<TestShelfItemDelegate>(window));
|
| @@ -90,7 +91,7 @@ void TestShelfDelegate::RemoveShelfItemForWindow(WmWindow* window) {
|
| int index = model->ItemIndexByID(shelf_id);
|
| DCHECK_NE(-1, index);
|
| model->RemoveItemAt(index);
|
| - window->RemoveObserver(this);
|
| + window->aura_window()->RemoveObserver(this);
|
| if (HasShelfIDToAppIDMapping(shelf_id)) {
|
| const std::string& app_id = GetAppIDForShelfID(shelf_id);
|
| if (IsAppPinned(app_id))
|
| @@ -100,17 +101,17 @@ void TestShelfDelegate::RemoveShelfItemForWindow(WmWindow* window) {
|
| }
|
| }
|
|
|
| -void TestShelfDelegate::OnWindowDestroying(WmWindow* window) {
|
| - RemoveShelfItemForWindow(window);
|
| +void TestShelfDelegate::OnWindowDestroying(aura::Window* window) {
|
| + RemoveShelfItemForWindow(WmWindow::Get(window));
|
| }
|
|
|
| -void TestShelfDelegate::OnWindowTreeChanging(WmWindow* window,
|
| - const TreeChangeParams& params) {
|
| +void TestShelfDelegate::OnWindowHierarchyChanging(
|
| + const HierarchyChangeParams& params) {
|
| // The window may be legitimately reparented while staying open if it moves
|
| // to another display or container. If the window does not have a new parent
|
| // then remove the shelf item.
|
| if (!params.new_parent)
|
| - RemoveShelfItemForWindow(params.target);
|
| + RemoveShelfItemForWindow(WmWindow::Get(params.target));
|
| }
|
|
|
| ShelfID TestShelfDelegate::GetShelfIDForAppID(const std::string& app_id) {
|
|
|