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

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: Renamed onNativeLibraryReady to initializeNative 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* getNativeDelegate(JNIEnv* env, jobject jdelegate);
23
24 // Called by the Java VrShellDelegate. Returns true if the GvrDeviceProvider
25 // needs to handle shutdown first.
26 bool ExitWebVRIfNecessary(JNIEnv* env, jobject obj);
27
28 // device::vrDelegateProvider implementation
29 bool RequestWebVRPresent(device::GvrDeviceProvider* device_provider) override;
30 void ExitWebVRPresent() override;
31
32 // Called from VRShell
33 void OnVrShellReady(VrShell* vr_shell);
34
35 private:
36 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_;
37 device::GvrDeviceProvider* device_provider_;
38 };
39
40 bool RegisterVrShellDelegate(JNIEnv* env);
41
42 } // namespace vr_shell
43
44 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698