diff options
author | gpdavis.chromium@gmail.com <gpdavis.chromium@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-08 20:01:12 +0000 |
---|---|---|
committer | gpdavis.chromium@gmail.com <gpdavis.chromium@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-08 20:02:37 +0000 |
commit | 99122f042f54d56e952c4200f42f29768474bf7b (patch) | |
tree | 5da6d89e301419d6d663867f24826a400ed0ef01 /chrome/browser/extensions/context_menu_matcher.h | |
parent | bd000a6532d8ea9e02ce701bf55ef08f5a4ea054 (diff) | |
download | chromium_src-99122f042f54d56e952c4200f42f29768474bf7b.zip chromium_src-99122f042f54d56e952c4200f42f29768474bf7b.tar.gz chromium_src-99122f042f54d56e952c4200f42f29768474bf7b.tar.bz2 |
Extend contextMenus API to support browser/page actions
Screenshot:
http://i.imgur.com/RILqQqe.png
BUG=234425
Review URL: https://codereview.chromium.org/359493005
Cr-Commit-Position: refs/heads/master@{#288418}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/context_menu_matcher.h')
-rw-r--r-- | chrome/browser/extensions/context_menu_matcher.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/extensions/context_menu_matcher.h b/chrome/browser/extensions/context_menu_matcher.h index f3f631f..ef44dac 100644 --- a/chrome/browser/extensions/context_menu_matcher.h +++ b/chrome/browser/extensions/context_menu_matcher.h @@ -43,10 +43,13 @@ 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. + // each item actually added. |is_action_menu| is used for browser and page + // action context menus, in which menu items are not placed in submenus + // and the extension's icon is not shown. void AppendExtensionItems(const MenuItem::ExtensionKey& extension_key, const base::string16& selection_text, - int* index); + int* index, + bool is_action_menu); void Clear(); @@ -80,7 +83,8 @@ class ContextMenuMatcher { bool can_cross_incognito, const base::string16& selection_text, ui::SimpleMenuModel* menu_model, - int* index); + int* index, + bool is_action_menu_top_level); // Attempts to get an MenuItem given the id of a context menu item. extensions::MenuItem* GetExtensionMenuItem(int id) const; |