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

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: address review comments 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 while (locks_on_frame_count_ > 0) { 609 while (locks_on_frame_count_ > 0) {
610 UnlockCompositingSurface(); 610 UnlockCompositingSurface();
611 } 611 }
612 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED); 612 RunAckCallbacks(cc::SurfaceDrawStatus::DRAW_SKIPPED);
613 } 613 }
614 614
615 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { 615 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
616 if (!content_view_core_) 616 if (!content_view_core_)
617 return gfx::Rect(default_size_); 617 return gfx::Rect(default_size_);
618 618
619 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
620 switches::kEnableOSKOverscroll))
621 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden());
622
619 return gfx::Rect(content_view_core_->GetViewSize()); 623 return gfx::Rect(content_view_core_->GetViewSize());
620 } 624 }
621 625
626 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
627 if (!content_view_core_)
628 return gfx::Rect(default_size_).size();
629
630 return gfx::Rect(content_view_core_->GetViewSize()).size();
631 }
632
622 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { 633 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
623 if (!content_view_core_) 634 if (!content_view_core_)
624 return gfx::Size(); 635 return gfx::Size();
625 636
626 return content_view_core_->GetPhysicalBackingSize(); 637 return content_view_core_->GetPhysicalBackingSize();
627 } 638 }
628 639
629 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const { 640 bool RenderWidgetHostViewAndroid::DoTopControlsShrinkBlinkSize() const {
630 if (!content_view_core_) 641 if (!content_view_core_)
631 return false; 642 return false;
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 results->orientationAngle = display.RotationAsDegree(); 2057 results->orientationAngle = display.RotationAsDegree();
2047 results->orientationType = 2058 results->orientationType =
2048 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display); 2059 RenderWidgetHostViewBase::GetOrientationTypeForMobile(display);
2049 gfx::DeviceDisplayInfo info; 2060 gfx::DeviceDisplayInfo info;
2050 results->depth = info.GetBitsPerPixel(); 2061 results->depth = info.GetBitsPerPixel();
2051 results->depthPerComponent = info.GetBitsPerComponent(); 2062 results->depthPerComponent = info.GetBitsPerComponent();
2052 results->isMonochrome = (results->depthPerComponent == 0); 2063 results->isMonochrome = (results->depthPerComponent == 0);
2053 } 2064 }
2054 2065
2055 } // namespace content 2066 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698