| Index: chrome/browser/ui/ash/launcher/launcher_context_menu.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
|
| index 907c16381c4327076be7237ebb0d6fa8f086f8f1..9a6cad0db4aca6c69eec31893b008ae118b9d2c5 100644
|
| --- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
|
| +++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
|
| @@ -24,6 +24,11 @@
|
| #include "grit/ash_strings.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
|
| +#include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h"
|
| +#endif // defined(OS_CHROMEOS)
|
| +
|
| namespace {
|
|
|
| // Returns true if the user can modify the |shelf|'s auto-hide behavior.
|
| @@ -45,6 +50,15 @@ LauncherContextMenu* LauncherContextMenu::Create(
|
| if (!item || item->id == 0)
|
| return new DesktopShellLauncherContextMenu(controller, item, shelf);
|
|
|
| +// Create ArcLauncherContextMenu if the item is an Arc app.
|
| +#if defined(OS_CHROMEOS)
|
| + const std::string& app_id = controller->GetAppIDForShelfID(item->id);
|
| + ArcAppListPrefs* arc_prefs = ArcAppListPrefs::Get(controller->profile());
|
| + DCHECK(arc_prefs);
|
| + if (arc_prefs->IsRegistered(app_id))
|
| + return new ArcLauncherContextMenu(controller, item, shelf);
|
| +#endif // defined(OS_CHROMEOS)
|
| +
|
| // Create ExtensionLauncherContextMenu for the item.
|
| return new ExtensionLauncherContextMenu(controller, item, shelf);
|
| }
|
|
|