diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-25 02:05:39 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-25 02:05:39 +0000 |
commit | 719663e4f49853e2a9ff84bc0ac29cca484105d1 (patch) | |
tree | 175f6f17d37984d9fcea0698f28efece6d2195ef /chrome/common/extensions/user_script.cc | |
parent | 6776c72f56c29972bfd47efc1a1cf1629e3c7da2 (diff) | |
download | chromium_src-719663e4f49853e2a9ff84bc0ac29cca484105d1.zip chromium_src-719663e4f49853e2a9ff84bc0ac29cca484105d1.tar.gz chromium_src-719663e4f49853e2a9ff84bc0ac29cca484105d1.tar.bz2 |
Introduce a new 'all_frames' property to content scripts and
default it to false. This should improve performance in
sites that use frames and elimiate confusion, since in most
cases developers *don't* expect content scripts to match
frames.
Review URL: http://codereview.chromium.org/412008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/user_script.cc')
-rw-r--r-- | chrome/common/extensions/user_script.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/extensions/user_script.cc b/chrome/common/extensions/user_script.cc index 10d0b60..96f7dd4 100644 --- a/chrome/common/extensions/user_script.cc +++ b/chrome/common/extensions/user_script.cc @@ -84,6 +84,9 @@ void UserScript::Pickle(::Pickle* pickle) const { // Write Greasemonkey emulation. pickle->WriteBool(emulate_greasemonkey()); + // Write match all frames + pickle->WriteBool(match_all_frames()); + // Write globs. std::vector<std::string>::const_iterator glob; pickle->WriteSize(globs_.size()); @@ -130,6 +133,9 @@ void UserScript::Unpickle(const ::Pickle& pickle, void** iter) { // Read Greasemonkey emulation. CHECK(pickle.ReadBool(iter, &emulate_greasemonkey_)); + // Read match all frames + CHECK(pickle.ReadBool(iter, &match_all_frames_)); + // Read globs. size_t num_globs = 0; CHECK(pickle.ReadSize(iter, &num_globs)); |