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

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

Issue 2361533003: Expose secure origin state to WebVR renderer (Closed)
Patch Set: Rebase 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 | « no previous file | chrome/browser/android/vr_shell/vr_shell.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_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 6 #define CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const base::android::JavaParamRef<jobject>& obj, 51 const base::android::JavaParamRef<jobject>& obj,
52 jint texture_data_handle); 52 jint texture_data_handle);
53 void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 53 void DrawFrame(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
54 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 54 void OnPause(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
55 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 55 void OnResume(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
56 void SetWebVrMode(JNIEnv* env, 56 void SetWebVrMode(JNIEnv* env,
57 const base::android::JavaParamRef<jobject>& obj, 57 const base::android::JavaParamRef<jobject>& obj,
58 bool enabled); 58 bool enabled);
59 59
60 // device::GvrDelegate implementation 60 // device::GvrDelegate implementation
61 void SetWebVRSecureOrigin(bool secure_origin) override;
61 void SubmitWebVRFrame() override; 62 void SubmitWebVRFrame() override;
62 void UpdateWebVRTextureBounds( 63 void UpdateWebVRTextureBounds(
63 int eye, float left, float top, float width, float height) override; 64 int eye, float left, float top, float width, float height) override;
64 gvr::GvrApi* gvr_api() override; 65 gvr::GvrApi* gvr_api() override;
65 66
66 void ContentSurfaceDestroyed( 67 void ContentSurfaceDestroyed(
67 JNIEnv* env, 68 JNIEnv* env,
68 const base::android::JavaParamRef<jobject>& object); 69 const base::android::JavaParamRef<jobject>& object);
69 void ContentSurfaceChanged( 70 void ContentSurfaceChanged(
70 JNIEnv* env, 71 JNIEnv* env,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 VrShellDelegate* delegate_; 116 VrShellDelegate* delegate_;
116 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; 117 std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
117 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; 118 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
118 119
119 gvr::Quatf controller_quat_; 120 gvr::Quatf controller_quat_;
120 bool controller_active_ = false; 121 bool controller_active_ = false;
121 gvr::Vec3f look_at_vector_; 122 gvr::Vec3f look_at_vector_;
122 123
123 bool webvr_mode_ = false; 124 bool webvr_mode_ = false;
125 bool webvr_secure_origin_;
124 126
125 DISALLOW_COPY_AND_ASSIGN(VrShell); 127 DISALLOW_COPY_AND_ASSIGN(VrShell);
126 }; 128 };
127 129
128 bool RegisterVrShell(JNIEnv* env); 130 bool RegisterVrShell(JNIEnv* env);
129 131
130 } // namespace vr_shell 132 } // namespace vr_shell
131 133
132 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 134 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698