Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_android.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc |
| index 0253a8caaecd0d511fcee0cb2f697f5506369a1f..8951474a37d5757bd8b8caaf6d427bf72f58008a 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_android.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_android.cc |
| @@ -443,7 +443,7 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid( |
| is_showing_(!widget_host->is_hidden()), |
| is_window_visible_(true), |
| is_window_activity_started_(true), |
| - is_showing_overscroll_glow_(true), |
| + is_in_vr_(false), |
| content_view_core_(nullptr), |
| ime_adapter_android_(this), |
| cached_background_color_(SK_ColorWHITE), |
| @@ -776,7 +776,7 @@ void RenderWidgetHostViewAndroid::OnUpdateTextInputStateCalled( |
| ? *GetTextInputManager()->GetTextInputState() |
| : TextInputState(); |
| - if (!content_view_core_) |
| + if (!content_view_core_ || is_in_vr_) |
|
EhsanK
2017/01/13 21:55:24
I was wondering if the intention of the CL was to
asimjour
2017/01/16 19:28:41
This is a temporary solution. For now I want to st
EhsanK
2017/01/16 20:23:11
sgtm. The benefit of doing (2) is not sending unus
|
| return; |
| content_view_core_->UpdateImeAdapter( |
|
EhsanK
2017/01/13 21:55:24
Regarding the second point above: Here I think the
asimjour
2017/01/16 19:28:41
The UpdateImeAdapter is doing more, but other chan
EhsanK
2017/01/16 20:23:11
Acknowledged.
|
| @@ -953,7 +953,7 @@ void RenderWidgetHostViewAndroid::SelectionChanged(const base::string16& text, |
| const gfx::Range& range) { |
|
EhsanK
2017/01/13 21:55:23
Similar to the OnUpdateTextInputStateCalled() abov
|
| RenderWidgetHostViewBase::SelectionChanged(text, offset, range); |
| - if (!content_view_core_) |
| + if (!content_view_core_ || is_in_vr_) |
| return; |
| if (range.is_empty()) { |
| content_view_core_->OnSelectionChanged(""); |
| @@ -1539,7 +1539,7 @@ void RenderWidgetHostViewAndroid::SendBeginFrame(cc::BeginFrameArgs args) { |
| bool RenderWidgetHostViewAndroid::Animate(base::TimeTicks frame_time) { |
| bool needs_animate = false; |
| - if (overscroll_controller_ && is_showing_overscroll_glow_) { |
| + if (overscroll_controller_ && !is_in_vr_) { |
| needs_animate |= overscroll_controller_->Animate( |
| frame_time, content_view_core_->GetViewAndroid()->GetLayer()); |
| } |
| @@ -1754,8 +1754,8 @@ SkColor RenderWidgetHostViewAndroid::GetCachedBackgroundColor() const { |
| return cached_background_color_; |
| } |
| -void RenderWidgetHostViewAndroid::SetShowingOverscrollGlow(bool showing_glow) { |
| - is_showing_overscroll_glow_ = showing_glow; |
| +void RenderWidgetHostViewAndroid::SetIsInVR(bool is_in_vr) { |
| + is_in_vr_ = is_in_vr; |
| } |
| void RenderWidgetHostViewAndroid::DidOverscroll( |
| @@ -2079,7 +2079,6 @@ void RenderWidgetHostViewAndroid::CreateOverscrollControllerIfPossible() { |
| overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( |
| overscroll_refresh_handler, compositor, |
| ui::GetScaleFactorForNativeView(GetNativeView())); |
| - is_showing_overscroll_glow_ = true; |
| } |
| } // namespace content |