Index: extensions/browser/guest_view/guest_view_manager.h |
diff --git a/extensions/browser/guest_view/guest_view_manager.h b/extensions/browser/guest_view/guest_view_manager.h |
index a38dbb72aade3b4b9a282956b049ab12dff98de4..934c46747dd4656b813caf6118ed1df0fbfac3d9 100644 |
--- a/extensions/browser/guest_view/guest_view_manager.h |
+++ b/extensions/browser/guest_view/guest_view_manager.h |
@@ -57,19 +57,18 @@ class GuestViewManager : public content::BrowserPluginGuestManager, |
// Associates the Browser Plugin with |element_instance_id| to a |
// guest that has ID of |guest_instance_id| and sets initialization |
// parameters, |params| for it. |
- void AttachGuest(int embedder_render_process_id, |
- int embedder_routing_id, |
+ void AttachGuest(int embedder_process_id, |
int element_instance_id, |
int guest_instance_id, |
const base::DictionaryValue& attach_params); |
// Removes the association between |element_instance_id| and a guest instance |
// ID if one exists. |
- void DetachGuest(GuestViewBase* guest, int element_instance_id); |
+ void DetachGuest(GuestViewBase* guest); |
int GetNextInstanceID(); |
int GetGuestInstanceIDForElementID( |
- content::WebContents* owner_web_contents, |
+ int owner_process_id, |
int element_instance_id); |
using WebContentsCreatedCallback = |
@@ -89,7 +88,7 @@ class GuestViewManager : public content::BrowserPluginGuestManager, |
// BrowserPluginGuestManager implementation. |
content::WebContents* GetGuestByInstanceID( |
- content::WebContents* owner_web_contents, |
+ int owner_process_id, |
int element_instance_id) override; |
bool ForEachGuest(content::WebContents* owner_web_contents, |
const GuestCallback& callback) override; |
@@ -128,28 +127,15 @@ class GuestViewManager : public content::BrowserPluginGuestManager, |
GuestInstanceMap guest_web_contents_by_instance_id_; |
struct ElementInstanceKey { |
- content::WebContents* owner_web_contents; |
+ int embedder_process_id; |
int element_instance_id; |
- ElementInstanceKey() |
- : owner_web_contents(nullptr), |
- element_instance_id(0) {} |
- |
- ElementInstanceKey(content::WebContents* owner_web_contents, |
- int element_instance_id) |
- : owner_web_contents(owner_web_contents), |
- element_instance_id(element_instance_id) {} |
- |
- bool operator<(const ElementInstanceKey& other) const { |
- if (owner_web_contents != other.owner_web_contents) |
- return owner_web_contents < other.owner_web_contents; |
- return element_instance_id < other.element_instance_id; |
- } |
- |
- bool operator==(const ElementInstanceKey& other) const { |
- return (owner_web_contents == other.owner_web_contents) && |
- (element_instance_id == other.element_instance_id); |
- } |
+ ElementInstanceKey(); |
+ ElementInstanceKey(int embedder_process_id, |
+ int element_instance_id); |
+ |
+ bool operator<(const ElementInstanceKey& other) const; |
+ bool operator==(const ElementInstanceKey& other) const; |
}; |
using GuestInstanceIDMap = std::map<ElementInstanceKey, int>; |