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

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

Issue 567037: Initial work on making extensions work in incognito mode. (Closed)
Patch Set: added experimental requirement Created 10 years, 10 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
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/user_script.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/user_script.h
diff --git a/chrome/common/extensions/user_script.h b/chrome/common/extensions/user_script.h
index 9fbbe89e8715206d0362b1215ead56bc0f101ec9..ed840094194192d8bb13bda8c3cf18bd95c8f188 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;
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/user_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698