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

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

Issue 1973603002: arc: Make Play Store item persistance in shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 ecd419edb812710c798ac850e62d0f3d66103df6..d730ef781b0ab25d835958acebf02bd5ba5a42fe 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
@@ -6,7 +6,10 @@
#include "ash/shelf/shelf_util.h"
#include "ash/wm/window_util.h"
#include "base/bind.h"
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
+#include "chrome/browser/chromeos/arc/arc_support_host.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "components/arc/arc_bridge_service.h"
@@ -244,10 +247,14 @@ void ArcAppWindowLauncherController::OnTaskCreated(
DCHECK_EQ(controller->app_id(), app_id);
shelf_id = controller->shelf_id();
} else {
- controller = new ArcAppWindowLauncherItemController(app_id, owner());
- shelf_id = owner()->GetShelfIDForAppID(app_id);
+ const std::string shelf_app_id =
+ app_id == arc::kPlayStoreAppId ? ArcSupportHost::kHostAppId : app_id;
+ controller =
+ new ArcAppWindowLauncherItemController(shelf_app_id, app_id, owner());
+ shelf_id = owner()->GetShelfIDForAppID(shelf_app_id);
if (shelf_id == 0) {
- shelf_id = owner()->CreateAppLauncherItem(controller, app_id,
+ // Map Play Store shelf icon to Arc Support host, to share one entry.
+ shelf_id = owner()->CreateAppLauncherItem(controller, shelf_app_id,
ash::STATUS_RUNNING);
} else {
owner()->SetItemController(shelf_id, controller);

Powered by Google App Engine
This is Rietveld 408576698