| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 | 669 |
| 670 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { | 670 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
| 671 if (!content_view_core_) { | 671 if (!content_view_core_) { |
| 672 if (default_bounds_.IsEmpty()) return gfx::Size(); | 672 if (default_bounds_.IsEmpty()) return gfx::Size(); |
| 673 | 673 |
| 674 float scale_factor = view_.GetDipScale(); | 674 float scale_factor = view_.GetDipScale(); |
| 675 return gfx::Size(default_bounds_.right() * scale_factor, | 675 return gfx::Size(default_bounds_.right() * scale_factor, |
| 676 default_bounds_.bottom() * scale_factor); | 676 default_bounds_.bottom() * scale_factor); |
| 677 } | 677 } |
| 678 | 678 |
| 679 return content_view_core_->GetPhysicalBackingSize(); | 679 return view_.GetPhysicalBackingSize(); |
| 680 } | 680 } |
| 681 | 681 |
| 682 bool RenderWidgetHostViewAndroid::DoBrowserControlsShrinkBlinkSize() const { | 682 bool RenderWidgetHostViewAndroid::DoBrowserControlsShrinkBlinkSize() const { |
| 683 // Whether or not Blink's viewport size should be shrunk by the height of the | 683 // Whether or not Blink's viewport size should be shrunk by the height of the |
| 684 // URL-bar. | 684 // URL-bar. |
| 685 return content_view_core_ && | 685 return content_view_core_ && |
| 686 content_view_core_->DoBrowserControlsShrinkBlinkSize(); | 686 content_view_core_->DoBrowserControlsShrinkBlinkSize(); |
| 687 } | 687 } |
| 688 | 688 |
| 689 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { | 689 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { |
| (...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2190 | 2190 |
| 2191 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2191 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2192 if (!compositor) | 2192 if (!compositor) |
| 2193 return; | 2193 return; |
| 2194 | 2194 |
| 2195 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2195 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2196 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2196 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2197 } | 2197 } |
| 2198 | 2198 |
| 2199 } // namespace content | 2199 } // namespace content |
| OLD | NEW |