Commit c0428ba2 authored by nancy's avatar nancy Committed by Commit Bot

Add menu type checking for OPTIONS menu item for Chrome apps.

The OPTIONS menu item is not added for menu in Shelf, and it is
available for Chrome apps menu item in app list only. So add a menu type
checking for it.

BUG=1038487

Change-Id: If36587f33cc7cba886ab67509d59a4b6f4dc7963
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2010605Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733522}
parent 3458b911
......@@ -677,7 +677,7 @@ void ExtensionApps::GetMenuModel(const std::string& app_id,
&menu_items);
}
if (!is_platform_app &&
if (!is_platform_app && menu_type == apps::mojom::MenuType::kAppList &&
extensions::util::IsAppLaunchableWithoutEnabling(app_id, profile_) &&
extensions::OptionsPageInfo::HasOptionsPage(extension)) {
AddCommandItem(ash::OPTIONS, IDS_NEW_TAB_APP_OPTIONS, &menu_items);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment