Index: content/browser/renderer_host/render_widget_host.cc |
=================================================================== |
--- content/browser/renderer_host/render_widget_host.cc (revision 89036) |
+++ content/browser/renderer_host/render_widget_host.cc (working copy) |
@@ -100,12 +100,21 @@ |
} |
RenderWidgetHost::~RenderWidgetHost() { |
+ set_view(NULL); |
+ |
// Clear our current or cached backing store if either remains. |
BackingStoreManager::RemoveBackingStore(this); |
process_->Release(routing_id_); |
} |
+void RenderWidgetHost::set_view(RenderWidgetHostView* view) { |
+ view_ = view; |
+ |
+ if (!view_) |
+ process_->SetCompositingSurface(routing_id_, gfx::kNullPluginWindow); |
+} |
+ |
gfx::NativeViewId RenderWidgetHost::GetNativeViewId() { |
if (view_) |
return gfx::IdFromNativeView(view_->GetNativeView()); |
@@ -129,9 +138,11 @@ |
renderer_initialized_ = true; |
+ process_->SetCompositingSurface(routing_id_, |
+ GetCompositingSurface()); |
+ |
// Send the ack along with the information on placement. |
- Send(new ViewMsg_CreatingNew_ACK( |
- routing_id_, GetNativeViewId(), GetCompositingSurface())); |
+ Send(new ViewMsg_CreatingNew_ACK(routing_id_, GetNativeViewId())); |
WasResized(); |
} |
@@ -365,7 +376,7 @@ |
void RenderWidgetHost::ViewDestroyed() { |
// TODO(evanm): tracking this may no longer be necessary; |
// eliminate this function if so. |
- view_ = NULL; |
+ set_view(NULL); |
} |
void RenderWidgetHost::SetIsLoading(bool is_loading) { |