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

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

Issue 2524423002: VR: Disable Overscroll Glow in VrShell (Closed)
Patch Set: Fix thread issue + Rebase 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 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

Powered by Google App Engine
This is Rietveld 408576698