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

Unified Diff: chrome/common/extensions/extension.h

Issue 11446034: SupportsUserData and manifest handlers for Extension; use them for the Omnibox API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 9e7687ce1a2fb51b58375f4c3cc469ee65c2e6b6..032415636259d1367c5fe1bfc77f02c4d14a09d8 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -19,6 +19,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/supports_user_data.h"
#include "base/synchronization/lock.h"
#include "chrome/common/extensions/command.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -62,7 +63,8 @@ class PermissionSet;
typedef std::set<std::string> OAuth2Scopes;
// Represents a Chrome extension.
-class Extension : public base::RefCountedThreadSafe<Extension> {
+class Extension : public base::RefCountedThreadSafe<Extension>,
+ public base::SupportsUserData {
public:
struct InstallWarning;
@@ -687,13 +689,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const ActionInfo* system_indicator_info() const {
return system_indicator_info_.get();
}
- bool is_verbose_install_message() const {
- return !omnibox_keyword().empty() ||
- browser_action_info() ||
- (page_action_info() &&
- (page_action_command() ||
- !page_action_info()->default_icon.empty()));
- }
const FileBrowserHandlerList* file_browser_handlers() const {
return file_browser_handlers_.get();
}
@@ -766,7 +761,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const URLOverrideMap& GetChromeURLOverrides() const {
return chrome_url_overrides_;
}
- const std::string omnibox_keyword() const { return omnibox_keyword_; }
bool incognito_split_mode() const { return incognito_split_mode_; }
bool offline_enabled() const { return offline_enabled_; }
const std::vector<TtsVoice>& tts_voices() const { return tts_voices_; }
@@ -872,7 +866,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
static bool IsTrustedId(const std::string& id);
Extension(const FilePath& path, scoped_ptr<extensions::Manifest> manifest);
- ~Extension();
+ virtual ~Extension();
// Initialize the extension from a parsed manifest.
// TODO(aa): Rename to just Init()? There's no Value here anymore.
@@ -942,6 +936,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool LoadFileHandlers(string16* error);
bool LoadExtensionFeatures(APIPermissionSet* api_permissions,
string16* error);
+ bool LoadManifestHandlerFeatures(string16* error);
bool LoadDevToolsPage(string16* error);
bool LoadInputComponents(const APIPermissionSet& api_permissions,
string16* error);
@@ -958,7 +953,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
FileBrowserHandler* LoadFileBrowserHandler(
const base::DictionaryValue* file_browser_handlers, string16* error);
bool LoadChromeURLOverrides(string16* error);
- bool LoadOmnibox(string16* error);
bool LoadTextToSpeechVoices(string16* error);
bool LoadIncognitoMode(string16* error);
bool LoadContentSecurityPolicy(string16* error);
@@ -1229,9 +1223,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// Should this app be shown in the browser New Tab Page.
bool display_in_new_tab_page_;
- // The Omnibox keyword for this extension, or empty if there is none.
- std::string omnibox_keyword_;
-
// List of text-to-speech voices that this extension provides, if any.
std::vector<TtsVoice> tts_voices_;

Powered by Google App Engine
This is Rietveld 408576698