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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.h

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/guest_view/web_view/web_view_guest.h
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h
index 2e399ea92c3e057e99c1537674875f4f243e8aa3..cb28c674a7367e72fa00e2a1dd90de171758b2a0 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "base/callback.h"
#include "base/observer_list.h"
#include "content/public/browser/javascript_dialog_manager.h"
#include "content/public/browser/notification_observer.h"
@@ -56,12 +57,19 @@ class WebViewGuest : public GuestView<WebViewGuest>,
static const char Type[];
- // Return the stored rules registry ID of the given webview. Will generate
+ // Returns the stored rules registry ID of the given webview. Will generate
// an ID for the first query.
static int GetOrGenerateRulesRegistryID(
int embedder_process_id,
int web_view_instance_id);
+ // Returns the stored instance ID of the given guest. The instance ID is
+ // unique per <webview> guest, and is used in script injection.
+ // Will generate an ID for the first query.
+ static int GetOrGenerateUniqueInstanceID(
+ int embedder_process_id,
+ int guest_instance_id);
+
// Request navigating the guest to the provided |src| URL.
void NavigateGuest(const std::string& src, bool force_navigation);

Powered by Google App Engine
This is Rietveld 408576698