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

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell_delegate.h

Issue 2343023002: Switch WebVR to handle GvrApi management through VrShellDelegate (Closed)
Patch Set: Addressed tedchoc@'s last feedback Created 4 years, 3 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
7
8 #include <jni.h>
9
10 #include "base/android/jni_weak_ref.h"
11 #include "device/vr/android/gvr/gvr_delegate.h"
12
13 namespace vr_shell {
14
15 class VrShell;
16
17 class VrShellDelegate : public device::GvrDelegateProvider {
18 public:
19 VrShellDelegate(JNIEnv* env, jobject obj);
20 virtual ~VrShellDelegate();
21
22 static VrShellDelegate* getNativePointer(JNIEnv* env, jobject jdelegate);
23
24 // Called by the Java VrShellDelegate
25 bool ExitWebVRIfNecessary(JNIEnv* env, jobject obj);
26
27 // device::vrDelegateProvider implementation
28 bool RequestWebVRPresent(device::GvrDeviceProvider* device_provider) override;
29 void ExitWebVRPresent() override;
30
31 // Called from VRShell
32 void OnVrShellReady(VrShell* vr_shell);
33
34 private:
35 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_;
36 device::GvrDeviceProvider* device_provider_;
37 };
38
39 bool RegisterVrShellDelegate(JNIEnv* env);
40
41 } // namespace vr_shell
42
43 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698