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

Unified Diff: extensions/browser/script_executor.cc

Issue 885493007: Refactoring: de-couple Extensions from "script injection System" [render side] : 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: extensions/browser/script_executor.cc
diff --git a/extensions/browser/script_executor.cc b/extensions/browser/script_executor.cc
index ac3e671b9a48c056a0344f16c51a92ab5b2a2372..954107d7d27612af156ccbc8a9f3517bf632ebda 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,9 @@ 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 = instance_id;
+ // Only webviews should have custom instance ids.
+ DCHECK(instance_id == HostID::kDefaultInstanceId || params.is_web_view);
params.webview_src = webview_src;
params.file_url = file_url;
params.wants_result = (result_type == JSON_SERIALIZED_RESULT);

Powered by Google App Engine
This is Rietveld 408576698