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

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: Update InsertCss API. 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
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.h ('k') | chrome/browser/extensions/api/webview/webview_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cdaf16bd51367c8886e3e0a86e459eccbcaf76d7..62a2441ffdca9f4f691f94253cf6eb9c13b198ba 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,10 @@ bool ExecuteCodeInTabFunction::IsWebView() const {
return false;
}
+const GURL& ExecuteCodeInTabFunction::GetWebViewSrc() const {
+ return GURL::EmptyGURL();
+}
+
bool TabsExecuteScriptFunction::ShouldInsertCSS() const {
return false;
}
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.h ('k') | chrome/browser/extensions/api/webview/webview_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698