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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc

Issue 2811853002: reland: mash: Remove ChromeLauncherController's |id_to_item_controller_map_|. (Closed)
Patch Set: Created 3 years, 8 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/shelf/shelf_view.cc ('k') | chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
index 9b78269a8f8cfe516c4f96fb73206f23cbcc5955..14af509dfc363e161714cdf888f8cdf04ad7d694 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h"
+#include "ash/shelf/shelf_model.h"
+#include "ash/shell.h"
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
@@ -111,8 +113,9 @@ void ArcAppDeferredLauncherController::Close(const std::string& app_id) {
return;
const ash::ShelfID shelf_id = owner_->GetShelfIDForAppID(shelf_app_id);
+ ash::ShelfModel* shelf_model = ash::Shell::Get()->shelf_model();
const bool need_close_item =
- it->second == owner_->GetShelfItemDelegate(shelf_id);
+ it->second == shelf_model->GetShelfItemDelegate(shelf_id);
app_controller_map_.erase(it);
if (need_close_item)
owner_->CloseLauncherItem(shelf_id);
@@ -210,7 +213,8 @@ void ArcAppDeferredLauncherController::RegisterDeferredLaunch(
if (shelf_id == 0) {
owner_->CreateAppLauncherItem(std::move(controller), ash::STATUS_RUNNING);
} else {
- owner_->SetShelfItemDelegate(shelf_id, std::move(controller));
+ ash::ShelfModel* shelf_model = ash::Shell::Get()->shelf_model();
+ shelf_model->SetShelfItemDelegate(shelf_id, std::move(controller));
owner_->SetItemStatus(shelf_id, ash::STATUS_RUNNING);
}
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | chrome/browser/ui/ash/launcher/arc_app_launcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698