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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 226043005: Fix webview.executeScript API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make use of GURL. 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/browser/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index 39607d2b0f7f2532c3d2d37871f069edea697e07..b7ee5bf2176853e981204a0e01d02325ad926000 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -1366,19 +1366,19 @@ bool TabsUpdateFunction::UpdateURL(const std::string &url_string,
return false;
}
- TabHelper::FromWebContents(web_contents_)->
- script_executor()->ExecuteScript(
- extension_id(),
- ScriptExecutor::JAVASCRIPT,
- url.GetContent(),
- ScriptExecutor::TOP_FRAME,
- UserScript::DOCUMENT_IDLE,
- ScriptExecutor::MAIN_WORLD,
- ScriptExecutor::DEFAULT_PROCESS,
- GURL(),
- user_gesture_,
- ScriptExecutor::NO_RESULT,
- base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this));
+ TabHelper::FromWebContents(web_contents_)->script_executor()->ExecuteScript(
+ extension_id(),
+ ScriptExecutor::JAVASCRIPT,
+ url.GetContent(),
+ ScriptExecutor::TOP_FRAME,
+ UserScript::DOCUMENT_IDLE,
+ ScriptExecutor::MAIN_WORLD,
+ ScriptExecutor::DEFAULT_PROCESS,
+ GURL(),
+ GURL(),
+ user_gesture_,
+ ScriptExecutor::NO_RESULT,
+ base::Bind(&TabsUpdateFunction::OnExecuteCodeFinished, this));
*is_async = true;
return true;
@@ -1865,6 +1865,8 @@ bool ExecuteCodeInTabFunction::IsWebView() const {
return false;
}
+GURL ExecuteCodeInTabFunction::GetWebViewSrc() const { return GURL(); }
+
bool TabsExecuteScriptFunction::ShouldInsertCSS() const {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698