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

Unified Diff: chrome/common/extensions/extension.cc

Issue 339064: Add new user script injection point: document_idle. (Closed)
Patch Set: smaller, cleaner, better Created 11 years, 2 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/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index ab2ff76f368610cc704d54f91a67ecea0c101371..86f21876652dadab9d43dabb8fe1aaac0c8b35b6 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -196,6 +196,8 @@ bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script,
result->set_run_location(UserScript::DOCUMENT_START);
} else if (run_location == values::kRunAtDocumentEnd) {
result->set_run_location(UserScript::DOCUMENT_END);
+ } else if (run_location == values::kRunAtDocumentIdle) {
+ result->set_run_location(UserScript::DOCUMENT_IDLE);
} else {
*error = ExtensionErrorUtils::FormatErrorMessage(errors::kInvalidRunAt,
IntToString(definition_index));

Powered by Google App Engine
This is Rietveld 408576698