Chromium Code Reviews| Index: components/guest_view/browser/guest_view_base.cc |
| diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc |
| index 201e08108e395fef62f7aa205fbb4cb6907a7c12..e271a6d8fdd5364712d8293e76bccde8484fc4cc 100644 |
| --- a/components/guest_view/browser/guest_view_base.cc |
| +++ b/components/guest_view/browser/guest_view_base.cc |
| @@ -110,15 +110,17 @@ class GuestViewBase::OwnerContentsObserver : public WebContentsObserver { |
| return; |
| destroyed_ = true; |
| - guest_->EmbedderWillBeDestroyed(); |
| + GuestViewManager::FromBrowserContext(web_contents()->GetBrowserContext()) |
| + ->EmbedderWillBeDestroyed( |
| + web_contents()->GetRenderProcessHost()->GetID()); |
| guest_->Destroy(); |
| } |
| DISALLOW_COPY_AND_ASSIGN(OwnerContentsObserver); |
| }; |
| -// This observer ensures that the GuestViewBase destroys itself when its |
| -// embedder goes away. |
| +// This observer ensures that the GuestViewBase destroys itself if its opening |
|
lazyboy
2015/06/09 14:19:32
s/opening/opener
paulmeyer
2015/06/09 14:49:42
Done.
|
| +// WebContents goes away before the GuestViewBase is attached. |
| class GuestViewBase::OpenerLifetimeObserver : public WebContentsObserver { |
| public: |
| OpenerLifetimeObserver(GuestViewBase* guest) |
| @@ -318,6 +320,11 @@ void GuestViewBase::SetSize(const SetSizeParams& params) { |
| } |
| // static |
| +void GuestViewBase::CleanUp(int embedder_process_id, int view_instance_id) { |
| + // TODO(paulmeyer): Add in any general GuestView cleanup work here. |
| +} |
| + |
| +// static |
| GuestViewBase* GuestViewBase::FromWebContents(const WebContents* web_contents) { |
| WebContentsGuestViewMap* guest_map = webcontents_guestview_map.Pointer(); |
| auto it = guest_map->find(web_contents); |