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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 602 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
603 switches::kEnableOSKOverscroll)) 603 switches::kEnableOSKOverscroll))
604 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden()); 604 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden());
605 605
606 return gfx::Rect(content_view_core_->GetViewSize()); 606 return gfx::Rect(content_view_core_->GetViewSize());
607 } 607 }
608 608
609 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const { 609 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
610 if (!content_view_core_) 610 if (!content_view_core_)
611 return gfx::Rect(default_size_).size(); 611 return default_size_;
612 612
613 return gfx::Rect(content_view_core_->GetViewSize()).size(); 613 return content_view_core_->GetViewSize();
614 } 614 }
615 615
616 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { 616 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
617 if (!content_view_core_) 617 if (!content_view_core_)
618 return gfx::Size(); 618 return gfx::Size();
619 619
620 return content_view_core_->GetPhysicalBackingSize(); 620 return content_view_core_->GetPhysicalBackingSize();
621 } 621 }
622 622
623 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { 623 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const {
624 if (!content_view_core_)
625 return false;
626
627 // Whether or not Blink's viewport size should be shrunk by the height of the 624 // Whether or not Blink's viewport size should be shrunk by the height of the
628 // URL-bar. 625 // URL-bar.
629 return content_view_core_->DoTopControlsShrinkBlinkSize(); 626 return content_view_core_ &&
627 content_view_core_->DoTopControlsShrinkBlinkSize();
630 } 628 }
631 629
632 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const { 630 float RenderWidgetHostViewAndroid::GetTopControlsHeight() const {
633 if (!content_view_core_) 631 if (!content_view_core_)
634 return 0.f; 632 return 0.f;
635 633
636 // The height of the top controls. 634 // The height of the top controls.
637 return content_view_core_->GetTopControlsHeightDip(); 635 return content_view_core_->GetTopControlsHeightDip();
638 } 636 }
639 637
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 case ui::MotionEvent::ACTION_UP: 2043 case ui::MotionEvent::ACTION_UP:
2046 case ui::MotionEvent::ACTION_POINTER_UP: 2044 case ui::MotionEvent::ACTION_POINTER_UP:
2047 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 2045 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
2048 delta.InMicroseconds(), 1, 1000000, 50); 2046 delta.InMicroseconds(), 1, 1000000, 50);
2049 default: 2047 default:
2050 return; 2048 return;
2051 } 2049 }
2052 } 2050 }
2053 2051
2054 } // namespace content 2052 } // namespace content
OLDNEW
« 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