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

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: Rebase 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 // Called by the Java VrShellDelegate
23 bool ExitVRIfNecessary(JNIEnv* env, jobject obj);
24
25 // device::vrDelegateProvider implementation
26 bool RequestWebVRPresent(device::GvrDeviceProvider* device_provider) override;
27 void ExitWebVRPresent() override;
28
29 // Called from VRShell
30 void OnVrShellReady(VrShell* vr_shell);
31
32 private:
33 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_;
34 device::GvrDeviceProvider* device_provider_;
35 };
36
37 bool RegisterVrShellDelegate(JNIEnv* env);
38
39 } // namespace vr_shell
40
41 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698