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

Unified Diff: chrome/renderer/extensions/user_script_slave.cc

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: many more tests Created 8 years, 6 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/renderer/extensions/user_script_slave.cc
diff --git a/chrome/renderer/extensions/user_script_slave.cc b/chrome/renderer/extensions/user_script_slave.cc
index 8862631a2c47999dce84d3bfa23ce8a16df30db2..c34ad47e1145c8317c2307cb743844e5b32bf825 100644
--- a/chrome/renderer/extensions/user_script_slave.cc
+++ b/chrome/renderer/extensions/user_script_slave.cc
@@ -279,8 +279,15 @@ void UserScriptSlave::InjectScripts(WebFrame* frame,
if (!extension)
continue;
- if (!extension->CanExecuteScriptOnPage(data_source_url, script, NULL))
+ // Content scripts are not tab-specific.
+ int no_tab_id = -1;
Aaron Boodman 2012/06/08 05:31:30 Nit: const int kNoTabId.
not at google - send to devlin 2012/06/12 20:40:51 Done.
+
Aaron Boodman 2012/06/08 05:31:30 Nit: you can delete this blank line.
not at google - send to devlin 2012/06/12 20:40:51 Done.
+ if (!extension->CanExecuteScriptOnPage(data_source_url,
+ no_tab_id,
+ script,
+ NULL)) {
continue;
+ }
// We rely on WebCore for CSS injection, but it's still useful to know how
// many css files there are.

Powered by Google App Engine
This is Rietveld 408576698