Index: extensions/browser/script_executor.cc |
diff --git a/extensions/browser/script_executor.cc b/extensions/browser/script_executor.cc |
index ac3e671b9a48c056a0344f16c51a92ab5b2a2372..d135be82434599d79fb97d7f33dd84d299b62904 100644 |
--- a/extensions/browser/script_executor.cc |
+++ b/extensions/browser/script_executor.cc |
@@ -14,6 +14,7 @@ |
#include "extensions/browser/extension_registry.h" |
#include "extensions/browser/script_execution_observer.h" |
#include "extensions/common/extension_messages.h" |
+#include "extensions/common/host_id.h" |
#include "ipc/ipc_message.h" |
#include "ipc/ipc_message_macros.h" |
@@ -122,6 +123,7 @@ void ScriptExecutor::ExecuteScript(const std::string& extension_id, |
ScriptExecutor::WorldType world_type, |
ScriptExecutor::ProcessType process_type, |
const GURL& webview_src, |
+ int instance_id, |
const GURL& file_url, |
bool user_gesture, |
ScriptExecutor::ResultType result_type, |
@@ -143,6 +145,8 @@ void ScriptExecutor::ExecuteScript(const std::string& extension_id, |
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.instance_id = params.is_web_view ? instance_id : |
Devlin
2015/02/04 17:01:14
It seems odd that you pass in an instance id from
Xi Han
2015/02/05 16:06:20
The webview.executecode api also needs to call thi
Devlin
2015/02/06 00:28:40
Right. What I am suggesting is:
params.instance_id
Xi Han
2015/02/06 17:21:45
Good idea, I misunderstood your last comments. Upd
|
+ Host::kDefaultInstanceId; |
params.webview_src = webview_src; |
params.file_url = file_url; |
params.wants_result = (result_type == JSON_SERIALIZED_RESULT); |