| Index: ash/test/test_shelf_delegate.cc
|
| diff --git a/ash/test/test_shelf_delegate.cc b/ash/test/test_shelf_delegate.cc
|
| index 1e892e029c963f255f299edd34c1b78f7ea1f79f..c700ebf6a706b61c68eab916c928a453919b5ae9 100644
|
| --- a/ash/test/test_shelf_delegate.cc
|
| +++ b/ash/test/test_shelf_delegate.cc
|
| @@ -6,8 +6,9 @@
|
|
|
| #include <utility>
|
|
|
| +#include "ash/aura/wm_window_aura.h"
|
| #include "ash/common/shelf/shelf_model.h"
|
| -#include "ash/shelf/shelf_util.h"
|
| +#include "ash/common/wm_window_property.h"
|
| #include "ash/test/test_shelf_item_delegate.h"
|
| #include "base/strings/string_util.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| @@ -34,7 +35,9 @@ void TestShelfDelegate::AddShelfItem(aura::Window* window) {
|
| void TestShelfDelegate::AddShelfItem(aura::Window* window,
|
| const std::string& app_id) {
|
| AddShelfItem(window, STATUS_CLOSED);
|
| - AddShelfIDToAppIDMapping(GetShelfIDForWindow(window), app_id);
|
| + WmWindow* wm_window = WmWindowAura::Get(window);
|
| + ShelfID shelf_id = wm_window->GetIntProperty(WmWindowProperty::SHELF_ID);
|
| + AddShelfIDToAppIDMapping(shelf_id, app_id);
|
| }
|
|
|
| void TestShelfDelegate::AddShelfItem(aura::Window* window,
|
| @@ -52,11 +55,12 @@ void TestShelfDelegate::AddShelfItem(aura::Window* window,
|
| std::unique_ptr<ShelfItemDelegate> delegate(
|
| new TestShelfItemDelegate(window));
|
| model_->SetShelfItemDelegate(id, std::move(delegate));
|
| - SetShelfIDForWindow(id, window);
|
| + WmWindowAura::Get(window)->SetIntProperty(WmWindowProperty::SHELF_ID, id);
|
| }
|
|
|
| void TestShelfDelegate::RemoveShelfItemForWindow(aura::Window* window) {
|
| - ShelfID shelf_id = GetShelfIDForWindow(window);
|
| + WmWindow* wm_window = WmWindowAura::Get(window);
|
| + ShelfID shelf_id = wm_window->GetIntProperty(WmWindowProperty::SHELF_ID);
|
| if (shelf_id == 0)
|
| return;
|
| int index = model_->ItemIndexByID(shelf_id);
|
|
|