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 "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
609 while (locks_on_frame_count_ > 0) { | 609 while (locks_on_frame_count_ > 0) { |
610 UnlockCompositingSurface(); | 610 UnlockCompositingSurface(); |
611 } | 611 } |
612 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); | 612 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); |
613 } | 613 } |
614 | 614 |
615 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { | 615 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { |
616 if (!content_view_core_) | 616 if (!content_view_core_) |
617 return gfx::Rect(default_size_); | 617 return gfx::Rect(default_size_); |
618 | 618 |
619 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
620 switches::kEnableOSKOverscroll)) | |
621 return gfx::Rect(content_view_core_->GetViewSizeWithoutOSK()); | |
ymalik
2015/10/08 19:39:02
@jdduke
GetViewBounds has a bunch of callers. Hav
| |
622 | |
619 return gfx::Rect(content_view_core_->GetViewSize()); | 623 return gfx::Rect(content_view_core_->GetViewSize()); |
620 } | 624 } |
621 | 625 |
626 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const { | |
627 if (!content_view_core_) | |
628 return gfx::Rect(default_size_).size(); | |
629 | |
630 return gfx::Rect(content_view_core_->GetViewSize()).size(); | |
631 } | |
632 | |
622 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { | 633 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
623 if (!content_view_core_) | 634 if (!content_view_core_) |
624 return gfx::Size(); | 635 return gfx::Size(); |
625 | 636 |
626 return content_view_core_->GetPhysicalBackingSize(); | 637 return content_view_core_->GetPhysicalBackingSize(); |
627 } | 638 } |
628 | 639 |
629 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { | 640 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { |
630 if (!content_view_core_) | 641 if (!content_view_core_) |
631 return false; | 642 return false; |
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2012 results->orientationAngle = display.RotationAsDegree(); | 2023 results->orientationAngle = display.RotationAsDegree(); |
2013 results->orientationType = | 2024 results->orientationType = |
2014 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 2025 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
2015 gfx::DeviceDisplayInfo info; | 2026 gfx::DeviceDisplayInfo info; |
2016 results->depth = info.GetBitsPerPixel(); | 2027 results->depth = info.GetBitsPerPixel(); |
2017 results->depthPerComponent = info.GetBitsPerComponent(); | 2028 results->depthPerComponent = info.GetBitsPerComponent(); |
2018 results->isMonochrome = (results->depthPerComponent == 0); | 2029 results->isMonochrome = (results->depthPerComponent == 0); |
2019 } | 2030 } |
2020 | 2031 |
2021 } // namespace content | 2032 } // namespace content |
OLD | NEW |