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

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

Issue 2804953003: Refactor ContentViewClient (6/6) (Closed)
Patch Set: Created 3 years, 8 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 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 if (x_dip < 0 || x_dip > viewport_size.width() || 641 if (x_dip < 0 || x_dip > viewport_size.width() ||
642 y_dip < 0 || y_dip > viewport_size.height()) 642 y_dip < 0 || y_dip > viewport_size.height())
643 return; 643 return;
644 content_view_core_->OnShowUnhandledTapUIIfNeeded(x_dip, y_dip); 644 content_view_core_->OnShowUnhandledTapUIIfNeeded(x_dip, y_dip);
645 } 645 }
646 646
647 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { 647 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const {
648 if (!content_view_core_) 648 if (!content_view_core_)
649 return default_bounds_; 649 return default_bounds_;
650 650
651 gfx::Size size(content_view_core_->GetViewSize());
651 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 652 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
652 switches::kEnableOSKOverscroll)) 653 switches::kEnableOSKOverscroll)) {
653 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden()); 654 size.Enlarge(0, view_.GetSystemWindowInsetBottom() / view_.GetDipScale());
655 }
654 656
655 return gfx::Rect(content_view_core_->GetViewSize()); 657 return gfx::Rect(size);
656 } 658 }
657 659
658 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const { 660 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const {
659 if (!content_view_core_) 661 if (!content_view_core_)
660 return default_bounds_.size(); 662 return default_bounds_.size();
661 663
662 return content_view_core_->GetViewSize(); 664 return content_view_core_->GetViewSize();
663 } 665 }
664 666
665 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { 667 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const {
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 2174
2173 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2175 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2174 if (!compositor) 2176 if (!compositor)
2175 return; 2177 return;
2176 2178
2177 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2179 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2178 overscroll_refresh_handler, compositor, view_.GetDipScale()); 2180 overscroll_refresh_handler, compositor, view_.GetDipScale());
2179 } 2181 }
2180 2182
2181 } // namespace content 2183 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698