| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 void PostToGlThreadWhenReady(const base::Closure& task); | 195 void PostToGlThreadWhenReady(const base::Closure& task); |
| 196 void SetContentPaused(bool paused); | 196 void SetContentPaused(bool paused); |
| 197 void SetUiState(); | 197 void SetUiState(); |
| 198 | 198 |
| 199 // content::WebContentsObserver implementation. | 199 // content::WebContentsObserver implementation. |
| 200 void RenderViewHostChanged(content::RenderViewHost* old_host, | 200 void RenderViewHostChanged(content::RenderViewHost* old_host, |
| 201 content::RenderViewHost* new_host) override; | 201 content::RenderViewHost* new_host) override; |
| 202 void MainFrameWasResized(bool width_changed) override; | 202 void MainFrameWasResized(bool width_changed) override; |
| 203 void WebContentsDestroyed() override; | 203 void WebContentsDestroyed() override; |
| 204 | 204 |
| 205 // device::GvrDelegate implementation | 205 // device::GvrDelegate implementation. |
| 206 void SetWebVRSecureOrigin(bool secure_origin) override; | 206 void SetWebVRSecureOrigin(bool secure_origin) override; |
| 207 void SubmitWebVRFrame(int16_t frame_index, | 207 void SubmitWebVRFrame(int16_t frame_index, |
| 208 const gpu::MailboxHolder& mailbox) override; | 208 const gpu::MailboxHolder& mailbox) override; |
| 209 void UpdateWebVRTextureBounds(int16_t frame_index, | 209 void UpdateWebVRTextureBounds(int16_t frame_index, |
| 210 const gvr::Rectf& left_bounds, | 210 const gvr::Rectf& left_bounds, |
| 211 const gvr::Rectf& right_bounds, | 211 const gvr::Rectf& right_bounds, |
| 212 const gvr::Sizei& source_size) override; | 212 const gvr::Sizei& source_size) override; |
| 213 void OnVRVsyncProviderRequest( | 213 void OnVRVsyncProviderRequest( |
| 214 device::mojom::VRVSyncProviderRequest request) override; | 214 device::mojom::VRVSyncProviderRequest request) override; |
| 215 void UpdateVSyncInterval(int64_t timebase_nanos, | 215 void UpdateVSyncInterval(int64_t timebase_nanos, |
| 216 double interval_seconds) override; | 216 double interval_seconds) override; |
| 217 void ResetPose() override; | 217 void ResetPose() override; |
| 218 void CreateVRDisplayInfo( | 218 void CreateVRDisplayInfo( |
| 219 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, | 219 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, |
| 220 uint32_t device_id) override; | 220 uint32_t device_id) override; |
| 221 | 221 |
| 222 // device::PresentingGvrDelegate implementation. |
| 223 void SetSubmitClient( |
| 224 device::mojom::VRSubmitFrameClientPtr submit_client) override; |
| 225 |
| 222 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito); | 226 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito); |
| 223 | 227 |
| 224 bool vr_shell_enabled_; | 228 bool vr_shell_enabled_; |
| 225 | 229 |
| 226 std::unique_ptr<UiInterface> html_interface_; | 230 std::unique_ptr<UiInterface> html_interface_; |
| 227 bool content_paused_ = false; | 231 bool content_paused_ = false; |
| 228 bool webvr_mode_ = false; | 232 bool webvr_mode_ = false; |
| 229 | 233 |
| 230 content::WebContents* main_contents_ = nullptr; | 234 content::WebContents* main_contents_ = nullptr; |
| 231 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; | 235 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 267 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 264 | 268 |
| 265 DISALLOW_COPY_AND_ASSIGN(VrShell); | 269 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 266 }; | 270 }; |
| 267 | 271 |
| 268 bool RegisterVrShell(JNIEnv* env); | 272 bool RegisterVrShell(JNIEnv* env); |
| 269 | 273 |
| 270 } // namespace vr_shell | 274 } // namespace vr_shell |
| 271 | 275 |
| 272 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 276 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |