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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 return gfx::Rect(content_view_core_->GetViewSize()); | 662 return gfx::Rect(content_view_core_->GetViewSize()); |
663 } | 663 } |
664 | 664 |
665 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { | 665 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
666 if (!content_view_core_) | 666 if (!content_view_core_) |
667 return gfx::Size(); | 667 return gfx::Size(); |
668 | 668 |
669 return content_view_core_->GetPhysicalBackingSize(); | 669 return content_view_core_->GetPhysicalBackingSize(); |
670 } | 670 } |
671 | 671 |
672 float RenderWidgetHostViewAndroid::GetTopControlsLayoutHeight() const { | 672 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { |
| 673 if (!content_view_core_) |
| 674 return false; |
| 675 |
| 676 // Whether or not Blink's viewport size should be shrunk by the height of the |
| 677 // URL-bar. |
| 678 return content_view_core_->DoTopControlsShrinkBlinkSize(); |
| 679 } |
| 680 |
| 681 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { |
673 if (!content_view_core_) | 682 if (!content_view_core_) |
674 return 0.f; | 683 return 0.f; |
675 | 684 |
676 // The amount that the viewport size given to Blink is shrunk by the URL-bar. | 685 // The height of the top controls. |
677 return content_view_core_->GetTopControlsLayoutHeightDip(); | 686 return content_view_core_->GetTopControlsHeightDip(); |
678 } | 687 } |
679 | 688 |
680 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { | 689 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { |
681 // There are no cursors on Android. | 690 // There are no cursors on Android. |
682 } | 691 } |
683 | 692 |
684 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { | 693 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { |
685 // Do nothing. The UI notification is handled through ContentViewClient which | 694 // Do nothing. The UI notification is handled through ContentViewClient which |
686 // is TabContentsDelegate. | 695 // is TabContentsDelegate. |
687 } | 696 } |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 results->orientationAngle = display.RotationAsDegree(); | 1885 results->orientationAngle = display.RotationAsDegree(); |
1877 results->orientationType = | 1886 results->orientationType = |
1878 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); | 1887 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); |
1879 gfx::DeviceDisplayInfo info; | 1888 gfx::DeviceDisplayInfo info; |
1880 results->depth = info.GetBitsPerPixel(); | 1889 results->depth = info.GetBitsPerPixel(); |
1881 results->depthPerComponent = info.GetBitsPerComponent(); | 1890 results->depthPerComponent = info.GetBitsPerComponent(); |
1882 results->isMonochrome = (results->depthPerComponent == 0); | 1891 results->isMonochrome = (results->depthPerComponent == 0); |
1883 } | 1892 } |
1884 | 1893 |
1885 } // namespace content | 1894 } // namespace content |
OLD | NEW |