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

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

Issue 2374153002: Expose secure origin state to WebVR renderer (Closed)
Patch Set: Rebase, remove stray logging, set explicit default 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const base::android::JavaParamRef<jobject>& obj, 61 const base::android::JavaParamRef<jobject>& obj,
62 bool enabled); 62 bool enabled);
63 63
64 // html/js UI hooks. 64 // html/js UI hooks.
65 static base::WeakPtr<VrShell> GetWeakPtr(); 65 static base::WeakPtr<VrShell> GetWeakPtr();
66 UiScene* GetScene(); 66 UiScene* GetScene();
67 void OnDomContentsLoaded(); 67 void OnDomContentsLoaded();
68 void SetUiTextureSize(int width, int height); 68 void SetUiTextureSize(int width, int height);
69 69
70 // device::GvrDelegate implementation 70 // device::GvrDelegate implementation
71 void SetWebVRSecureOrigin(bool secure_origin) override;
71 void SubmitWebVRFrame() override; 72 void SubmitWebVRFrame() override;
72 void UpdateWebVRTextureBounds( 73 void UpdateWebVRTextureBounds(
73 int eye, float left, float top, float width, float height) override; 74 int eye, float left, float top, float width, float height) override;
74 gvr::GvrApi* gvr_api() override; 75 gvr::GvrApi* gvr_api() override;
75 76
76 void ContentSurfaceChanged( 77 void ContentSurfaceChanged(
77 JNIEnv* env, 78 JNIEnv* env,
78 const base::android::JavaParamRef<jobject>& object, 79 const base::android::JavaParamRef<jobject>& object,
79 jint width, 80 jint width,
80 jint height, 81 jint height,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; 145 std::unique_ptr<VrShellRenderer> vr_shell_renderer_;
145 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; 146 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
146 147
147 gvr::Quatf controller_quat_; 148 gvr::Quatf controller_quat_;
148 bool controller_active_ = false; 149 bool controller_active_ = false;
149 gvr::Vec3f look_at_vector_; 150 gvr::Vec3f look_at_vector_;
150 int ui_tex_width_ = 0; 151 int ui_tex_width_ = 0;
151 int ui_tex_height_ = 0; 152 int ui_tex_height_ = 0;
152 153
153 bool webvr_mode_ = false; 154 bool webvr_mode_ = false;
155 bool webvr_secure_origin_ = false;
154 156
155 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 157 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
156 158
157 DISALLOW_COPY_AND_ASSIGN(VrShell); 159 DISALLOW_COPY_AND_ASSIGN(VrShell);
158 }; 160 };
159 161
160 bool RegisterVrShell(JNIEnv* env); 162 bool RegisterVrShell(JNIEnv* env);
161 163
162 } // namespace vr_shell 164 } // namespace vr_shell
163 165
164 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 166 #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