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

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

Issue 2791803002: mash: Move LauncherItemController to ash, rename ShelfItemDelegate. (Closed)
Patch Set: Sync and rebase. 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_window_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
index cd1890316ac330b1a8592cd9d02972d9bef9de5b..e280c1e16b2d3c27f0da4fb46f62e72c1cf5041e 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
@@ -641,19 +641,21 @@ ArcAppWindowLauncherController::AttachControllerToTask(
return it->second;
}
- ArcAppWindowLauncherItemController* controller =
- new ArcAppWindowLauncherItemController(app_shelf_id.ToString(), owner());
+ std::unique_ptr<ArcAppWindowLauncherItemController> controller =
+ base::MakeUnique<ArcAppWindowLauncherItemController>(
+ app_shelf_id.ToString());
+ ArcAppWindowLauncherItemController* item_controller = controller.get();
const ash::ShelfID shelf_id =
shelf_delegate_->GetShelfIDForAppID(app_shelf_id.ToString());
if (!shelf_id) {
- owner()->CreateAppLauncherItem(controller, ash::STATUS_RUNNING);
+ owner()->CreateAppLauncherItem(std::move(controller), ash::STATUS_RUNNING);
} else {
- owner()->SetItemController(shelf_id, controller);
+ owner()->SetShelfItemDelegate(shelf_id, std::move(controller));
owner()->SetItemStatus(shelf_id, ash::STATUS_RUNNING);
}
- controller->AddTaskId(task_id);
- app_shelf_group_to_controller_map_[app_shelf_id] = controller;
- return controller;
+ item_controller->AddTaskId(task_id);
+ app_shelf_group_to_controller_map_[app_shelf_id] = item_controller;
+ return item_controller;
}
void ArcAppWindowLauncherController::RegisterApp(

Powered by Google App Engine
This is Rietveld 408576698