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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { | 714 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
715 if (!content_view_core_) { | 715 if (!content_view_core_) { |
716 if (default_bounds_.IsEmpty()) return gfx::Size(); | 716 if (default_bounds_.IsEmpty()) return gfx::Size(); |
717 | 717 |
718 return gfx::Size(default_bounds_.right() | 718 return gfx::Size(default_bounds_.right() |
719 * ui::GetScaleFactorForNativeView(GetNativeView()), | 719 * ui::GetScaleFactorForNativeView(GetNativeView()), |
720 default_bounds_.bottom() | 720 default_bounds_.bottom() |
721 * ui::GetScaleFactorForNativeView(GetNativeView())); | 721 * ui::GetScaleFactorForNativeView(GetNativeView())); |
722 } | 722 } |
723 | 723 |
724 return content_view_core_->GetPhysicalBackingSize(); | 724 return view_.GetPhysicalBackingSize(); |
725 } | 725 } |
726 | 726 |
727 bool RenderWidgetHostViewAndroid::DoBrowserControlsShrinkBlinkSize() const { | 727 bool RenderWidgetHostViewAndroid::DoBrowserControlsShrinkBlinkSize() const { |
728 // Whether or not Blink's viewport size should be shrunk by the height of the | 728 // Whether or not Blink's viewport size should be shrunk by the height of the |
729 // URL-bar. | 729 // URL-bar. |
730 return content_view_core_ && | 730 return content_view_core_ && |
731 content_view_core_->DoBrowserControlsShrinkBlinkSize(); | 731 content_view_core_->DoBrowserControlsShrinkBlinkSize(); |
732 } | 732 } |
733 | 733 |
734 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { | 734 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { |
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 case ui::MotionEvent::ACTION_UP: | 1994 case ui::MotionEvent::ACTION_UP: |
1995 case ui::MotionEvent::ACTION_POINTER_UP: | 1995 case ui::MotionEvent::ACTION_POINTER_UP: |
1996 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1996 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
1997 delta.InMicroseconds(), 1, 1000000, 50); | 1997 delta.InMicroseconds(), 1, 1000000, 50); |
1998 default: | 1998 default: |
1999 return; | 1999 return; |
2000 } | 2000 } |
2001 } | 2001 } |
2002 | 2002 |
2003 } // namespace content | 2003 } // namespace content |
OLD | NEW |