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

Side by Side Diff: chrome/browser/extensions/extension_page_actions_module.h

Issue 332021: Move page actions over to ExtensionAction2 (Closed)
Patch Set: Review feedback Created 11 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_
7 7
8 #include "chrome/browser/extensions/extension_function.h" 8 #include "chrome/browser/extensions/extension_function.h"
9 9
10 class TabContents; 10 class TabContents;
11 class ExtensionAction; 11 class ExtensionAction2;
12 class ExtensionActionState;
13 12
14 class PageActionFunction : public SyncExtensionFunction { 13 class PageActionFunction : public SyncExtensionFunction {
15 protected: 14 protected:
16 bool SetPageActionEnabled(bool enable); 15 bool SetPageActionEnabled(bool enable);
17 16
18 bool InitCommon(int tab_id); 17 bool InitCommon(int tab_id);
19 bool SetHidden(bool hidden); 18 bool SetVisible(bool visible);
20 19
21 ExtensionAction* page_action_; 20 ExtensionAction2* page_action_;
22 TabContents* contents_; 21 TabContents* contents_;
23 ExtensionActionState* state_;
24 }; 22 };
25 23
26 class EnablePageActionFunction : public PageActionFunction { 24 class EnablePageActionFunction : public PageActionFunction {
27 virtual bool RunImpl(); 25 virtual bool RunImpl();
28 DECLARE_EXTENSION_FUNCTION_NAME("pageActions.enableForTab") 26 DECLARE_EXTENSION_FUNCTION_NAME("pageActions.enableForTab")
29 }; 27 };
30 28
31 class DisablePageActionFunction : public PageActionFunction { 29 class DisablePageActionFunction : public PageActionFunction {
32 virtual bool RunImpl(); 30 virtual bool RunImpl();
33 DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab") 31 DECLARE_EXTENSION_FUNCTION_NAME("pageActions.disableForTab")
(...skipping 28 matching lines...) Expand all
62 virtual bool RunImpl(); 60 virtual bool RunImpl();
63 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeTextColor") 61 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeTextColor")
64 }; 62 };
65 63
66 class PageActionSetBadgeTextFunction : public PageActionFunction { 64 class PageActionSetBadgeTextFunction : public PageActionFunction {
67 virtual bool RunImpl(); 65 virtual bool RunImpl();
68 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeText") 66 DECLARE_EXTENSION_FUNCTION_NAME("pageAction.setBadgeText")
69 }; 67 };
70 68
71 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_ 69 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PAGE_ACTIONS_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698