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

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

Issue 11588004: Move ScriptBadge, ActionInfo out of Extension; preparation for BrowserAction (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for CQ Created 7 years, 11 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
« no previous file with comments | « chrome/common/badge_util.cc ('k') | chrome/common/extensions/api/extension_action/action_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..09e7eccf78176cd60113e2ce9ec1dfc9e0c541ff
--- /dev/null
+++ b/chrome/common/extensions/api/extension_action/action_info.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
+#define CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
+
+#include <string>
+
+#include "chrome/common/extensions/extension_icon_set.h"
+#include "googleurl/src/gurl.h"
+
+namespace extensions {
+
+class Extension;
+
+struct ActionInfo {
+ ActionInfo();
+ ~ActionInfo();
+
+ // The types of extension actions.
+ enum Type {
+ TYPE_BROWSER,
+ TYPE_PAGE,
+ TYPE_SCRIPT_BADGE,
+ TYPE_SYSTEM_INDICATOR,
+ };
+
+ // Returns the appropriate ActionInfo for the given |extension|.
+ static const ActionInfo* GetScriptBadgeInfo(const Extension* extension);
+
+ // Sets the appropriate ActionInfo as ManifestData for the given |extension|.
+ // This is static since |extension| takes ownership of |info|.
+ static void SetScriptBadgeInfo(Extension* extension, ActionInfo* info);
+
+ // Empty implies the key wasn't present.
+ ExtensionIconSet default_icon;
+ std::string default_title;
+ GURL default_popup_url;
+ // action id -- only used with legacy page actions API.
+ std::string id;
+};
+
+} // namespace extensions
+
+#endif // CHROME_COMMON_EXTENSIONS_API_EXTENSION_ACTION_ACTION_INFO_H_
« no previous file with comments | « chrome/common/badge_util.cc ('k') | chrome/common/extensions/api/extension_action/action_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698