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

Unified Diff: chrome/common/extensions/extension.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: Yoyo's requested changes 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/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index bfb989f4b7695dc64bb16aa48dfa8dc56db691d1..e85ce9d97a49d3d67d24db4ad4bf625ee3bd46c7 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -20,6 +20,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
+#include "chrome/common/extensions/api/extension_action/action_info.h"
#include "chrome/common/extensions/command.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
@@ -222,26 +223,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
std::vector<std::string> scopes;
};
- struct ActionInfo {
- explicit ActionInfo();
- ~ActionInfo();
-
- // The types of extension actions.
- enum Type {
- TYPE_BROWSER,
- TYPE_PAGE,
- TYPE_SCRIPT_BADGE,
- TYPE_SYSTEM_INDICATOR,
- };
-
- // 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;
- };
-
struct FileHandlerInfo {
explicit FileHandlerInfo();
~FileHandlerInfo();
@@ -689,9 +670,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
return converted_from_user_script_;
}
const UserScriptList& content_scripts() const { return content_scripts_; }
- const ActionInfo* script_badge_info() const {
- return script_badge_info_.get();
- }
const ActionInfo* page_action_info() const { return page_action_info_.get(); }
const ActionInfo* browser_action_info() const {
return browser_action_info_.get();
@@ -757,7 +735,8 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const PermissionSet* required_permission_set() const {
return required_permission_set_.get();
}
- // Appends |new_warnings| to install_warnings().
+ // Appends |new_warning[s]| to install_warnings_.
+ void AddInstallWarning(const InstallWarning& new_warning);
void AddInstallWarnings(const InstallWarningVector& new_warnings);
const InstallWarningVector& install_warnings() const {
return install_warnings_;
@@ -954,7 +933,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool LoadContentScripts(string16* error);
bool LoadPageAction(string16* error);
bool LoadBrowserAction(string16* error);
- bool LoadScriptBadge(string16* error);
bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error);
bool LoadFileBrowserHandlers(string16* error);
// Helper method to load a FileBrowserHandlerList from the manifest.
@@ -1000,13 +978,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
void(UserScript::*add_method)(const std::string& glob),
UserScript* instance);
- // Helper method to load an ExtensionAction from the page_action or
- // browser_action entries in the manifest.
- scoped_ptr<ActionInfo> LoadExtensionActionInfoHelper(
- const base::DictionaryValue* manifest_section,
- ActionInfo::Type action_type,
- string16* error);
-
// Helper method that loads the OAuth2 info from the 'oauth2' manifest key.
bool LoadOAuth2Info(string16* error);
@@ -1114,9 +1085,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// The extension's browser action, if any.
scoped_ptr<ActionInfo> browser_action_info_;
- // The extension's script badge. Never NULL.
- scoped_ptr<ActionInfo> script_badge_info_;
-
// The extension's system indicator, if any.
scoped_ptr<ActionInfo> system_indicator_info_;

Powered by Google App Engine
This is Rietveld 408576698