| 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 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 } | 1757 } |
| 1758 | 1758 |
| 1759 SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const { | 1759 SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const { |
| 1760 return cached_background_color_; | 1760 return cached_background_color_; |
| 1761 } | 1761 } |
| 1762 | 1762 |
| 1763 void RenderWidgetHostViewAndroid::SetIsInVR(bool is_in_vr) { | 1763 void RenderWidgetHostViewAndroid::SetIsInVR(bool is_in_vr) { |
| 1764 is_in_vr_ = is_in_vr; | 1764 is_in_vr_ = is_in_vr; |
| 1765 } | 1765 } |
| 1766 | 1766 |
| 1767 bool RenderWidgetHostViewAndroid::IsInVR() const { |
| 1768 return is_in_vr_; |
| 1769 } |
| 1770 |
| 1767 void RenderWidgetHostViewAndroid::DidOverscroll( | 1771 void RenderWidgetHostViewAndroid::DidOverscroll( |
| 1768 const ui::DidOverscrollParams& params) { | 1772 const ui::DidOverscrollParams& params) { |
| 1769 if (sync_compositor_) | 1773 if (sync_compositor_) |
| 1770 sync_compositor_->DidOverscroll(params); | 1774 sync_compositor_->DidOverscroll(params); |
| 1771 | 1775 |
| 1772 if (!content_view_core_ || !is_showing_) | 1776 if (!content_view_core_ || !is_showing_) |
| 1773 return; | 1777 return; |
| 1774 | 1778 |
| 1775 if (overscroll_controller_) | 1779 if (overscroll_controller_) |
| 1776 overscroll_controller_->OnOverscrolled(params); | 1780 overscroll_controller_->OnOverscrolled(params); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2076 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); | 2080 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); |
| 2077 if (!compositor) | 2081 if (!compositor) |
| 2078 return; | 2082 return; |
| 2079 | 2083 |
| 2080 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( | 2084 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| 2081 overscroll_refresh_handler, compositor, | 2085 overscroll_refresh_handler, compositor, |
| 2082 ui::GetScaleFactorForNativeView(GetNativeView())); | 2086 ui::GetScaleFactorForNativeView(GetNativeView())); |
| 2083 } | 2087 } |
| 2084 | 2088 |
| 2085 } // namespace content | 2089 } // namespace content |
| OLD | NEW |