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

Unified Diff: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_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/app_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
index 14e40467e091c815b172466ce0997b224c506f1b..ae446cc7cdf6bbf2e8c8486c9ade8fb543a003b4 100644
--- a/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc
@@ -7,7 +7,10 @@
#include <stddef.h>
#include "ash/wm/window_util.h"
+#include "chrome/browser/chromeos/arc/arc_support_host.h"
#include "chrome/browser/extensions/launch_util.h"
+#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
+#include "chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_controller.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
@@ -58,6 +61,15 @@ bool CanBrowserBeUsedForDirectActivation(Browser* browser,
} // namespace
+// static
+AppShortcutLauncherItemController* AppShortcutLauncherItemController::Create(
+ const std::string& app_id,
+ ChromeLauncherController* controller) {
+ if (app_id == ArcSupportHost::kHostAppId || app_id == arc::kPlayStoreAppId)
+ return new ArcPlaystoreShortcutLauncherItemController(controller);
+ return new AppShortcutLauncherItemController(app_id, controller);
+}
+
// Item controller for an app shortcut. Shortcuts track app and launcher ids,
// but do not have any associated windows (opening a shortcut will replace the
// item with the appropriate LauncherItemController type).

Powered by Google App Engine
This is Rietveld 408576698