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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 718 |
719 return gfx::Size(default_bounds_.right() | 719 return gfx::Size(default_bounds_.right() |
720 * ui::GetScaleFactorForNativeView(GetNativeView()), | 720 * ui::GetScaleFactorForNativeView(GetNativeView()), |
721 default_bounds_.bottom() | 721 default_bounds_.bottom() |
722 * ui::GetScaleFactorForNativeView(GetNativeView())); | 722 * ui::GetScaleFactorForNativeView(GetNativeView())); |
723 } | 723 } |
724 | 724 |
725 return content_view_core_->GetPhysicalBackingSize(); | 725 return content_view_core_->GetPhysicalBackingSize(); |
726 } | 726 } |
727 | 727 |
728 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { | 728 bool RenderWidgetHostViewAndroid::DoBrowserControlsShrinkBlinkSize() const { |
729 // Whether or not Blink's viewport size should be shrunk by the height of the | 729 // Whether or not Blink's viewport size should be shrunk by the height of the |
730 // URL-bar. | 730 // URL-bar. |
731 return content_view_core_ && | 731 return content_view_core_ && |
732 content_view_core_->DoTopControlsShrinkBlinkSize(); | 732 content_view_core_->DoBrowserControlsShrinkBlinkSize(); |
733 } | 733 } |
734 | 734 |
735 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { | 735 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { |
736 if (!content_view_core_) | 736 if (!content_view_core_) |
737 return default_bounds_.x(); | 737 return default_bounds_.x(); |
738 | 738 |
739 // The height of the top controls. | 739 // The height of the browser controls. |
740 return content_view_core_->GetTopControlsHeightDip(); | 740 return content_view_core_->GetTopControlsHeightDip(); |
741 } | 741 } |
742 | 742 |
743 float RenderWidgetHostViewAndroid::GetBottomControlsHeight() const { | 743 float RenderWidgetHostViewAndroid::GetBottomControlsHeight() const { |
744 if (!content_view_core_) | 744 if (!content_view_core_) |
745 return 0.f; | 745 return 0.f; |
746 | 746 |
747 // The height of the top controls. | 747 // The height of the browser controls. |
748 return content_view_core_->GetBottomControlsHeightDip(); | 748 return content_view_core_->GetBottomControlsHeightDip(); |
749 } | 749 } |
750 | 750 |
751 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { | 751 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { |
752 // There are no cursors on Android. | 752 // There are no cursors on Android. |
753 } | 753 } |
754 | 754 |
755 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { | 755 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { |
756 // Do nothing. The UI notification is handled through ContentViewClient which | 756 // Do nothing. The UI notification is handled through ContentViewClient which |
757 // is TabContentsDelegate. | 757 // is TabContentsDelegate. |
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1990 case ui::MotionEvent::ACTION_UP: | 1990 case ui::MotionEvent::ACTION_UP: |
1991 case ui::MotionEvent::ACTION_POINTER_UP: | 1991 case ui::MotionEvent::ACTION_POINTER_UP: |
1992 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1992 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
1993 delta.InMicroseconds(), 1, 1000000, 50); | 1993 delta.InMicroseconds(), 1, 1000000, 50); |
1994 default: | 1994 default: |
1995 return; | 1995 return; |
1996 } | 1996 } |
1997 } | 1997 } |
1998 | 1998 |
1999 } // namespace content | 1999 } // namespace content |
OLD | NEW |