Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2045443002: Correcting the usage of returning Size object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applied formatting Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 04f9f1207b0ea964b6a200a61f58745b40c8ff60..4659a9c476ada65244c918069dd0eec25767b5d5 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -608,9 +608,9 @@ gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
if (!content_view_core_)
- return gfx::Rect(default_size_).size();
+ return default_size_;
- return gfx::Rect(content_view_core_->GetViewSize()).size();
+ return content_view_core_->GetViewSize();
}
gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
@@ -621,12 +621,10 @@ gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
}
bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const {
- if (!content_view_core_)
- return false;
-
// Whether or not Blink's viewport size should be shrunk by the height of the
// URL-bar.
- return content_view_core_->DoTopControlsShrinkBlinkSize();
+ return content_view_core_ &&
+ content_view_core_->DoTopControlsShrinkBlinkSize();
}
float RenderWidgetHostViewAndroid::GetTopControlsHeight() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698