| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void QueueTask(base::Callback<void()>& callback); | 114 void QueueTask(base::Callback<void()>& callback); |
| 115 | 115 |
| 116 // Perform a UI action triggered by the javascript API. | 116 // Perform a UI action triggered by the javascript API. |
| 117 void DoUiAction(const UiAction action); | 117 void DoUiAction(const UiAction action); |
| 118 | 118 |
| 119 private: | 119 private: |
| 120 ~VrShell() override; | 120 ~VrShell() override; |
| 121 void LoadUIContent(); | 121 void LoadUIContent(); |
| 122 void DrawVrShell(const gvr::Mat4f& head_pose, gvr::Frame &frame); | 122 void DrawVrShell(const gvr::Mat4f& head_pose, gvr::Frame &frame); |
| 123 void DrawUiView(const gvr::Mat4f* head_pose, | 123 void DrawUiView(const gvr::Mat4f* head_pose, |
| 124 const std::vector<const ContentRectangle*>& elements); | 124 const std::vector<const ContentRectangle*>& elements, |
| 125 bool clear); |
| 125 void DrawElements(const gvr::Mat4f& render_matrix, | 126 void DrawElements(const gvr::Mat4f& render_matrix, |
| 126 const std::vector<const ContentRectangle*>& elements); | 127 const std::vector<const ContentRectangle*>& elements); |
| 127 void DrawCursor(const gvr::Mat4f& render_matrix); | 128 void DrawCursor(const gvr::Mat4f& render_matrix); |
| 128 void DrawWebVr(); | 129 void DrawWebVr(); |
| 129 | 130 |
| 130 void UpdateController(const gvr::Vec3f& forward_vector); | 131 void UpdateController(const gvr::Vec3f& forward_vector); |
| 131 | 132 |
| 132 void HandleQueuedTasks(); | 133 void HandleQueuedTasks(); |
| 133 | 134 |
| 134 // content::WebContentsObserver implementation. | 135 // content::WebContentsObserver implementation. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 192 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 192 | 193 |
| 193 DISALLOW_COPY_AND_ASSIGN(VrShell); | 194 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 194 }; | 195 }; |
| 195 | 196 |
| 196 bool RegisterVrShell(JNIEnv* env); | 197 bool RegisterVrShell(JNIEnv* env); |
| 197 | 198 |
| 198 } // namespace vr_shell | 199 } // namespace vr_shell |
| 199 | 200 |
| 200 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 201 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |