| Index: extensions/browser/guest_view/guest_view_base.cc
|
| diff --git a/extensions/browser/guest_view/guest_view_base.cc b/extensions/browser/guest_view/guest_view_base.cc
|
| index 7e5568711db5d64b17226cc211db8ede3f94a465..b62f21aeabcfe6082419eb8b8c0a3c0555f93907 100644
|
| --- a/extensions/browser/guest_view/guest_view_base.cc
|
| +++ b/extensions/browser/guest_view/guest_view_base.cc
|
| @@ -153,7 +153,7 @@ GuestViewBase::GuestViewBase(content::WebContents* owner_web_contents)
|
| element_instance_id_(guestview::kInstanceIDNone),
|
| initialized_(false),
|
| is_being_destroyed_(false),
|
| - guest_sizer_(nullptr),
|
| + guest_proxy_host_(nullptr),
|
| auto_size_enabled_(false),
|
| is_full_page_plugin_(false),
|
| weak_ptr_factory_(this) {
|
| @@ -291,7 +291,7 @@ void GuestViewBase::SetSize(const SetSizeParams& params) {
|
| GuestSizeChangedDueToAutoSize(guest_size_, new_size);
|
| } else {
|
| // Autosize was already disabled.
|
| - guest_sizer_->SizeContents(new_size);
|
| + guest_proxy_host_->SizeContents(new_size);
|
| }
|
|
|
| DispatchOnResizeEvent(guest_size_, new_size);
|
| @@ -378,7 +378,7 @@ content::WebContents* GuestViewBase::CreateNewGuestWindow(
|
| create_params);
|
| }
|
|
|
| -void GuestViewBase::DidAttach(int guest_proxy_routing_id) {
|
| +void GuestViewBase::DidAttach() {
|
| opener_lifetime_observer_.reset();
|
|
|
| SetUpSizing(*attach_params());
|
| @@ -389,7 +389,7 @@ void GuestViewBase::DidAttach(int guest_proxy_routing_id) {
|
| // Inform the associated GuestViewContainer that the contentWindow is ready.
|
| embedder_web_contents()->Send(new GuestViewMsg_GuestAttached(
|
| element_instance_id_,
|
| - guest_proxy_routing_id));
|
| + guest_proxy_host_->GetGuestProxyRoutingID()));
|
|
|
| SendQueuedEvents();
|
| }
|
| @@ -424,7 +424,7 @@ void GuestViewBase::Destroy() {
|
|
|
| is_being_destroyed_ = true;
|
|
|
| - guest_sizer_ = nullptr;
|
| + guest_proxy_host_ = nullptr;
|
|
|
| // It is important to clear owner_web_contents_ after the call to
|
| // StopTrackingEmbedderZoomLevel(), but before the rest of
|
| @@ -443,8 +443,7 @@ void GuestViewBase::Destroy() {
|
| weak_ptr_factory_.InvalidateWeakPtrs();
|
|
|
| // Give the content module an opportunity to perform some cleanup.
|
| - if (!destruction_callback_.is_null())
|
| - destruction_callback_.Run();
|
| + guest_proxy_host_->WillDestroy();
|
|
|
| webcontents_guestview_map.Get().erase(web_contents());
|
| GuestViewManager::FromBrowserContext(browser_context_)->
|
| @@ -471,13 +470,9 @@ void GuestViewBase::SetOpener(GuestViewBase* guest) {
|
| opener_lifetime_observer_.reset();
|
| }
|
|
|
| -void GuestViewBase::RegisterDestructionCallback(
|
| - const DestructionCallback& callback) {
|
| - destruction_callback_ = callback;
|
| -}
|
| -
|
| -void GuestViewBase::SetGuestSizer(content::GuestSizer* guest_sizer) {
|
| - guest_sizer_ = guest_sizer;
|
| +void GuestViewBase::SetGuestProxyHost(
|
| + content::GuestProxyHost* guest_proxy_host) {
|
| + guest_proxy_host_ = guest_proxy_host;
|
| }
|
|
|
| void GuestViewBase::WillAttach(content::WebContents* embedder_web_contents,
|
|
|