| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 230 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 231 std::unique_ptr<VrGLThread> gl_thread_; | 231 std::unique_ptr<VrGLThread> gl_thread_; |
| 232 bool thread_started_ = false; | 232 bool thread_started_ = false; |
| 233 UiInterface* ui_; | 233 UiInterface* ui_; |
| 234 bool reprojected_rendering_; | 234 bool reprojected_rendering_; |
| 235 | 235 |
| 236 jobject content_surface_ = nullptr; | 236 jobject content_surface_ = nullptr; |
| 237 bool taken_surface_ = false; | 237 bool taken_surface_ = false; |
| 238 base::CancelableClosure poll_capturing_media_task_; | 238 base::CancelableClosure poll_capturing_media_task_; |
| 239 bool is_capturing_audio_ = false; |
| 240 bool is_capturing_video_ = false; |
| 241 bool is_capturing_screen_ = false; |
| 239 | 242 |
| 240 // TODO(mthiesse): Remove the need for this to be stored here. | 243 // TODO(mthiesse): Remove the need for this to be stored here. |
| 241 // crbug.com/674594 | 244 // crbug.com/674594 |
| 242 gvr_context* gvr_api_; | 245 gvr_context* gvr_api_; |
| 243 | 246 |
| 244 // Are we currently providing a gamepad factory to the gamepad manager? | 247 // Are we currently providing a gamepad factory to the gamepad manager? |
| 245 bool gvr_gamepad_source_active_ = false; | 248 bool gvr_gamepad_source_active_ = false; |
| 246 bool cardboard_gamepad_source_active_ = false; | 249 bool cardboard_gamepad_source_active_ = false; |
| 247 | 250 |
| 248 // Registered fetchers, must remain alive for UpdateGamepadData calls. | 251 // Registered fetchers, must remain alive for UpdateGamepadData calls. |
| 249 // That's ok since the fetcher is only destroyed from VrShell's destructor. | 252 // That's ok since the fetcher is only destroyed from VrShell's destructor. |
| 250 device::GvrGamepadDataFetcher* gvr_gamepad_data_fetcher_ = nullptr; | 253 device::GvrGamepadDataFetcher* gvr_gamepad_data_fetcher_ = nullptr; |
| 251 device::CardboardGamepadDataFetcher* cardboard_gamepad_data_fetcher_ = | 254 device::CardboardGamepadDataFetcher* cardboard_gamepad_data_fetcher_ = |
| 252 nullptr; | 255 nullptr; |
| 253 int64_t cardboard_gamepad_timer_ = 0; | 256 int64_t cardboard_gamepad_timer_ = 0; |
| 254 | 257 |
| 255 base::WeakPtrFactory<VrShell> weak_ptr_factory_; | 258 base::WeakPtrFactory<VrShell> weak_ptr_factory_; |
| 256 | 259 |
| 257 DISALLOW_COPY_AND_ASSIGN(VrShell); | 260 DISALLOW_COPY_AND_ASSIGN(VrShell); |
| 258 }; | 261 }; |
| 259 | 262 |
| 260 bool RegisterVrShell(JNIEnv* env); | 263 bool RegisterVrShell(JNIEnv* env); |
| 261 | 264 |
| 262 } // namespace vr_shell | 265 } // namespace vr_shell |
| 263 | 266 |
| 264 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ | 267 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ |
| OLD | NEW |