Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_shell.cc |
| diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc |
| index 9d6e3d035a9345abd48f16cd232273e2524378f8..717613ef3c3c073ffefb1363ff4b47bc3cdf9df5 100644 |
| --- a/chrome/browser/android/vr_shell/vr_shell.cc |
| +++ b/chrome/browser/android/vr_shell/vr_shell.cc |
| @@ -16,6 +16,7 @@ |
| #include "chrome/browser/android/vr_shell/vr_shell_renderer.h" |
| #include "chrome/browser/android/vr_shell/vr_usage_monitor.h" |
| #include "chrome/browser/android/vr_shell/vr_web_contents_observer.h" |
| +#include "content/public/browser/browser_thread.h" |
|
bshe
2016/12/05 19:25:56
nit: this include isn't necessary anymore
asimjour1
2016/12/05 19:37:30
Done.
|
| #include "content/public/browser/navigation_controller.h" |
| #include "content/public/browser/render_view_host.h" |
| #include "content/public/browser/render_widget_host.h" |
| @@ -188,6 +189,8 @@ VrShell::VrShell(JNIEnv* env, |
| ui_input_manager_.reset(new VrInputManager(ui_contents_)); |
| weak_content_input_manager_ = content_input_manager_->GetWeakPtr(); |
| weak_ui_input_manager_ = ui_input_manager_->GetWeakPtr(); |
| + |
| + SetShowingOverscrollGlow(false); |
| } |
| void VrShell::UpdateCompositorLayers(JNIEnv* env, |
| @@ -937,6 +940,7 @@ void VrShell::OnPause(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| return; |
| controller_->OnPause(); |
| gvr_api_->PauseTracking(); |
| + SetShowingOverscrollGlow(true); |
| // exit vr session |
| metrics_helper_->SetVRActive(false); |
| @@ -949,11 +953,17 @@ void VrShell::OnResume(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| gvr_api_->RefreshViewerProfile(); |
| gvr_api_->ResumeTracking(); |
| controller_->OnResume(); |
| + SetShowingOverscrollGlow(false); |
| // exit vr session |
| metrics_helper_->SetVRActive(true); |
| } |
| +void VrShell::SetShowingOverscrollGlow(bool showing_glow) { |
| + main_contents_->GetRenderWidgetHostView()->SetShowingOverscrollGlow( |
| + showing_glow); |
| +} |
| + |
| base::WeakPtr<VrShell> VrShell::GetWeakPtr( |
| const content::WebContents* web_contents) { |
| // Ensure that the WebContents requesting the VrShell instance is the one |