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

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

Issue 2835063003: mash: Use ChromeLauncherControllerImpl, remove Mus subclass stub. (Closed)
Patch Set: Add comment and separate mash-only members. 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
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 14af509dfc363e161714cdf888f8cdf04ad7d694..ec8abca5a2bfbb3cd9a8996505cee96bc9efc0a1 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
@@ -5,7 +5,6 @@
#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"
@@ -113,9 +112,8 @@ 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 == shelf_model->GetShelfItemDelegate(shelf_id);
+ it->second == owner_->shelf_model()->GetShelfItemDelegate(shelf_id);
app_controller_map_.erase(it);
if (need_close_item)
owner_->CloseLauncherItem(shelf_id);
@@ -213,8 +211,8 @@ void ArcAppDeferredLauncherController::RegisterDeferredLaunch(
if (shelf_id == 0) {
owner_->CreateAppLauncherItem(std::move(controller), ash::STATUS_RUNNING);
} else {
- ash::ShelfModel* shelf_model = ash::Shell::Get()->shelf_model();
- shelf_model->SetShelfItemDelegate(shelf_id, std::move(controller));
+ owner_->shelf_model()->SetShelfItemDelegate(shelf_id,
+ std::move(controller));
owner_->SetItemStatus(shelf_id, ash::STATUS_RUNNING);
}

Powered by Google App Engine
This is Rietveld 408576698