Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: ash/sysui/shelf_delegate_mus.cc

Issue 2171813004: mash: Fold ShelfItemDelegateManager into ShelfModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicitly destroy ShelfItemDelegates Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/test/shelf_item_delegate_manager_test_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/sysui/shelf_delegate_mus.cc
diff --git a/ash/sysui/shelf_delegate_mus.cc b/ash/sysui/shelf_delegate_mus.cc
index a1c229dc68e004e8109a97b22f1a7f8376861d10..d679f56f644c69e6a4f945fefe9ede331a5c099e 100644
--- a/ash/sysui/shelf_delegate_mus.cc
+++ b/ash/sysui/shelf_delegate_mus.cc
@@ -7,14 +7,13 @@
#include <memory>
#include "ash/common/shelf/shelf_item_delegate.h"
-#include "ash/common/shelf/shelf_item_delegate_manager.h"
#include "ash/common/shelf/shelf_menu_model.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/shelf/shelf_types.h"
+#include "ash/common/wm_shell.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_widget.h"
-#include "ash/shell.h"
#include "base/strings/string_util.h"
#include "mojo/common/common_type_converters.h"
#include "services/shell/public/cpp/connector.h"
@@ -153,8 +152,7 @@ class ShelfItemDelegateMus : public ShelfItemDelegate {
ShelfItemDelegateMus* GetShelfItemDelegate(ShelfID shelf_id) {
return static_cast<ShelfItemDelegateMus*>(
- Shell::GetInstance()->shelf_item_delegate_manager()->GetShelfItemDelegate(
- shelf_id));
+ WmShell::Get()->shelf_model()->GetShelfItemDelegate(shelf_id));
}
// Returns an icon image from an SkBitmap, or the default shelf icon
@@ -322,8 +320,7 @@ void ShelfDelegateMus::PinItem(
item_delegate->SetDelegate(std::move(delegate));
item_delegate->set_pinned(true);
item_delegate->set_title(item->app_title.To<base::string16>());
- Shell::GetInstance()->shelf_item_delegate_manager()->SetShelfItemDelegate(
- shelf_id, std::move(item_delegate));
+ model_->SetShelfItemDelegate(shelf_id, std::move(item_delegate));
}
void ShelfDelegateMus::UnpinItem(const mojo::String& app_id) {
@@ -393,8 +390,7 @@ void ShelfDelegateMus::OnUserWindowAdded(
new ShelfItemDelegateMus(user_window_controller_.get()));
item_delegate->AddWindow(user_window->window_id,
user_window->window_title.To<base::string16>());
- Shell::GetInstance()->shelf_item_delegate_manager()->SetShelfItemDelegate(
- shelf_id, std::move(item_delegate));
+ model_->SetShelfItemDelegate(shelf_id, std::move(item_delegate));
}
void ShelfDelegateMus::OnUserWindowRemoved(uint32_t window_id) {
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/test/shelf_item_delegate_manager_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698