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

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

Issue 2774933003: Fixes WebVR presentation from within VRShell. (Closed)
Patch Set: Rebased on ToT, nits Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void PostToGlThreadWhenReady(const base::Closure& task); 197 void PostToGlThreadWhenReady(const base::Closure& task);
198 void SetContentPaused(bool paused); 198 void SetContentPaused(bool paused);
199 void SetUiState(); 199 void SetUiState();
200 200
201 // content::WebContentsObserver implementation. 201 // content::WebContentsObserver implementation.
202 void RenderViewHostChanged(content::RenderViewHost* old_host, 202 void RenderViewHostChanged(content::RenderViewHost* old_host,
203 content::RenderViewHost* new_host) override; 203 content::RenderViewHost* new_host) override;
204 void MainFrameWasResized(bool width_changed) override; 204 void MainFrameWasResized(bool width_changed) override;
205 void WebContentsDestroyed() override; 205 void WebContentsDestroyed() override;
206 206
207 // device::GvrDelegate implementation 207 // device::GvrDelegate implementation.
208 void SetWebVRSecureOrigin(bool secure_origin) override; 208 void SetWebVRSecureOrigin(bool secure_origin) override;
209 void SubmitWebVRFrame(int16_t frame_index, 209 void SubmitWebVRFrame(int16_t frame_index,
210 const gpu::MailboxHolder& mailbox) override; 210 const gpu::MailboxHolder& mailbox) override;
211 void UpdateWebVRTextureBounds(int16_t frame_index, 211 void UpdateWebVRTextureBounds(int16_t frame_index,
212 const gvr::Rectf& left_bounds, 212 const gvr::Rectf& left_bounds,
213 const gvr::Rectf& right_bounds, 213 const gvr::Rectf& right_bounds,
214 const gvr::Sizei& source_size) override; 214 const gvr::Sizei& source_size) override;
215 void OnVRVsyncProviderRequest( 215 void OnVRVsyncProviderRequest(
216 device::mojom::VRVSyncProviderRequest request) override; 216 device::mojom::VRVSyncProviderRequest request) override;
217 void UpdateVSyncInterval(int64_t timebase_nanos, 217 void UpdateVSyncInterval(int64_t timebase_nanos,
218 double interval_seconds) override; 218 double interval_seconds) override;
219 void ResetPose() override; 219 void ResetPose() override;
220 void CreateVRDisplayInfo( 220 void CreateVRDisplayInfo(
221 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback, 221 const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
222 uint32_t device_id) override; 222 uint32_t device_id) override;
223 223
224 // device::PresentingGvrDelegate implementation.
225 void SetSubmitClient(
226 device::mojom::VRSubmitFrameClientPtr submit_client) override;
227
224 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito); 228 void ProcessTabArray(JNIEnv* env, jobjectArray tabs, bool incognito);
225 229
226 bool vr_shell_enabled_; 230 bool vr_shell_enabled_;
227 231
228 std::unique_ptr<UiInterface> html_interface_; 232 std::unique_ptr<UiInterface> html_interface_;
229 bool content_paused_ = false; 233 bool content_paused_ = false;
230 bool webvr_mode_ = false; 234 bool webvr_mode_ = false;
231 235
232 content::WebContents* main_contents_ = nullptr; 236 content::WebContents* main_contents_ = nullptr;
233 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_; 237 base::android::ScopedJavaGlobalRef<jobject> j_motion_event_synthesizer_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 base::WeakPtrFactory<VrShell> weak_ptr_factory_; 269 base::WeakPtrFactory<VrShell> weak_ptr_factory_;
266 270
267 DISALLOW_COPY_AND_ASSIGN(VrShell); 271 DISALLOW_COPY_AND_ASSIGN(VrShell);
268 }; 272 };
269 273
270 bool RegisterVrShell(JNIEnv* env); 274 bool RegisterVrShell(JNIEnv* env);
271 275
272 } // namespace vr_shell 276 } // namespace vr_shell
273 277
274 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_VR_SHELL_H_ 278 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698