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

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: rebase + policy_browsertest.cc 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 260080a99b3c4f844218ed1a67f0d6c03e3bfb16..71d7fb0ebdfe9172c34a222d5d6d0d61ea143fac 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
@@ -8,7 +8,10 @@
#include "ash/wm/window_state_aura.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"
@@ -270,10 +273,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