Chromium Code Reviews| Index: chrome/browser/extensions/api/context_menu/context_menu_api.h |
| diff --git a/chrome/browser/extensions/api/context_menu/context_menu_api.h b/chrome/browser/extensions/api/context_menu/context_menu_api.h |
| index 35e8914374ae44512301e7128fa0f431e6675ff5..5f15c927c1941a824b0f65898b8fbd3f05362b48 100644 |
| --- a/chrome/browser/extensions/api/context_menu/context_menu_api.h |
| +++ b/chrome/browser/extensions/api/context_menu/context_menu_api.h |
| @@ -6,56 +6,10 @@ |
| #define CHROME_BROWSER_EXTENSIONS_API_CONTEXT_MENU_CONTEXT_MENU_API_H__ |
| #include "chrome/browser/extensions/extension_function.h" |
| -#include "chrome/browser/extensions/menu_manager.h" |
| -#include "chrome/common/extensions/url_pattern_set.h" |
| - |
| -class MenuItem; |
| - |
| -namespace base { |
| -class DictionaryValue; |
| -} |
| namespace extensions { |
| -class ExtensionContextMenuFunction : public SyncExtensionFunction { |
| - protected: |
| - virtual ~ExtensionContextMenuFunction() {} |
|
not at google - send to devlin
2012/07/26 04:16:20
woo!
|
| - |
| - // Helper function to read and parse a list of menu item contexts. |
| - bool ParseContexts(const base::DictionaryValue& properties, |
| - const char* key, |
| - MenuItem::ContextList* result); |
| - |
| - // Looks in properties for the "type" key, and reads the value in |result|. On |
| - // error, returns false and puts an error message into error_. If the key is |
| - // not present, |result| is set to |default_value| and the return value is |
| - // true. |
| - bool ParseType(const base::DictionaryValue& properties, |
| - const MenuItem::Type& default_value, |
| - MenuItem::Type* result); |
| - |
| - // Helper to read and parse the "checked" property. |
| - bool ParseChecked(MenuItem::Type type, |
| - const base::DictionaryValue& properties, |
| - bool default_value, |
| - bool* checked); |
| - |
| - // Helper to read an ID from the Value*. The ID can be either a string or |
| - // integer. |
| - bool ParseID(const Value* value, MenuItem::Id* result); |
| - |
| - // If the parentId key was specified in properties, this will try looking up |
| - // an MenuItem with that id and set it into |result|. Returns false |
| - // on error, with an explanation written into error_. Note that if the |
| - // parentId key is not in properties, this will return true and leave |result| |
| - // unset. Also, it is considered an error if the item found has a type other |
| - // than NORMAL. |
| - bool GetParent(const base::DictionaryValue& properties, |
| - const MenuManager& manager, |
| - MenuItem** result); |
| -}; |
| - |
| -class CreateContextMenuFunction : public ExtensionContextMenuFunction { |
| +class CreateContextMenuFunction : public SyncExtensionFunction { |
| public: |
| DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.create") |
| @@ -66,7 +20,7 @@ class CreateContextMenuFunction : public ExtensionContextMenuFunction { |
| virtual bool RunImpl() OVERRIDE; |
| }; |
| -class UpdateContextMenuFunction : public ExtensionContextMenuFunction { |
| +class UpdateContextMenuFunction : public SyncExtensionFunction { |
| public: |
| DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.update") |
| @@ -77,7 +31,7 @@ class UpdateContextMenuFunction : public ExtensionContextMenuFunction { |
| virtual bool RunImpl() OVERRIDE; |
| }; |
| -class RemoveContextMenuFunction : public ExtensionContextMenuFunction { |
| +class RemoveContextMenuFunction : public SyncExtensionFunction { |
| public: |
| DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.remove") |
| @@ -88,7 +42,7 @@ class RemoveContextMenuFunction : public ExtensionContextMenuFunction { |
| virtual bool RunImpl() OVERRIDE; |
| }; |
| -class RemoveAllContextMenusFunction : public ExtensionContextMenuFunction { |
| +class RemoveAllContextMenusFunction : public SyncExtensionFunction { |
| public: |
| DECLARE_EXTENSION_FUNCTION_NAME("contextMenus.removeAll") |