| OLD | NEW |
| 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 if (x_dip < 0 || x_dip > viewport_size.width() || | 639 if (x_dip < 0 || x_dip > viewport_size.width() || |
| 640 y_dip < 0 || y_dip > viewport_size.height()) | 640 y_dip < 0 || y_dip > viewport_size.height()) |
| 641 return; | 641 return; |
| 642 content_view_core_->OnShowUnhandledTapUIIfNeeded(x_dip, y_dip); | 642 content_view_core_->OnShowUnhandledTapUIIfNeeded(x_dip, y_dip); |
| 643 } | 643 } |
| 644 | 644 |
| 645 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { | 645 gfx::Rect RenderWidgetHostViewAndroid::GetViewBounds() const { |
| 646 if (!content_view_core_) | 646 if (!content_view_core_) |
| 647 return default_bounds_; | 647 return default_bounds_; |
| 648 | 648 |
| 649 gfx::Size size(content_view_core_->GetViewSize()); |
| 649 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 650 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 650 switches::kEnableOSKOverscroll)) | 651 switches::kEnableOSKOverscroll)) { |
| 651 return gfx::Rect(content_view_core_->GetViewSizeWithOSKHidden()); | 652 size.Enlarge(0, view_.GetSystemWindowInsetBottom() / view_.GetDipScale()); |
| 653 } |
| 652 | 654 |
| 653 return gfx::Rect(content_view_core_->GetViewSize()); | 655 return gfx::Rect(size); |
| 654 } | 656 } |
| 655 | 657 |
| 656 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const { | 658 gfx::Size RenderWidgetHostViewAndroid::GetVisibleViewportSize() const { |
| 657 if (!content_view_core_) | 659 if (!content_view_core_) |
| 658 return default_bounds_.size(); | 660 return default_bounds_.size(); |
| 659 | 661 |
| 660 return content_view_core_->GetViewSize(); | 662 return content_view_core_->GetViewSize(); |
| 661 } | 663 } |
| 662 | 664 |
| 663 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { | 665 gfx::Size RenderWidgetHostViewAndroid::GetPhysicalBackingSize() const { |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 | 2181 |
| 2180 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2182 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2181 if (!compositor) | 2183 if (!compositor) |
| 2182 return; | 2184 return; |
| 2183 | 2185 |
| 2184 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2186 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2185 overscroll_refresh_handler, compositor, view_.GetDipScale()); | 2187 overscroll_refresh_handler, compositor, view_.GetDipScale()); |
| 2186 } | 2188 } |
| 2187 | 2189 |
| 2188 } // namespace content | 2190 } // namespace content |
| OLD | NEW |