| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 while (locks_on_frame_count_ > 0) { | 608 while (locks_on_frame_count_ > 0) { |
| 609 UnlockCompositingSurface(); | 609 UnlockCompositingSurface(); |
| 610 } | 610 } |
| 611 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); | 611 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); |
| 612 } | 612 } |
| 613 | 613 |
| 614 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { | 614 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { |
| 615 if (!content_view_core_) | 615 if (!content_view_core_) |
| 616 return gfx::Rect(default_size_); | 616 return gfx::Rect(default_size_); |
| 617 | 617 |
| 618 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 619 switches::kEnableOSKOverscroll)) |
| 620 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden()); |
| 621 |
| 618 return gfx::Rect(content_view_core_->GetViewSize()); | 622 return gfx::Rect(content_view_core_->GetViewSize()); |
| 619 } | 623 } |
| 620 | 624 |
| 625 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const { |
| 626 if (!content_view_core_) |
| 627 return gfx::Rect(default_size_).size(); |
| 628 |
| 629 return gfx::Rect(content_view_core_->GetViewSize()).size(); |
| 630 } |
| 631 |
| 621 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { | 632 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
| 622 if (!content_view_core_) | 633 if (!content_view_core_) |
| 623 return gfx::Size(); | 634 return gfx::Size(); |
| 624 | 635 |
| 625 return content_view_core_->GetPhysicalBackingSize(); | 636 return content_view_core_->GetPhysicalBackingSize(); |
| 626 } | 637 } |
| 627 | 638 |
| 628 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { | 639 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { |
| 629 if (!content_view_core_) | 640 if (!content_view_core_) |
| 630 return false; | 641 return false; |
| (...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 results->orientationAngle = display.RotationAsDegree(); | 2032 results->orientationAngle = display.RotationAsDegree(); |
| 2022 results->orientationType = | 2033 results->orientationType = |
| 2023 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2034 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
| 2024 gfx::DeviceDisplayInfo info; | 2035 gfx::DeviceDisplayInfo info; |
| 2025 results->depth = info.GetBitsPerPixel(); | 2036 results->depth = info.GetBitsPerPixel(); |
| 2026 results->depthPerComponent = info.GetBitsPerComponent(); | 2037 results->depthPerComponent = info.GetBitsPerComponent(); |
| 2027 results->isMonochrome = (results->depthPerComponent == 0); | 2038 results->isMonochrome = (results->depthPerComponent == 0); |
| 2028 } | 2039 } |
| 2029 | 2040 |
| 2030 } // namespace content | 2041 } // namespace content |
| OLD | NEW |