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

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

Issue 12618009: Move SystemIndicator parsing out of Extension class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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
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 7ce43fa6575a3e85095af086fcdde55a42224312..2d7c3962d9dc8a2f04c0757f919903a7e4afa618 100644
--- a/chrome/common/extensions/api/extension_action/action_info.h
+++ b/chrome/common/extensions/api/extension_action/action_info.h
@@ -7,10 +7,15 @@
#include <string>
+#include "base/string16.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_icon_set.h"
#include "googleurl/src/gurl.h"
+namespace base {
+class DictionaryValue;
+}
+
namespace extensions {
class Extension;
@@ -27,6 +32,11 @@ struct ActionInfo {
TYPE_SYSTEM_INDICATOR,
};
+ // Loads an ActionInfo from the given DictionaryValue.
+ static scoped_ptr<ActionInfo> Load(const Extension* extension,
+ const base::DictionaryValue* dict,
+ string16* error);
+
// Returns the extension's browser action, if any.
static const ActionInfo* GetBrowserActionInfo(const Extension* extension);
@@ -39,6 +49,9 @@ struct ActionInfo {
// Returns the extension's page launcher.
static const ActionInfo* GetPageLauncherInfo(const Extension* extension);
+ // Returns the extension's system_indicator, if any.
Yoyo Zhou 2013/03/21 00:07:50 _ not necessary.
Devlin 2013/03/23 22:23:08 Done.
+ static const ActionInfo* GetSystemIndicatorInfo(const Extension* extension);
+
// Sets the extension's browser action. |extension| takes ownership of |info|.
static void SetBrowserActionInfo(Extension* extension, ActionInfo* info);
@@ -51,6 +64,10 @@ struct ActionInfo {
// Sets the extension's page launcher. |extension| takes ownership of |info|.
static void SetPageLauncherInfo(Extension* extension, ActionInfo* info);
+ // Sets the extension's system indicator. |extension| takes ownership of
+ // |info|.
+ static void SetSystemIndicatorInfo(Extension* extension, ActionInfo* info);
+
// Returns true if the extension needs a verbose install message because
// of its page action.
static bool IsVerboseInstallMessage(const Extension* extension);

Powered by Google App Engine
This is Rietveld 408576698