Chromium Code Reviews| 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..d71cd4e855480c9610907c5afb956a4eaa4de246 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,26 +127,27 @@ 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), |
| + : embedder_process_id(0), |
|
lazyboy
2015/02/12 17:41:32
0 should really be content::ChildProcessHost::kInv
Fady Samuel
2015/02/12 19:00:54
Done + moved implementation to cc file.
|
| element_instance_id(0) {} |
| - ElementInstanceKey(content::WebContents* owner_web_contents, |
| + ElementInstanceKey(int embedder_process_id, |
| int element_instance_id) |
| - : owner_web_contents(owner_web_contents), |
| + : embedder_process_id(embedder_process_id), |
| 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; |
| + if (embedder_process_id != other.embedder_process_id) |
| + return embedder_process_id < other.embedder_process_id; |
| + |
| return element_instance_id < other.element_instance_id; |
| } |
| bool operator==(const ElementInstanceKey& other) const { |
| - return (owner_web_contents == other.owner_web_contents) && |
| + return (embedder_process_id == other.embedder_process_id) && |
| (element_instance_id == other.element_instance_id); |
| } |
| }; |