Chromium Code Reviews| Index: chrome/common/extensions/api/extension_action/action_info.h |
| diff --git a/chrome/common/extensions/api/extension_action/action_info.h b/chrome/common/extensions/api/extension_action/action_info.h |
| index dc8fbc70e2815cde098089de9579e39222903d4e..06817e115d74abd827da3cb0615106e39939299e 100644 |
| --- a/chrome/common/extensions/api/extension_action/action_info.h |
| +++ b/chrome/common/extensions/api/extension_action/action_info.h |
| @@ -7,6 +7,7 @@ |
| #include <string> |
| +#include "chrome/common/extensions/extension.h" |
| #include "chrome/common/extensions/extension_icon_set.h" |
| #include "googleurl/src/gurl.h" |
| @@ -32,6 +33,21 @@ struct ActionInfo { |
| std::string id; |
| }; |
| +// The manifest data container for the ActionInfos for BrowserActions and |
| +// ScriptBadges. |
| +struct ActionInfoData : public Extension::ManifestData { |
|
Yoyo Zhou
2012/12/28 05:19:59
Can you hide this in the anonymous namespace in th
Devlin
2012/12/28 20:25:36
Possible, as long as we also put in Set|BrowserAct
|
| + explicit ActionInfoData(ActionInfo* action_info); |
| + virtual ~ActionInfoData(); |
| + |
| + // The action associated with the BrowserAction or ScriptBadge. |
| + // This is never NULL for ScriptBadge. |
| + scoped_ptr<ActionInfo> action_info; |
| + |
| + // Returns the appropriate ActionInfo for the extension. |
| + static const ActionInfo* GetBrowserActionInfo(const Extension* extension); |
|
Yoyo Zhou
2012/12/28 05:19:59
Can you put these in ActionInfo? It reads better t
Devlin
2012/12/28 20:25:36
Agreed, and done.
|
| + static const ActionInfo* GetScriptBadgeInfo(const Extension* extension); |
| +}; |
| + |
| } // namespace extensions |
| #endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_ |