| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 content_view_core_->GetViewportSizeDip()); | 520 content_view_core_->GetViewportSizeDip()); |
| 521 host_->WasResized(); | 521 host_->WasResized(); |
| 522 } | 522 } |
| 523 | 523 |
| 524 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { | 524 void RenderWidgetHostViewAndroid::SetSize(const gfx::Size& size) { |
| 525 // Ignore the given size as only the Java code has the power to | 525 // Ignore the given size as only the Java code has the power to |
| 526 // resize the view on Android. | 526 // resize the view on Android. |
| 527 default_bounds_ = gfx::Rect(default_bounds_.origin(), size); | 527 default_bounds_ = gfx::Rect(default_bounds_.origin(), size); |
| 528 } | 528 } |
| 529 | 529 |
| 530 void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) { | 530 void RenderWidgetHostViewAndroid::RequestTopLevelBoundsInScreen( |
| 531 const gfx::Rect& rect) { |
| 531 default_bounds_ = rect; | 532 default_bounds_ = rect; |
| 532 } | 533 } |
| 533 | 534 |
| 534 void RenderWidgetHostViewAndroid::GetScaledContentBitmap( | 535 void RenderWidgetHostViewAndroid::GetScaledContentBitmap( |
| 535 float scale, | 536 float scale, |
| 536 SkColorType preferred_color_type, | 537 SkColorType preferred_color_type, |
| 537 gfx::Rect src_subrect, | 538 gfx::Rect src_subrect, |
| 538 const ReadbackRequestCallback& result_callback) { | 539 const ReadbackRequestCallback& result_callback) { |
| 539 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { | 540 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { |
| 540 result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); | 541 result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); |
| (...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 1975 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 1975 if (!compositor) | 1976 if (!compositor) |
| 1976 return; | 1977 return; |
| 1977 | 1978 |
| 1978 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 1979 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 1979 overscroll_refresh_handler, compositor, | 1980 overscroll_refresh_handler, compositor, |
| 1980 ui::GetScaleFactorForNativeView(GetNativeView())); | 1981 ui::GetScaleFactorForNativeView(GetNativeView())); |
| 1981 } | 1982 } |
| 1982 | 1983 |
| 1983 } // namespace content | 1984 } // namespace content |
| OLD | NEW |