| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_PAGE_ACTIONS_AP
I_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_PAGE_ACTIONS_AP
I_H_ | |
| 7 | |
| 8 #include "chrome/browser/extensions/api/extension_action/extension_actions_api.h
" | |
| 9 #include "chrome/browser/extensions/extension_function.h" | |
| 10 | |
| 11 // Base class for deprecated page actions APIs | |
| 12 class PageActionsFunction : public SyncExtensionFunction { | |
| 13 protected: | |
| 14 PageActionsFunction(); | |
| 15 virtual ~PageActionsFunction(); | |
| 16 bool SetPageActionEnabled(bool enable); | |
| 17 }; | |
| 18 | |
| 19 // Implement chrome.pageActions.enableForTab(). | |
| 20 class EnablePageActionsFunction : public PageActionsFunction { | |
| 21 public: | |
| 22 DECLARE_EXTENSION_FUNCTION_NAME("pageActions.enableForTab") | |
| 23 | |
| 24 protected: | |
| 25 virtual ~EnablePageActionsFunction() {} | |
| 26 | |
| 27 // ExtensionFunction: | |
| 28 virtual bool RunImpl() OVERRIDE; | |
| 29 }; | |
| 30 | |
| 31 // Implement chrome.pageActions.disableForTab(). | |
| 32 class DisablePageActionsFunction : public PageActionsFunction { | |
| 33 public: | |
| 34 DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab") | |
| 35 | |
| 36 protected: | |
| 37 virtual ~DisablePageActionsFunction() {} | |
| 38 | |
| 39 // ExtensionFunction: | |
| 40 virtual bool RunImpl() OVERRIDE; | |
| 41 }; | |
| 42 | |
| 43 // | |
| 44 // pageAction.* aliases for supported extensionActions APIs. | |
| 45 // | |
| 46 | |
| 47 class PageActionShowFunction : public ExtensionActionShowFunction { | |
| 48 public: | |
| 49 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.show") | |
| 50 | |
| 51 protected: | |
| 52 virtual ~PageActionShowFunction() {} | |
| 53 }; | |
| 54 | |
| 55 class PageActionHideFunction : public ExtensionActionHideFunction { | |
| 56 public: | |
| 57 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.hide") | |
| 58 | |
| 59 protected: | |
| 60 virtual ~PageActionHideFunction() {} | |
| 61 }; | |
| 62 | |
| 63 class PageActionSetIconFunction : public ExtensionActionSetIconFunction { | |
| 64 public: | |
| 65 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setIcon") | |
| 66 | |
| 67 protected: | |
| 68 virtual ~PageActionSetIconFunction() {} | |
| 69 }; | |
| 70 | |
| 71 class PageActionSetTitleFunction : public ExtensionActionSetTitleFunction { | |
| 72 public: | |
| 73 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setTitle") | |
| 74 | |
| 75 protected: | |
| 76 virtual ~PageActionSetTitleFunction() {} | |
| 77 }; | |
| 78 | |
| 79 class PageActionSetPopupFunction : public ExtensionActionSetPopupFunction { | |
| 80 public: | |
| 81 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setPopup") | |
| 82 | |
| 83 protected: | |
| 84 virtual ~PageActionSetPopupFunction() {} | |
| 85 }; | |
| 86 | |
| 87 class PageActionGetTitleFunction : public ExtensionActionGetTitleFunction { | |
| 88 public: | |
| 89 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.getTitle") | |
| 90 | |
| 91 protected: | |
| 92 virtual ~PageActionGetTitleFunction() {} | |
| 93 }; | |
| 94 | |
| 95 class PageActionGetPopupFunction : public ExtensionActionGetPopupFunction { | |
| 96 public: | |
| 97 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.getPopup") | |
| 98 | |
| 99 protected: | |
| 100 virtual ~PageActionGetPopupFunction() {} | |
| 101 }; | |
| 102 | |
| 103 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_PAGE_ACTIONS
_API_H_ | |
| OLD | NEW |