diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-30 11:20:09 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-30 11:20:09 +0000 |
commit | a146532b4fea5da2c1199bcc4a1244b6fcb5ffe8 (patch) | |
tree | a506787d8af2e9134d42fc70d419abaef50569e3 /chrome/browser/extensions/context_menu_matcher.h | |
parent | 843740740fcd0247f89c3eddf52165b9bcb39b0f (diff) | |
download | chromium_src-a146532b4fea5da2c1199bcc4a1244b6fcb5ffe8.zip chromium_src-a146532b4fea5da2c1199bcc4a1244b6fcb5ffe8.tar.gz chromium_src-a146532b4fea5da2c1199bcc4a1244b6fcb5ffe8.tar.bz2 |
Make custom id ranges injectable
This is necessary to move the RVContextMenu to components directory as command IDs like IDC_XXX_CONTEXT_MENU_FIRST|LAST are defined in chrome/app/chrome_commands_id.h and cannot just move it out because they exist there to avoid overlapping.
BUG=397320
Review URL: https://codereview.chromium.org/424893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286476 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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/extensions/context_menu_matcher.h b/chrome/browser/extensions/context_menu_matcher.h index bb08510..f3f631f 100644 --- a/chrome/browser/extensions/context_menu_matcher.h +++ b/chrome/browser/extensions/context_menu_matcher.h @@ -27,6 +27,13 @@ class ContextMenuMatcher { public: static const size_t kMaxExtensionItemTitleLength; + // Convert a command ID so that it fits within the range for + // extension context menu. + static int ConvertToExtensionsCustomCommandId(int id); + + // Returns true if the given id is one generated for extension context menu. + static bool IsExtensionsCustomCommandId(int id); + // The |filter| will be called on possibly matching menu items, and its // result is used to determine which items to actually append to the menu. ContextMenuMatcher(content::BrowserContext* context, |