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

Unified Diff: chrome/browser/extensions/context_menu_matcher.cc

Issue 359493005: Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed AppendExtensionItemsImpl, minor cleanup, comments Created 6 years, 5 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/extensions/context_menu_matcher.cc
diff --git a/chrome/browser/extensions/context_menu_matcher.cc b/chrome/browser/extensions/context_menu_matcher.cc
index 0e7adbddbdfc61208f56cfd0c7d2a7e67421d05e..fee3326fbae928401a31811e6b6935e007545585 100644
--- a/chrome/browser/extensions/context_menu_matcher.cc
+++ b/chrome/browser/extensions/context_menu_matcher.cc
@@ -30,7 +30,8 @@ ContextMenuMatcher::ContextMenuMatcher(
void ContextMenuMatcher::AppendExtensionItems(
const MenuItem::ExtensionKey& extension_key,
const base::string16& selection_text,
- int* index) {
+ int* index,
+ bool include_icons) {
DCHECK_GE(*index, 0);
int max_index =
IDC_EXTENSIONS_CONTEXT_CUSTOM_LAST - IDC_EXTENSIONS_CONTEXT_CUSTOM_FIRST;
@@ -86,7 +87,8 @@ void ContextMenuMatcher::AppendExtensionItems(
RecursivelyAppendExtensionItems(submenu_items, can_cross_incognito,
selection_text, submenu, index);
}
- SetExtensionIcon(extension_key.extension_id);
+ if (include_icons)
+ SetExtensionIcon(extension_key.extension_id);
}
}

Powered by Google App Engine
This is Rietveld 408576698