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

Unified Diff: chrome/browser/android/vr_shell/vr_shell.h

Issue 2658643003: Refactor GvrDelegate ownership into GvrDelegateProvider and fix more threading violations. (Closed)
Patch Set: Address comments Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.h ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.h
diff --git a/chrome/browser/android/vr_shell/vr_shell.h b/chrome/browser/android/vr_shell/vr_shell.h
index d979adfb918c776e55bee2f4ff9ddd98eb35b4b0..e69f3b6860d5810a8649f003bc259d66cd36c169 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -134,7 +134,12 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
void ProcessUIGesture(std::unique_ptr<blink::WebInputEvent> event);
void ProcessContentGesture(std::unique_ptr<blink::WebInputEvent> event);
+ // TODO(mthiesse): Find a better place for these functions to live.
static device::mojom::VRPosePtr VRPosePtrFromGvrPose(gvr::Mat4f head_mat);
+ static device::mojom::VRDisplayInfoPtr CreateVRDisplayInfo(
+ gvr::GvrApi* gvr_api,
+ gvr::Sizei compositor_size,
+ uint32_t device_id);
private:
~VrShell() override;
@@ -152,13 +157,15 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
void UpdateWebVRTextureBounds(int16_t frame_index,
const gvr::Rectf& left_bounds,
const gvr::Rectf& right_bounds) override;
- gvr::GvrApi* gvr_api() override;
- void SetWebVRRenderSurfaceSize(int width, int height) override;
- gvr::Sizei GetWebVRCompositorSurfaceSize() override;
void OnVRVsyncProviderRequest(
device::mojom::VRVSyncProviderRequest request) override;
void UpdateVSyncInterval(long timebase_nanos,
double interval_seconds) override;
+ bool SupportsPresentation() override;
+ void ResetPose() override;
+ void CreateVRDisplayInfo(
+ const base::Callback<void(device::mojom::VRDisplayInfoPtr)>& callback,
+ uint32_t device_id) override;
std::unique_ptr<UiInterface> html_interface_;
@@ -180,6 +187,10 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
std::unique_ptr<VrGLThread> gl_thread_;
bool reprojected_rendering_;
+ // TODO(mthiesse): Remove the need for this to be stored here.
+ // crbug.com/674594
+ gvr_context* gvr_api_;
+
base::WeakPtrFactory<VrShell> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(VrShell);
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.h ('k') | chrome/browser/android/vr_shell/vr_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698