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

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: cleanup 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
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 2f781840b22c73e792e9c492db89917189007744..52358a87200217879fe85ffb3b1c40d95959f997 100644
--- a/chrome/browser/android/vr_shell/vr_shell.h
+++ b/chrome/browser/android/vr_shell/vr_shell.h
@@ -124,7 +124,12 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
void ForceExitVr();
+ // 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;
@@ -143,13 +148,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_;
@@ -171,6 +178,9 @@ class VrShell : public device::GvrDelegate, content::WebContentsObserver {
std::unique_ptr<VrGLThread> gl_thread_;
bool reprojected_rendering_;
+ // TODO(mthiesse): Remove the need for this to stored here. crbug.com/674594
cjgrant 2017/01/25 21:45:31 s/to/to be/
mthiesse 2017/01/30 19:47:26 Done.
+ gvr_context* gvr_api_;
cjgrant 2017/01/25 21:45:31 Could we convince the GVR team to typedef this to
mthiesse 2017/01/30 19:47:26 Be my guest ;)
+
base::WeakPtrFactory<VrShell> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(VrShell);

Powered by Google App Engine
This is Rietveld 408576698