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

Unified Diff: extensions/browser/api/web_view/web_view_internal_api.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/api/web_view/web_view_internal_api.cc
diff --git a/extensions/browser/api/web_view/web_view_internal_api.cc b/extensions/browser/api/web_view/web_view_internal_api.cc
index 6270ec1eb9d8b7ac8bf177b86b6dfde49c80c1d0..35367f7be7143a0b03eb7bced0b8c82aa368fbf8 100644
--- a/extensions/browser/api/web_view/web_view_internal_api.cc
+++ b/extensions/browser/api/web_view/web_view_internal_api.cc
@@ -70,7 +70,9 @@ bool WebViewInternalNavigateFunction::RunAsyncSafe(WebViewGuest* guest) {
}
WebViewInternalExecuteCodeFunction::WebViewInternalExecuteCodeFunction()
- : guest_instance_id_(0), guest_src_(GURL::EmptyGURL()) {
+ : guest_instance_id_(0),
+ guest_src_(GURL::EmptyGURL()),
+ script_injection_instance_id_(0) {
}
WebViewInternalExecuteCodeFunction::~WebViewInternalExecuteCodeFunction() {
@@ -102,6 +104,9 @@ bool WebViewInternalExecuteCodeFunction::Init() {
return false;
details_ = details.Pass();
+ script_injection_instance_id_ = WebViewGuest::GetOrGenerateUniqueInstanceID(
+ render_view_host()->GetProcess()->GetID(), guest_instance_id_);
+
return true;
}
@@ -133,6 +138,10 @@ const GURL& WebViewInternalExecuteCodeFunction::GetWebViewSrc() const {
return guest_src_;
}
+int WebViewInternalExecuteCodeFunction:: GetScriptInjectionInstanceId() const {
+ return script_injection_instance_id_;
+}
+
WebViewInternalExecuteScriptFunction::WebViewInternalExecuteScriptFunction() {
}

Powered by Google App Engine
This is Rietveld 408576698