summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/user_script.h
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 23:25:21 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-11 23:25:21 +0000
commit55a356908083c25a2829db1636564c50c57b430f (patch)
tree1fa448b284205c57f594ca34b175db202af1aec1 /chrome/common/extensions/user_script.h
parent6149d3e3ba96cc4aac419777094a1e090b0825e9 (diff)
downloadchromium_src-55a356908083c25a2829db1636564c50c57b430f.zip
chromium_src-55a356908083c25a2829db1636564c50c57b430f.tar.gz
chromium_src-55a356908083c25a2829db1636564c50c57b430f.tar.bz2
Initial work on making extensions work in incognito mode.
This merely adds a way to enable content scripts and browser actions in incognito windows. They still don't work properly because none of the APIs work with incognito tabs. The way to enable an extension is to add an "incognito" bit in the user prefs file. My plan is to add UI for this later. BUG=32365 Review URL: http://codereview.chromium.org/567037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38852 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/user_script.h')
-rw-r--r--chrome/common/extensions/user_script.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h
index 9fbbe89..ed84009 100644
--- a/chrome/common/extensions/user_script.h
+++ b/chrome/common/extensions/user_script.h
@@ -102,7 +102,7 @@ class UserScript {
// Greasemonkey and probably more useful for typical scripts.
UserScript()
: run_location_(DOCUMENT_IDLE), emulate_greasemonkey_(false),
- match_all_frames_(false) {
+ match_all_frames_(false), incognito_enabled_(false) {
}
const std::string& name_space() const { return name_space_; }
@@ -162,6 +162,9 @@ class UserScript {
const std::string& extension_id() const { return extension_id_; }
void set_extension_id(const std::string& id) { extension_id_ = id; }
+ bool is_incognito_enabled() const { return incognito_enabled_; }
+ void set_incognito_enabled(bool enabled) { incognito_enabled_ = enabled; }
+
bool is_standalone() const { return extension_id_.empty(); }
// Returns true if the script should be applied to the specified URL, false
@@ -217,6 +220,9 @@ class UserScript {
// Whether the user script should run in all frames, or only just the top one.
// Defaults to false.
bool match_all_frames_;
+
+ // True if the script should be injected into an incognito tab.
+ bool incognito_enabled_;
};
typedef std::vector<UserScript> UserScriptList;