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

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

Issue 2398103002: Enable magic window mode with new Gvr (Closed)
Patch Set: reviews Created 4 years, 2 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
« no previous file with comments | « chrome/android/java_sources.gni ('k') | chrome/browser/android/vr_shell/vr_shell_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_weak_ref.h" 10 #include "base/android/jni_weak_ref.h"
(...skipping 11 matching lines...) Expand all
22 22
23 static VrShellDelegate* getNativeDelegate(JNIEnv* env, jobject jdelegate); 23 static VrShellDelegate* getNativeDelegate(JNIEnv* env, jobject jdelegate);
24 24
25 // Called by the Java VrShellDelegate. Returns true if the GvrDeviceProvider 25 // Called by the Java VrShellDelegate. Returns true if the GvrDeviceProvider
26 // needs to handle shutdown first. 26 // needs to handle shutdown first.
27 bool ExitWebVRIfNecessary(JNIEnv* env, jobject obj); 27 bool ExitWebVRIfNecessary(JNIEnv* env, jobject obj);
28 28
29 // device::vrDelegateProvider implementation 29 // device::vrDelegateProvider implementation
30 bool RequestWebVRPresent(device::GvrDeviceProvider* device_provider) override; 30 bool RequestWebVRPresent(device::GvrDeviceProvider* device_provider) override;
31 void ExitWebVRPresent() override; 31 void ExitWebVRPresent() override;
32 device::GvrDelegate* GetNonPresentingDelegate() override;
33 void DestroyNonPresentingDelegate() override;
32 34
33 // Called from VRShell 35 // Called from VRShell
34 void OnVrShellReady(VrShell* vr_shell); 36 void OnVrShellReady(VrShell* vr_shell);
35 37
36 private: 38 private:
39 std::unique_ptr<device::GvrDelegate> non_presenting_delegate_;
37 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_; 40 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_delegate_;
38 device::GvrDeviceProvider* device_provider_; 41 device::GvrDeviceProvider* device_provider_;
39 42
40 DISALLOW_COPY_AND_ASSIGN(VrShellDelegate); 43 DISALLOW_COPY_AND_ASSIGN(VrShellDelegate);
41 }; 44 };
42 45
43 bool RegisterVrShellDelegate(JNIEnv* env); 46 bool RegisterVrShellDelegate(JNIEnv* env);
44 47
45 } // namespace vr_shell 48 } // namespace vr_shell
46 49
47 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_ 50 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/android/java_sources.gni ('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