Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index 5bb4f3b0d0b60a037fe4a0b6729995cff73a49a7..4c27d8f7872a16bfb4162c4ed2866a5ea8a5fa44 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -333,6 +333,10 @@ bool RenderWidgetHostViewAura::HasFocus() const { |
return window_->HasFocus(); |
} |
+bool RenderWidgetHostViewAura::IsSurfaceAvailableForCopy() const { |
+ return current_surface_ != 0; |
+} |
+ |
void RenderWidgetHostViewAura::Show() { |
window_->Show(); |
} |
@@ -449,10 +453,14 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurface( |
if (!compositor) |
return; |
- ImageTransportClient* container = image_transport_clients_[current_surface_]; |
- if (!container) |
+ std::map<uint64, scoped_refptr<ImageTransportClient> >::iterator it = |
+ image_transport_clients_.find(current_surface_); |
+ if (it == image_transport_clients_.end()) |
return; |
+ ImageTransportClient* container = it->second; |
+ DCHECK(container); |
+ |
gfx::Size size_in_pixel = content::ConvertSizeToPixel(this, size); |
if (!output->initialize( |
size_in_pixel.width(), size_in_pixel.height(), true)) |