Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
| index adf4451262e8977929e0cf626417eb3abdf2aad5..40b3d3f42daa81493305003c2077138e9917fa63 100644 |
| --- a/content/browser/renderer_host/render_widget_host_impl.cc |
| +++ b/content/browser/renderer_host/render_widget_host_impl.cc |
| @@ -2345,8 +2345,13 @@ void RenderWidgetHostImpl::DidReceiveRendererFrame() { |
| void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { |
| DCHECK(base::MessageLoopForUI::IsCurrent()); |
| - gfx::Rect view_bounds = GetView()->GetViewBounds(); |
| - gfx::Rect snapshot_bounds(view_bounds.size()); |
| +#if defined(ANDROID) |
| + // On Android, call sites should pass in the bounds with correct offset |
| + // to capture the intended content area. |
| + gfx::Rect snapshot_bounds(GetView()->GetViewBounds()); |
|
boliu
2016/12/22 21:14:59
Feels like GrabViewSnapshotAsync should grab the o
boliu
2016/12/22 21:28:54
Oh, I see sievers complained about the translation
Jinsuk Kim
2017/01/03 07:07:48
I take it that you want the change in RWVHA::GetVi
|
| +#else |
| + gfx::Rect snapshot_bounds(GetView()->GetViewBounds().size()); |
| +#endif |
| std::vector<unsigned char> png; |
| if (ui::GrabViewSnapshot( |