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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1386403003: Resize only the virtual viewport when the OSK triggers a resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Inset handling logic Created 4 years, 10 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
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/android/build_info.h" 10 #include "base/android/build_info.h"
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 while (locks_on_frame_count_ > 0) { 617 while (locks_on_frame_count_ > 0) {
618 UnlockCompositingSurface(); 618 UnlockCompositingSurface();
619 } 619 }
620 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); 620 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED);
621 } 621 }
622 622
623 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { 623 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
624 if (!content_view_core_) 624 if (!content_view_core_)
625 return gfx::Rect(default_size_); 625 return gfx::Rect(default_size_);
626 626
627 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
628 switches::kEnableOSKOverscroll))
629 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden());
630
627 return gfx::Rect(content_view_core_->GetViewSize()); 631 return gfx::Rect(content_view_core_->GetViewSize());
628 } 632 }
629 633
634 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
AKV 2016/02/10 11:35:28 Is this method getting used ?
ymalik 2016/02/11 01:06:22 Yes. This method is called from a bunch of places.
635 if (!content_view_core_)
636 return gfx::Rect(default_size_).size();
637
638 return gfx::Rect(content_view_core_->GetViewSize()).size();
639 }
640
630 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { 641 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
631 if (!content_view_core_) 642 if (!content_view_core_)
632 return gfx::Size(); 643 return gfx::Size();
633 644
634 return content_view_core_->GetPhysicalBackingSize(); 645 return content_view_core_->GetPhysicalBackingSize();
635 } 646 }
636 647
637 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { 648 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const {
638 if (!content_view_core_) 649 if (!content_view_core_)
639 return false; 650 return false;
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 results->orientationAngle = display.RotationAsDegree(); 2074 results->orientationAngle = display.RotationAsDegree();
2064 results->orientationType = 2075 results->orientationType =
2065 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2076 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2066 gfx::DeviceDisplayInfo info; 2077 gfx::DeviceDisplayInfo info;
2067 results->depth = info.GetBitsPerPixel(); 2078 results->depth = info.GetBitsPerPixel();
2068 results->depthPerComponent = info.GetBitsPerComponent(); 2079 results->depthPerComponent = info.GetBitsPerComponent();
2069 results->isMonochrome = (results->depthPerComponent == 0); 2080 results->isMonochrome = (results->depthPerComponent == 0);
2070 } 2081 }
2071 2082
2072 } // namespace content 2083 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698