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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.cc

Issue 2524423002: VR: Disable Overscroll Glow in VrShell (Closed)
Patch Set: Rebase + Rename VrShell::SetShowingOverscrollGlow Created 4 years 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 side-by-side diff with in-line comments
Download patch
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 f9152a5bd3a640c629600919a9a47562f9ce33e4..524baff41b620213542882bbe033bb2239122a1a 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -188,6 +188,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();
+
+ SetShowingOverscrollGlowOnUI(false);
}
void VrShell::UpdateCompositorLayersOnUI(JNIEnv* env,
@@ -939,6 +941,7 @@ void VrShell::OnPauseOnUI(JNIEnv* env, const JavaParamRef<jobject>& obj) {
// TODO(mthiesse): Clean up threading here.
controller_->OnPause();
gvr_api_->PauseTracking();
+ SetShowingOverscrollGlowOnUI(true);
// exit vr session
metrics_helper_->SetVRActive(false);
@@ -952,11 +955,17 @@ void VrShell::OnResumeOnUI(JNIEnv* env, const JavaParamRef<jobject>& obj) {
gvr_api_->RefreshViewerProfile();
gvr_api_->ResumeTracking();
controller_->OnResume();
+ SetShowingOverscrollGlowOnUI(false);
// exit vr session
metrics_helper_->SetVRActive(true);
}
+void VrShell::SetShowingOverscrollGlowOnUI(bool showing_glow) {
+ main_contents_->GetRenderWidgetHostView()->SetShowingOverscrollGlow(
+ showing_glow);
+}
+
base::WeakPtr<VrShell> VrShell::GetWeakPtrOnUI(
const content::WebContents* web_contents) {
// Ensure that the WebContents requesting the VrShell instance is the one
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.h ('k') | chrome/browser/android/vr_shell/vr_web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698