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

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: 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
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 2b3fa62d17b10f33f07005bad023bf00ad04cc12..953f9c716f176df2f540a034f2acd4f9721b68f4 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -21,6 +21,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.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"
@@ -182,26 +183,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 InstallWarning {
enum Format {
// IMPORTANT: Do not build HTML strings from user or developer-supplied
@@ -631,9 +612,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();
@@ -691,7 +669,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_;
@@ -864,7 +843,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 LoadTextToSpeechVoices(string16* error);
bool LoadIncognitoMode(string16* error);
@@ -910,13 +888,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);
@@ -1024,9 +995,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_;
« no previous file with comments | « chrome/common/extensions/api/extension_action/script_badge_manifest_unittest.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698