| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_android.h" |
| 6 | 6 |
| 7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 content_view_core_->GetViewportSizeDip()); | 526 content_view_core_->GetViewportSizeDip()); |
| 527 host_->WasResized(); | 527 host_->WasResized(); |
| 528 } | 528 } |
| 529 | 529 |
| 530 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { | 530 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { |
| 531 // Ignore the given size as only the Java code has the power to | 531 // Ignore the given size as only the Java code has the power to |
| 532 // resize the view on Android. | 532 // resize the view on Android. |
| 533 default_bounds_ = gfx::Rect(default_bounds_.origin(), size); | 533 default_bounds_ = gfx::Rect(default_bounds_.origin(), size); |
| 534 } | 534 } |
| 535 | 535 |
| 536 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) { | 536 void RenderWidgetHostViewAndroid::RequestTopLevelBoundsInScreen( |
| 537 const gfx::Rect& rect) { |
| 537 default_bounds_ = rect; | 538 default_bounds_ = rect; |
| 538 } | 539 } |
| 539 | 540 |
| 540 void RenderWidgetHostViewAndroid::GetScaledContentBitmap( | 541 void RenderWidgetHostViewAndroid::GetScaledContentBitmap( |
| 541 float scale, | 542 float scale, |
| 542 SkColorType preferred_color_type, | 543 SkColorType preferred_color_type, |
| 543 gfx::Rect src_subrect, | 544 gfx::Rect src_subrect, |
| 544 const ReadbackRequestCallback& result_callback) { | 545 const ReadbackRequestCallback& result_callback) { |
| 545 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { | 546 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { |
| 546 result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); | 547 result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 1999 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 1999 if (!compositor) | 2000 if (!compositor) |
| 2000 return; | 2001 return; |
| 2001 | 2002 |
| 2002 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2003 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2003 overscroll_refresh_handler, compositor, | 2004 overscroll_refresh_handler, compositor, |
| 2004 ui::GetScaleFactorForNativeView(GetNativeView())); | 2005 ui::GetScaleFactorForNativeView(GetNativeView())); |
| 2005 } | 2006 } |
| 2006 | 2007 |
| 2007 } // namespace content | 2008 } // namespace content |
| OLD | NEW |