OLD | NEW |
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 jint height, | 79 jint height, |
80 const base::android::JavaParamRef<jobject>& surface); | 80 const base::android::JavaParamRef<jobject>& surface); |
81 | 81 |
82 private: | 82 private: |
83 virtual ~VrShell(); | 83 virtual ~VrShell(); |
84 void DrawVrShell(int64_t time); | 84 void DrawVrShell(int64_t time); |
85 void DrawEye(const gvr::Mat4f& view_matrix, | 85 void DrawEye(const gvr::Mat4f& view_matrix, |
86 const gvr::BufferViewport& params); | 86 const gvr::BufferViewport& params); |
87 void DrawContentRect(); | 87 void DrawContentRect(); |
88 void DrawWebVr(); | 88 void DrawWebVr(); |
| 89 void DrawWebVrOverlay(); |
| 90 void DrawWebVrEye(const gvr::Mat4f& view_matrix, |
| 91 const gvr::BufferViewport& params); |
89 void DrawUI(); | 92 void DrawUI(); |
90 void DrawCursor(); | 93 void DrawCursor(); |
91 | 94 |
92 void UpdateController(); | 95 void UpdateController(); |
93 | 96 |
94 // samplerExternalOES texture data for content area image. | 97 // samplerExternalOES texture data for content area image. |
95 jint content_texture_id_ = 0; | 98 jint content_texture_id_ = 0; |
96 | 99 |
97 float desktop_screen_tilt_; | 100 float desktop_screen_tilt_; |
98 float desktop_height_; | 101 float desktop_height_; |
(...skipping 23 matching lines...) Expand all Loading... |
122 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; | 125 std::unique_ptr<VrShellRenderer> vr_shell_renderer_; |
123 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; | 126 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; |
124 | 127 |
125 gvr::Quatf controller_quat_; | 128 gvr::Quatf controller_quat_; |
126 bool controller_active_ = false; | 129 bool controller_active_ = false; |
127 gvr::Vec3f look_at_vector_; | 130 gvr::Vec3f look_at_vector_; |
128 int ui_tex_width_ = 0; | 131 int ui_tex_width_ = 0; |
129 int ui_tex_height_ = 0; | 132 int ui_tex_height_ = 0; |
130 | 133 |
131 bool webvr_mode_ = false; | 134 bool webvr_mode_ = false; |
132 bool webvr_secure_origin_; | 135 bool webvr_secure_origin_ = false; |
| 136 int webvr_warning_frames_ = 0; |
133 | 137 |
134 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 138 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
135 | 139 |
136 DISALLOW_COPY_AND_ASSIGN(VrShell); | 140 DISALLOW_COPY_AND_ASSIGN(VrShell); |
137 }; | 141 }; |
138 | 142 |
139 bool RegisterVrShell(JNIEnv* env); | 143 bool RegisterVrShell(JNIEnv* env); |
140 | 144 |
141 } // namespace vr_shell | 145 } // namespace vr_shell |
142 | 146 |
143 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 147 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
OLD | NEW |