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 8067a412fdf76538cc0f11a970df54aa4783f6eb..426273c9039d693928cd62adc440e2c474f03c29 100644 |
--- a/chrome/browser/android/vr_shell/vr_shell_delegate.h |
+++ b/chrome/browser/android/vr_shell/vr_shell_delegate.h |
@@ -25,9 +25,10 @@ class VrShellDelegate : public device::GvrDelegateProvider { |
VrShellDelegate(JNIEnv* env, jobject obj); |
~VrShellDelegate() override; |
- static VrShellDelegate* GetNativeDelegate(JNIEnv* env, jobject jdelegate); |
+ static VrShellDelegate* GetNativeVrShellDelegate(JNIEnv* env, |
+ jobject jdelegate); |
- void SetDelegate(device::GvrDelegate* delegate); |
+ void SetDelegate(device::GvrDelegate* delegate, gvr_context* context); |
void RemoveDelegate(); |
void SetPresentResult(JNIEnv* env, |
@@ -49,12 +50,14 @@ class VrShellDelegate : public device::GvrDelegateProvider { |
private: |
// device::GvrDelegateProvider implementation |
void SetDeviceProvider(device::GvrDeviceProvider* device_provider) override; |
+ void ClearDeviceProvider() override; |
void RequestWebVRPresent(const base::Callback<void(bool)>& callback) override; |
void ExitWebVRPresent() override; |
- device::GvrDelegate* GetNonPresentingDelegate() override; |
- void DestroyNonPresentingDelegate() override; |
+ device::GvrDelegate* GetDelegate() override; |
void SetListeningForActivate(bool listening) override; |
+ void CreateNonPresentingDelegate(); |
+ |
std::unique_ptr<NonPresentingGvrDelegate> non_presenting_delegate_; |
base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_; |
device::GvrDeviceProvider* device_provider_ = nullptr; |
@@ -63,6 +66,9 @@ class VrShellDelegate : public device::GvrDelegateProvider { |
long timebase_nanos_ = 0; |
double interval_seconds_ = 0; |
+ // TODO(mthiesse): Remove the need for this to stored here. crbug.com/674594 |
cjgrant
2017/01/25 21:45:31
"to be"
mthiesse
2017/01/30 19:47:26
Done.
|
+ gvr_context* context_ = nullptr; |
+ |
base::WeakPtrFactory<VrShellDelegate> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(VrShellDelegate); |