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

Unified Diff: chrome/common/extensions/api/extension_action/action_info.h

Issue 11644057: Move BrowserAction out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_ungoop_extension_action
Patch Set: Combined ActionInfo wrappers Created 8 years 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/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_

Powered by Google App Engine
This is Rietveld 408576698