Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2878893003: VR: Poll media access flags (Closed)
Patch Set: VR: Poll media access flags Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 void CreateVRDisplayInfo( 174 void CreateVRDisplayInfo(
175 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 175 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
176 uint32_t device_id) override; 176 uint32_t device_id) override;
177 177
178 // device::PresentingGvrDelegate implementation. 178 // device::PresentingGvrDelegate implementation.
179 void SetSubmitClient( 179 void SetSubmitClient(
180 device::mojom::VRSubmitFrameClientPtr submit_client) override; 180 device::mojom::VRSubmitFrameClientPtr submit_client) override;
181 181
182 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito); 182 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito);
183 183
184 void PollMediaAccessFlag();
185
184 bool vr_shell_enabled_; 186 bool vr_shell_enabled_;
185 187
186 std::unique_ptr<UiInterface> ui_; 188 std::unique_ptr<UiInterface> ui_;
187 bool content_paused_ = false; 189 bool content_paused_ = false;
188 bool webvr_mode_ = false; 190 bool webvr_mode_ = false;
189 191
190 content::WebContents* web_contents_ = nullptr; 192 content::WebContents* web_contents_ = nullptr;
191 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; 193 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_;
192 ui::WindowAndroid* window_; 194 ui::WindowAndroid* window_;
193 std::unique_ptr<VrCompositor> compositor_; 195 std::unique_ptr<VrCompositor> compositor_;
194 196
195 std::unique_ptr<VrWebContentsObserver> vr_web_contents_observer_; 197 std::unique_ptr<VrWebContentsObserver> vr_web_contents_observer_;
196 198
197 VrShellDelegate* delegate_provider_ = nullptr; 199 VrShellDelegate* delegate_provider_ = nullptr;
198 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_; 200 base::android::ScopedJavaGlobalRef<jobject> j_vr_shell_;
199 201
200 std::unique_ptr<VrInputManager> input_manager_; 202 std::unique_ptr<VrInputManager> input_manager_;
201 std::unique_ptr<AndroidUiGestureTarget> android_ui_gesture_target_; 203 std::unique_ptr<AndroidUiGestureTarget> android_ui_gesture_target_;
202 std::unique_ptr<VrMetricsHelper> metrics_helper_; 204 std::unique_ptr<VrMetricsHelper> metrics_helper_;
203 205
204 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 206 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
205 std::unique_ptr<VrGLThread> gl_thread_; 207 std::unique_ptr<VrGLThread> gl_thread_;
206 bool reprojected_rendering_; 208 bool reprojected_rendering_;
207 209
208 jobject content_surface_ = nullptr; 210 jobject content_surface_ = nullptr;
211 bool is_capturing_audio_ = false;
212 bool is_capturing_video_ = false;
213 bool is_capturing_screen_ = false;
209 214
210 // TODO(mthiesse): Remove the need for this to be stored here. 215 // TODO(mthiesse): Remove the need for this to be stored here.
211 // crbug.com/674594 216 // crbug.com/674594
212 gvr_context* gvr_api_; 217 gvr_context* gvr_api_;
213 218
214 // Are we currently providing a gamepad factory to the gamepad manager? 219 // Are we currently providing a gamepad factory to the gamepad manager?
215 bool gamepad_source_active_ = false; 220 bool gamepad_source_active_ = false;
216 // Registered fetcher, must remain alive for UpdateGamepadData calls. 221 // Registered fetcher, must remain alive for UpdateGamepadData calls.
217 // That's ok since the fetcher is only destroyed from VrShell's destructor. 222 // That's ok since the fetcher is only destroyed from VrShell's destructor.
218 device::GvrGamepadDataFetcher* gamepad_data_fetcher_ = nullptr; 223 device::GvrGamepadDataFetcher* gamepad_data_fetcher_ = nullptr;
219 224
220 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 225 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
221 226
222 DISALLOW_COPY_AND_ASSIGN(VrShell); 227 DISALLOW_COPY_AND_ASSIGN(VrShell);
223 }; 228 };
224 229
225 bool RegisterVrShell(JNIEnv* env); 230 bool RegisterVrShell(JNIEnv* env);
226 231
227 } // namespace vr_shell 232 } // namespace vr_shell
228 233
229 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 234 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | chrome/browser/android/vr_shell/vr_shell.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698