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); |