Index: chrome/common/extensions/user_script.h |
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h |
index adcfa3fcf27a507a1ab8c2c454a4036c5371b5a6..b7093c1494e5756f92cd5f5ad567e9b267090e0d 100644 |
--- a/chrome/common/extensions/user_script.h |
+++ b/chrome/common/extensions/user_script.h |
@@ -102,7 +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) { |
+ : run_location_(DOCUMENT_IDLE), emulate_greasemonkey_(false), |
+ match_all_frames_(false) { |
} |
const std::string& name_space() const { return name_space_; } |
@@ -126,6 +127,10 @@ class UserScript { |
bool emulate_greasemonkey() const { return emulate_greasemonkey_; } |
void set_emulate_greasemonkey(bool val) { emulate_greasemonkey_ = val; } |
+ // Whether to match all frames, or only the top one. |
+ bool match_all_frames() const { return match_all_frames_; } |
+ void set_match_all_frames(bool val) { match_all_frames_ = val; } |
+ |
// The globs, if any, that determine which pages this script runs against. |
// These are only used with "standalone" Greasemonkey-like user scripts. |
const std::vector<std::string>& globs() const { return globs_; } |
@@ -209,6 +214,10 @@ class UserScript { |
// Whether we should try to emulate Greasemonkey's APIs when running this |
// script. |
bool emulate_greasemonkey_; |
+ |
+ // Whether the user script should run in all frames, or only just the top one. |
+ // Defaults to false. |
+ bool match_all_frames_; |
}; |
typedef std::vector<UserScript> UserScriptList; |