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

Unified Diff: device/vr/android/gvr/gvr_delegate.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_shell_gl.cc ('k') | device/vr/android/gvr/gvr_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_delegate.h
diff --git a/device/vr/android/gvr/gvr_delegate.h b/device/vr/android/gvr/gvr_delegate.h
index 57d4d87da707b4c412ca41b0d6975bbc921223e2..2e75a978b51ef62a3c6482bcb00e568225d4e78d 100644
--- a/device/vr/android/gvr/gvr_delegate.h
+++ b/device/vr/android/gvr/gvr_delegate.h
@@ -10,10 +10,6 @@
#include "device/vr/vr_service.mojom.h"
#include "third_party/gvr-android-sdk/src/libraries/headers/vr/gvr/capi/include/gvr_types.h"
-namespace gvr {
-class GvrApi;
-} // namespace gvr
-
namespace device {
constexpr gvr::Sizei kInvalidRenderTargetSize = {0, 0};
@@ -25,14 +21,15 @@ class DEVICE_VR_EXPORT GvrDelegate {
virtual void UpdateWebVRTextureBounds(int16_t frame_index,
const gvr::Rectf& left_bounds,
const gvr::Rectf& right_bounds) = 0;
- virtual gvr::Sizei GetWebVRCompositorSurfaceSize() = 0;
- virtual void SetWebVRRenderSurfaceSize(int width, int height) = 0;
- // TODO(mthiesse): This function is not threadsafe. crbug.com/674594
- virtual gvr::GvrApi* gvr_api() = 0;
virtual void OnVRVsyncProviderRequest(
mojom::VRVSyncProviderRequest request) = 0;
virtual void UpdateVSyncInterval(long timebase_nanos,
double interval_seconds) = 0;
+ virtual bool SupportsPresentation() = 0;
+ virtual void ResetPose() = 0;
+ virtual void CreateVRDisplayInfo(
+ const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback,
+ uint32_t device_id) = 0;
protected:
virtual ~GvrDelegate() {}
@@ -44,11 +41,11 @@ class DEVICE_VR_EXPORT GvrDelegateProvider {
static GvrDelegateProvider* GetInstance();
virtual void SetDeviceProvider(GvrDeviceProvider* device_provider) = 0;
+ virtual void ClearDeviceProvider() = 0;
virtual void RequestWebVRPresent(
const base::Callback<void(bool)>& callback) = 0;
virtual void ExitWebVRPresent() = 0;
- virtual GvrDelegate* GetNonPresentingDelegate() = 0;
- virtual void DestroyNonPresentingDelegate() = 0;
+ virtual GvrDelegate* GetDelegate() = 0;
virtual void SetListeningForActivate(bool listening) = 0;
protected:
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | device/vr/android/gvr/gvr_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698