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

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

Issue 359493005: Extend contextMenus API to support browser/page actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed icons 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.h
diff --git a/chrome/browser/extensions/context_menu_matcher.h b/chrome/browser/extensions/context_menu_matcher.h
index 782b8d3fd6db201fb1f20eb8746d37c25e67b1d6..b6fa514cf688b2d68fc7c0f9041593c0897849a4 100644
--- a/chrome/browser/extensions/context_menu_matcher.h
+++ b/chrome/browser/extensions/context_menu_matcher.h
@@ -34,10 +34,20 @@ class ContextMenuMatcher {
// This is a helper function to append items for one particular extension.
// The |index| parameter is used for assigning id's, and is incremented for
// each item actually added.
+ // Appends items with the extension's icon.
void AppendExtensionItems(const MenuItem::ExtensionKey& extension_key,
const base::string16& selection_text,
int* index);
+ // This is a helper function to append items for one particular extension.
+ // The |index| parameter is used for assigning id's, and is incremented for
+ // each item actually added.
+ // Appends items without the extension's icon.
+ void AppendExtensionItemsWithoutIcons(
Devlin 2014/07/15 17:37:54 I know we did this in the other patch for Extensio
gpdavis 2014/07/15 19:46:07 Done.
+ const MenuItem::ExtensionKey& extension_key,
+ const base::string16& selection_text,
+ int* index);
+
void Clear();
// This function returns the top level context menu title of an extension
@@ -55,6 +65,15 @@ class ContextMenuMatcher {
private:
friend class ::ExtensionContextMenuBrowserTest;
+ // This is a helper function to append items for one particular extension.
+ // The |index| parameter is used for assigning id's, and is incremented for
+ // each item actually added. |include_icons| is used to determine whether
+ // the extension's icon should be included with the items.
+ void AppendExtensionItemsImpl(const MenuItem::ExtensionKey& extension_key,
+ const base::string16& selection_text,
+ int* index,
+ bool include_icons);
+
bool GetRelevantExtensionTopLevelItems(
const MenuItem::ExtensionKey& extension_key,
const Extension** extension,

Powered by Google App Engine
This is Rietveld 408576698