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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_delegate.h

Issue 2471433002: Implement WebVR presentation pausing for VR Shell Menu Mode (Closed)
Patch Set: Add comments to VRDisplay Created 4 years, 1 month 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_delegate.h
diff --git a/chrome/browser/android/vr_shell/vr_shell_delegate.h b/chrome/browser/android/vr_shell/vr_shell_delegate.h
index 4ac1dfc859823f20b92b8a290677039ea304caf2..98e057c35e8c57babe9fb8213f976ca92289456e 100644
--- a/chrome/browser/android/vr_shell/vr_shell_delegate.h
+++ b/chrome/browser/android/vr_shell/vr_shell_delegate.h
@@ -11,6 +11,10 @@
#include "base/macros.h"
#include "device/vr/android/gvr/gvr_delegate.h"
+namespace device {
+class GvrDeviceProvider;
+}
+
namespace vr_shell {
class VrShell;
@@ -20,14 +24,17 @@ class VrShellDelegate : public device::GvrDelegateProvider {
VrShellDelegate(JNIEnv* env, jobject obj);
virtual ~VrShellDelegate();
- static VrShellDelegate* getNativeDelegate(JNIEnv* env, jobject jdelegate);
+ static VrShellDelegate* GetNativeDelegate(JNIEnv* env, jobject jdelegate);
+
+ scoped_refptr<device::GvrDeviceProvider> GetDeviceProvider();
// Called by the Java VrShellDelegate. Returns true if the GvrDeviceProvider
// needs to handle shutdown first.
void ExitWebVRIfNecessary(JNIEnv* env, jobject obj);
- // device::vrDelegateProvider implementation
- bool RequestWebVRPresent(device::GvrDeviceProvider* device_provider) override;
+ // device::GvrDelegateProvider implementation
+ bool RequestWebVRPresent(
+ scoped_refptr<device::GvrDeviceProvider> device_provider) override;
void ExitWebVRPresent() override;
device::GvrDelegate* GetNonPresentingDelegate() override;
void DestroyNonPresentingDelegate() override;
@@ -38,7 +45,7 @@ class VrShellDelegate : public device::GvrDelegateProvider {
private:
std::unique_ptr<device::GvrDelegate> non_presenting_delegate_;
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_;
- device::GvrDeviceProvider* device_provider_;
+ scoped_refptr<device::GvrDeviceProvider> device_provider_;
DISALLOW_COPY_AND_ASSIGN(VrShellDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698