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

Unified Diff: chrome/browser/extensions/api/extension_action/extension_page_actions_api.h

Issue 10034037: Fixed pageActions.enableForTab (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved constructor and destructor Created 8 years, 8 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/api/extension_action/extension_page_actions_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
diff --git a/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h b/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
index 931d80729adf65dfb60017195b828d229e7b8028..899f395b309be78e10adb8d6d8bc31393967543f 100644
--- a/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
+++ b/chrome/browser/extensions/api/extension_action/extension_page_actions_api.h
@@ -15,70 +15,77 @@ class TabContentsWrapper;
class PageActionFunction : public ExtensionActionFunction {
protected:
virtual ~PageActionFunction() {}
- bool SetPageActionEnabled(bool enable);
bool SetVisible(bool visible);
virtual bool RunImpl() OVERRIDE;
TabContentsWrapper* contents_;
};
+// Base class for deprecated page actions APIs
+class PageActionsFunction : public SyncExtensionFunction {
+ protected:
+ PageActionsFunction();
+ virtual ~PageActionsFunction();
+ bool SetPageActionEnabled(bool enable);
+};
+
// Implement chrome.pageActions.enableForTab().
-class EnablePageActionFunction : public PageActionFunction {
- virtual ~EnablePageActionFunction() {}
- virtual bool RunExtensionAction() OVERRIDE;
+class EnablePageActionsFunction : public PageActionsFunction {
+ virtual ~EnablePageActionsFunction() {}
+ virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageActions.enableForTab")
};
// Implement chrome.pageActions.disableForTab().
-class DisablePageActionFunction : public PageActionFunction {
- virtual ~DisablePageActionFunction() {}
- virtual bool RunExtensionAction() OVERRIDE;
+class DisablePageActionsFunction : public PageActionsFunction {
+ virtual ~DisablePageActionsFunction() {}
+ virtual bool RunImpl() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab")
};
-// Implement chrome.pageActions.show().
+// Implement chrome.pageAction.show().
class PageActionShowFunction : public PageActionFunction {
virtual ~PageActionShowFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageAction.show")
};
-// Implement chrome.pageActions.hide().
+// Implement chrome.pageAction.hide().
class PageActionHideFunction : public PageActionFunction {
virtual ~PageActionHideFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageAction.hide")
};
-// Implement chrome.pageActions.setIcon().
+// Implement chrome.pageAction.setIcon().
class PageActionSetIconFunction : public PageActionFunction {
virtual ~PageActionSetIconFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setIcon")
};
-// Implement chrome.pageActions.setTitle().
+// Implement chrome.pageAction.setTitle().
class PageActionSetTitleFunction : public PageActionFunction {
virtual ~PageActionSetTitleFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setTitle")
};
-// Implement chrome.pageActions.setPopup().
+// Implement chrome.pageAction.setPopup().
class PageActionSetPopupFunction : public PageActionFunction {
virtual ~PageActionSetPopupFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setPopup")
};
-// Implement chrome.pageActions.setBadgeBackgroundColor().
+// Implement chrome.pageAction.setBadgeBackgroundColor().
class PageActionSetBadgeBackgroundColorFunction : public PageActionFunction {
virtual ~PageActionSetBadgeBackgroundColorFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeBackgroundColor")
};
-// Implement chrome.pageActions.setBadgeTextColor().
+// Implement chrome.pageAction.setBadgeTextColor().
class PageActionSetBadgeTextColorFunction : public PageActionFunction {
virtual ~PageActionSetBadgeTextColorFunction() {}
virtual bool RunExtensionAction() OVERRIDE;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/extension_action/extension_page_actions_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698