OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BROWSER_ACTIONS_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_ACTIONS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_ACTIONS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_ACTIONS_API_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/extension_function.h" | 9 #include "chrome/browser/extensions/extension_function.h" |
10 #include "chrome/common/extensions/extension_action.h" | 10 #include "chrome/common/extensions/extension_action.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // The tab id the browser action function should apply to, if any, or | 30 // The tab id the browser action function should apply to, if any, or |
31 // kDefaultTabId if none was specified. | 31 // kDefaultTabId if none was specified. |
32 int tab_id_; | 32 int tab_id_; |
33 | 33 |
34 // The browser action for the current extension. | 34 // The browser action for the current extension. |
35 ExtensionAction* browser_action_; | 35 ExtensionAction* browser_action_; |
36 }; | 36 }; |
37 | 37 |
38 // Implement chrome.browserAction.setIcon(). | 38 // Implement chrome.browserAction.setIcon(). |
39 class BrowserActionSetIconFunction : public BrowserActionFunction { | 39 class BrowserActionSetIconFunction : public BrowserActionFunction { |
40 ~BrowserActionSetIconFunction() {} | 40 virtual ~BrowserActionSetIconFunction() {} |
41 virtual bool RunBrowserAction(); | 41 virtual bool RunBrowserAction(); |
42 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setIcon") | 42 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setIcon") |
43 }; | 43 }; |
44 | 44 |
45 // Implement chrome.browserAction.setTitle(). | 45 // Implement chrome.browserAction.setTitle(). |
46 class BrowserActionSetTitleFunction : public BrowserActionFunction { | 46 class BrowserActionSetTitleFunction : public BrowserActionFunction { |
47 ~BrowserActionSetTitleFunction() {} | 47 virtual ~BrowserActionSetTitleFunction() {} |
48 virtual bool RunBrowserAction(); | 48 virtual bool RunBrowserAction(); |
49 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setTitle") | 49 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setTitle") |
50 }; | 50 }; |
51 | 51 |
52 // Implement chrome.browserActions.setPopup(). | 52 // Implement chrome.browserActions.setPopup(). |
53 class BrowserActionSetPopupFunction : public BrowserActionFunction { | 53 class BrowserActionSetPopupFunction : public BrowserActionFunction { |
54 ~BrowserActionSetPopupFunction() {} | 54 virtual ~BrowserActionSetPopupFunction() {} |
55 virtual bool RunBrowserAction(); | 55 virtual bool RunBrowserAction(); |
56 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setPopup") | 56 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setPopup") |
57 }; | 57 }; |
58 | 58 |
59 // Implement chrome.browserAction.setBadgeText(). | 59 // Implement chrome.browserAction.setBadgeText(). |
60 class BrowserActionSetBadgeTextFunction : public BrowserActionFunction { | 60 class BrowserActionSetBadgeTextFunction : public BrowserActionFunction { |
61 ~BrowserActionSetBadgeTextFunction() {} | 61 virtual ~BrowserActionSetBadgeTextFunction() {} |
62 virtual bool RunBrowserAction(); | 62 virtual bool RunBrowserAction(); |
63 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeText") | 63 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeText") |
64 }; | 64 }; |
65 | 65 |
66 // Implement chrome.browserAction.setBadgeBackgroundColor(). | 66 // Implement chrome.browserAction.setBadgeBackgroundColor(). |
67 class BrowserActionSetBadgeBackgroundColorFunction | 67 class BrowserActionSetBadgeBackgroundColorFunction |
68 : public BrowserActionFunction { | 68 : public BrowserActionFunction { |
69 ~BrowserActionSetBadgeBackgroundColorFunction() {} | 69 virtual ~BrowserActionSetBadgeBackgroundColorFunction() {} |
70 virtual bool RunBrowserAction(); | 70 virtual bool RunBrowserAction(); |
71 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeBackgroundColor") | 71 DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeBackgroundColor") |
72 }; | 72 }; |
73 | 73 |
74 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_ACTIONS_API_H_ | 74 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_BROWSER_ACTIONS_API_H_ |
OLD | NEW |