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

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

Issue 2811049: Add ability to limit when context menu items appear with url patterns.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_context_menu_api.h
===================================================================
--- chrome/browser/extensions/extension_context_menu_api.h (revision 52866)
+++ chrome/browser/extensions/extension_context_menu_api.h (working copy)
@@ -7,7 +7,10 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/extensions/extension_menu_manager.h"
+#include "chrome/common/extensions/extension_extent.h"
+class ExtensionMenuItem;
+
class ExtensionContextMenuFunction : public SyncExtensionFunction {
public:
~ExtensionContextMenuFunction() {}
@@ -32,6 +35,17 @@
bool default_value,
bool* checked);
+ // Helper to read in a set of url patterns from a property with the given key
+ // name.
+ bool ParseURLPatterns(const DictionaryValue& properties,
+ const wchar_t* key,
+ ExtensionExtent* result);
+
+ // Reads in any document and targetUrl patterns from |properties| and sets
+ // them on |item|.
+ bool SetURLPatterns(const DictionaryValue& properties,
+ ExtensionMenuItem* item);
+
// If the parentId key was specified in properties, this will try looking up
// an ExtensionMenuItem with that id and set it into |result|. Returns false
// on error, with an explanation written into error_. Note that if the
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698