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

Unified Diff: chrome/browser/extensions/script_executor.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/browser/extensions/script_executor.cc
diff --git a/chrome/browser/extensions/script_executor.cc b/chrome/browser/extensions/script_executor.cc
index 703a35bd8b7f9aff390b2306780b2359f8ab96b0..a96b8cd0e7ad35bdd8f63834fcf4ba2bacd0ab87 100644
--- a/chrome/browser/extensions/script_executor.cc
+++ b/chrome/browser/extensions/script_executor.cc
@@ -108,18 +108,18 @@ ScriptExecutor::ScriptExecutor(
ScriptExecutor::~ScriptExecutor() {}
-void ScriptExecutor::ExecuteScript(
- const std::string& extension_id,
- ScriptExecutor::ScriptType script_type,
- const std::string& code,
- ScriptExecutor::FrameScope frame_scope,
- UserScript::RunLocation run_at,
- ScriptExecutor::WorldType world_type,
- ScriptExecutor::ProcessType process_type,
- const GURL& file_url,
- bool user_gesture,
- ScriptExecutor::ResultType result_type,
- const ExecuteScriptCallback& callback) {
+void ScriptExecutor::ExecuteScript(const std::string& extension_id,
+ ScriptExecutor::ScriptType script_type,
+ const std::string& code,
+ ScriptExecutor::FrameScope frame_scope,
+ UserScript::RunLocation run_at,
+ ScriptExecutor::WorldType world_type,
+ ScriptExecutor::ProcessType process_type,
+ const std::string webview_src,
+ const GURL& file_url,
+ bool user_gesture,
+ ScriptExecutor::ResultType result_type,
+ const ExecuteScriptCallback& callback) {
ExtensionMsg_ExecuteCode_Params params;
params.request_id = next_request_id_++;
params.extension_id = extension_id;
@@ -129,6 +129,7 @@ void ScriptExecutor::ExecuteScript(
params.run_at = static_cast<int>(run_at);
params.in_main_world = (world_type == MAIN_WORLD);
params.is_web_view = (process_type == WEB_VIEW_PROCESS);
+ params.webview_src = webview_src;
params.file_url = file_url;
params.wants_result = (result_type == JSON_SERIALIZED_RESULT);
params.user_gesture = user_gesture;

Powered by Google App Engine
This is Rietveld 408576698