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..fda196a892db26bdc31f5c476aaa1bdacac0e70d 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())-> |
|
lazyboy
2015/06/05 23:09:55
-> goes next line, can you run git cl format on yo
paulmeyer
2015/06/08 17:53:58
Done.
|
| + 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 |
| +// 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); |