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

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

Issue 3207002: FBTF: Forward declare and move constructors in chrome/common/extensions/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Win fixes Created 10 years, 4 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/user_script.h
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h
index 87ab5d2c3fa17edaa57e55f33922ece94f47b609..203fb624c2d028630da4182637030f81b1734d1e 100644
--- a/chrome/common/extensions/user_script.h
+++ b/chrome/common/extensions/user_script.h
@@ -11,10 +11,11 @@
#include "base/file_path.h"
#include "base/string_piece.h"
-#include "chrome/common/extensions/url_pattern.h"
#include "googleurl/src/gurl.h"
+#include "chrome/common/extensions/url_pattern.h"
class Pickle;
+class URLPattern;
// Represents a user script, either a standalone one, or one that is part of an
// extension.
@@ -50,12 +51,9 @@ class UserScript {
class File {
public:
File(const FilePath& extension_root, const FilePath& relative_path,
- const GURL& url):
- extension_root_(extension_root),
- relative_path_(relative_path),
- url_(url) {
- }
- File() {}
+ const GURL& url);
+ File();
+ ~File();
const FilePath& extension_root() const { return extension_root_; }
const FilePath& relative_path() const { return relative_path_; }
@@ -104,11 +102,8 @@ class UserScript {
// Constructor. Default the run location to document end, which is like
// Greasemonkey and probably more useful for typical scripts.
- UserScript()
- : run_location_(DOCUMENT_IDLE), emulate_greasemonkey_(false),
- match_all_frames_(false), incognito_enabled_(false),
- allow_file_access_(false) {
- }
+ UserScript();
+ ~UserScript();
const std::string& name_space() const { return name_space_; }
void set_name_space(const std::string& name_space) {
@@ -156,10 +151,8 @@ class UserScript {
// The URLPatterns, if any, that determine which pages this script runs
// against.
const PatternList& url_patterns() const { return url_patterns_; }
- void add_url_pattern(const URLPattern& pattern) {
- url_patterns_.push_back(pattern);
- }
- void clear_url_patterns() { url_patterns_.clear(); }
+ void add_url_pattern(const URLPattern& pattern);
+ void clear_url_patterns();
// List of js scripts for this user script
FileList& js_scripts() { return js_scripts_; }

Powered by Google App Engine
This is Rietveld 408576698