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

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

Issue 11724002: Move ContentScripts out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Wider net for registration 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 429bc03237b71f73d8c54422ef92f41b737a2fc2..72ea69f03cd317be79aef4389d2b17ebf7ead0da 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -558,9 +558,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// settings page (i.e. chrome://extensions).
bool ShouldDisplayInExtensionSettings() const;
- // Returns true if the extension has a content script declared at |url|.
- bool HasContentScriptAtURL(const GURL& url) const;
-
// Gets the tab-specific host permissions of |tab_id|, or NULL if there
// aren't any.
scoped_refptr<const PermissionSet> GetTabSpecificPermissions(int tab_id)
@@ -604,7 +601,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool converted_from_user_script() const {
return converted_from_user_script_;
}
- const UserScriptList& content_scripts() const { return content_scripts_; }
const ActionInfo* page_action_info() const { return page_action_info_.get(); }
const ActionInfo* browser_action_info() const {
return browser_action_info_.get();
@@ -652,6 +648,12 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool offline_enabled() const { return offline_enabled_; }
const OAuth2Info& oauth2_info() const { return oauth2_info_; }
bool wants_file_access() const { return wants_file_access_; }
+ // TODO(rdevlin.cronin): This is needed for ContentScriptsHandler, and should
+ // be moved out as part of crbug.com/159265. This should not be used anywhere
+ // else.
+ void set_wants_file_access(bool wants_file_access) {
+ wants_file_access_ = wants_file_access;
+ }
int creation_flags() const { return creation_flags_; }
bool from_webstore() const { return (creation_flags_ & FROM_WEBSTORE) != 0; }
bool from_bookmark() const { return (creation_flags_ & FROM_BOOKMARK) != 0; }
@@ -807,7 +809,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
bool LoadExtensionFeatures(APIPermissionSet* api_permissions,
string16* error);
bool LoadManifestHandlerFeatures(string16* error);
- bool LoadContentScripts(string16* error);
bool LoadPageAction(string16* error);
bool LoadBrowserAction(string16* error);
bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error);
@@ -839,22 +840,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
SkBitmap* GetCachedImageImpl(const ExtensionResource& source,
const gfx::Size& max_size) const;
- // Helper method that loads a UserScript object from a
- // dictionary in the content_script list of the manifest.
- bool LoadUserScriptHelper(const base::DictionaryValue* content_script,
- int definition_index,
- string16* error,
- UserScript* result);
-
- // Helper method that loads either the include_globs or exclude_globs list
- // from an entry in the content_script lists of the manifest.
- bool LoadGlobsHelper(const base::DictionaryValue* content_script,
- int content_script_index,
- const char* globs_property_name,
- string16* error,
- void(UserScript::*add_method)(const std::string& glob),
- UserScript* instance);
-
// Helper method that loads the OAuth2 info from the 'oauth2' manifest key.
bool LoadOAuth2Info(string16* error);
@@ -953,9 +938,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// different UI if so).
bool converted_from_user_script_;
- // Paths to the content scripts the extension contains.
- UserScriptList content_scripts_;
-
// The extension's page action, if any.
scoped_ptr<ActionInfo> page_action_info_;

Powered by Google App Engine
This is Rietveld 408576698