Chromium Code Reviews| Index: components/guest_view/browser/guest_view_manager.h |
| diff --git a/components/guest_view/browser/guest_view_manager.h b/components/guest_view/browser/guest_view_manager.h |
| index 033e2a2cd1bc044412f85871708345a1728f757e..651cfaf48d9f5b93000764ff6573abdc714ea378 100644 |
| --- a/components/guest_view/browser/guest_view_manager.h |
| +++ b/components/guest_view/browser/guest_view_manager.h |
| @@ -62,10 +62,12 @@ class GuestViewManager : public content::BrowserPluginGuestManager, |
| int guest_instance_id, |
| int embedder_render_process_id); |
| - // 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. |
| + // 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. The embedder frame is identified by the pair of |
| + // |embedder_process_id| and |embedder_routing_id|. |
| void AttachGuest(int embedder_process_id, |
| + int embedder_routing_id, |
| int element_instance_id, |
| int guest_instance_id, |
| const base::DictionaryValue& attach_params); |
| @@ -266,6 +268,12 @@ class GuestViewManager : public content::BrowserPluginGuestManager, |
| using CallbacksForEachEmbedderID = std::map<int, CallbacksForEachViewID>; |
| CallbacksForEachEmbedderID view_destruction_callback_map_; |
| + // The routing ID of the embedder which most recently sent an attach request. |
| + // We use this value to later identify the RenderFrameHost and WebContents |
| + // which embed the guest. This is mainly used for MimeHandlerViewGuest and |
| + // specifically when the guest is embedded inside a cross origin frame. |
| + int attaching_guest_embedder_routing_id_; |
|
Charlie Reis
2016/10/18 22:52:20
Routing IDs can only be used in conjunction with a
EhsanK
2016/10/20 21:41:17
It comes later when the attach request arrives (wh
|
| + |
| // This is used to ensure that an EmbedderRenderProcessHostObserver will not |
| // call into this GuestViewManager after it has been destroyed. |
| base::WeakPtrFactory<GuestViewManager> weak_ptr_factory_; |