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

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

Issue 226043005: Fix webview.executeScript API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small changes are made. Created 6 years, 8 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_scheduler.cc
diff --git a/chrome/renderer/extensions/user_script_scheduler.cc b/chrome/renderer/extensions/user_script_scheduler.cc
index b4cf64f135fad41982506854958dd402fbe9169e..040b4be583770f55d31051613d835359f6a74a95 100644
--- a/chrome/renderer/extensions/user_script_scheduler.cc
+++ b/chrome/renderer/extensions/user_script_scheduler.cc
@@ -185,7 +185,12 @@ void UserScriptScheduler::ExecuteCodeImpl(
//
// For child frames, we just skip ones the extension doesn't have access
// to and carry on.
- if (!params.is_web_view &&
+
+ bool is_webview_src_matched =
+ child_frame->document().url().string().equals(
+ WebString::fromUTF8(params.webview_src));
not at google - send to devlin 2014/04/07 17:43:00 you should be able to use GURL == on this when eve
Xi Han 2014/04/07 21:03:37 Done.
+ if ((!params.is_web_view ||
+ (params.is_web_view && !is_webview_src_matched)) &&
!PermissionsData::CanExecuteScriptOnPage(
not at google - send to devlin 2014/04/07 17:43:00 this is a very complex condition. Is there a way y
Xi Han 2014/04/07 21:03:37 Done.
extension,
child_frame->document().url(),

Powered by Google App Engine
This is Rietveld 408576698