Chromium Code Reviews| Index: content/browser/android/content_view_core_impl.cc |
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
| index f84616f3bb9459da3c89a38660b3d7d69cc69ab3..e79eef51bfa5dfab9ddebca9549347e7af97c63c 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -701,14 +701,17 @@ void ContentViewCoreImpl::ShowPastePopup(int x_dip, int y_dip) { |
| static_cast<jint>(y_dip)); |
| } |
| -unsigned int ContentViewCoreImpl::GetScaledContentTexture( |
| +void ContentViewCoreImpl::GetScaledContentBitmap( |
| float scale, |
| - gfx::Size* out_size) { |
| + gfx::Size* out_size, |
| + const ContentBitmapCallback& result_callback) { |
| RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); |
| - if (!view) |
| - return 0; |
| + if (!view || !view->IsSurfaceAvailableForCopy()) { |
|
David Trainor- moved to gerrit
2014/02/02 18:38:53
Should the view->IsSurfaceAvailableForCopy() check
powei
2014/02/03 10:06:52
Done.
|
| + result_callback.Run(false, SkBitmap()); |
| + return; |
| + } |
| - return view->GetScaledContentTexture(scale, out_size); |
| + view->GetScaledContentBitmap(scale, out_size, result_callback); |
| } |
| void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) { |