Index: content/browser/renderer_host/render_widget_host.cc |
=================================================================== |
--- content/browser/renderer_host/render_widget_host.cc (revision 90090) |
+++ content/browser/renderer_host/render_widget_host.cc (working copy) |
@@ -96,12 +96,21 @@ |
} |
RenderWidgetHost::~RenderWidgetHost() { |
+ SetView(NULL); |
+ |
// Clear our current or cached backing store if either remains. |
BackingStoreManager::RemoveBackingStore(this); |
process_->Release(routing_id_); |
} |
+void RenderWidgetHost::SetView(RenderWidgetHostView* view) { |
+ view_ = view; |
+ |
+ if (!view_) |
+ process_->SetCompositingSurface(routing_id_, gfx::kNullPluginWindow); |
+} |
+ |
gfx::NativeViewId RenderWidgetHost::GetNativeViewId() { |
if (view_) |
return gfx::IdFromNativeView(view_->GetNativeView()); |
@@ -125,9 +134,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(); |
} |
@@ -361,7 +372,7 @@ |
void RenderWidgetHost::ViewDestroyed() { |
// TODO(evanm): tracking this may no longer be necessary; |
// eliminate this function if so. |
- view_ = NULL; |
+ SetView(NULL); |
} |
void RenderWidgetHost::SetIsLoading(bool is_loading) { |