| 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 void SendEventsToTarget(VrInputManager* input_target, | 132 void SendEventsToTarget(VrInputManager* input_target, |
| 132 int pixel_x, | 133 int pixel_x, |
| 133 int pixel_y); | 134 int pixel_y); |
| 134 | 135 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 195 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 195 | 196 |
| 196 DISALLOW_COPY_AND_ASSIGN(VrShell); | 197 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 197 }; | 198 }; |
| 198 | 199 |
| 199 bool RegisterVrShell(JNIEnv* env); | 200 bool RegisterVrShell(JNIEnv* env); |
| 200 | 201 |
| 201 } // namespace vr_shell | 202 } // namespace vr_shell |
| 202 | 203 |
| 203 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 204 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |