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

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

Issue 269079: Implement new page action API. (Closed)
Patch Set: compile fixes Created 11 years, 2 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
Index: chrome/browser/extensions/extension_page_actions_module.h
diff --git a/chrome/browser/extensions/extension_page_actions_module.h b/chrome/browser/extensions/extension_page_actions_module.h
index 6a85cc3e05db799b37aa07423fb511edf698cbbc..f3ac6f0d86485f9a4241139b9d228cc3aa16c8de 100644
--- a/chrome/browser/extensions/extension_page_actions_module.h
+++ b/chrome/browser/extensions/extension_page_actions_module.h
@@ -7,9 +7,20 @@
#include "chrome/browser/extensions/extension_function.h"
+class TabContents;
+class ExtensionAction;
+class ExtensionActionState;
+
class PageActionFunction : public SyncExtensionFunction {
protected:
bool SetPageActionEnabled(bool enable);
+
+ bool InitCommon(int tab_id);
+ bool SetHidden(bool hidden);
+
+ ExtensionAction* page_action_;
+ TabContents* contents_;
+ ExtensionActionState* state_;
};
class EnablePageActionFunction : public PageActionFunction {
@@ -22,4 +33,39 @@ class DisablePageActionFunction : public PageActionFunction {
DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab")
};
+class PageActionShowFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.show")
+};
+
+class PageActionHideFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.hide")
+};
+
+class PageActionSetIconFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setIcon")
+};
+
+class PageActionSetTitleFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setTitle")
+};
+
+class PageActionSetBadgeBackgroundColorFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeBackgroundColor")
+};
+
+class PageActionSetBadgeTextColorFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeTextColor")
+};
+
+class PageActionSetBadgeTextFunction : public PageActionFunction {
+ virtual bool RunImpl();
+ DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeText")
+};
+
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_
« no previous file with comments | « chrome/browser/extensions/extension_function_dispatcher.cc ('k') | chrome/browser/extensions/extension_page_actions_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698