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

Unified Diff: device/vr/android/gvr/gvr_device.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 | « device/vr/android/gvr/gvr_delegate.h ('k') | device/vr/android/gvr/gvr_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/android/gvr/gvr_device.h
diff --git a/device/vr/android/gvr/gvr_device.h b/device/vr/android/gvr/gvr_device.h
index 8ca44fa9494dd41e822a38267cef7c60b2fd6de7..55fb95f3b5babad5ebcf1c519d66ab7bd55c4017 100644
--- a/device/vr/android/gvr/gvr_device.h
+++ b/device/vr/android/gvr/gvr_device.h
@@ -8,22 +8,19 @@
#include "base/macros.h"
#include "device/vr/vr_device.h"
-namespace gvr {
-class GvrApi;
-} // namespace gvr
-
namespace device {
class GvrDeviceProvider;
class GvrDelegate;
-class GvrDevice : public VRDevice {
+class DEVICE_VR_EXPORT GvrDevice : public VRDevice {
public:
- GvrDevice(GvrDeviceProvider* provider, GvrDelegate* delegate);
+ GvrDevice(GvrDeviceProvider* provider);
~GvrDevice() override;
// VRDevice
- mojom::VRDisplayInfoPtr GetVRDevice() override;
+ void GetVRDevice(
+ const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback) override;
void ResetPose() override;
void RequestPresent(const base::Callback<void(bool)>& callback) override;
@@ -35,13 +32,11 @@ class GvrDevice : public VRDevice {
mojom::VRLayerBoundsPtr left_bounds,
mojom::VRLayerBoundsPtr right_bounds) override;
void GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) override;
-
- void SetDelegate(GvrDelegate* delegate);
+ void OnDelegateChanged();
private:
- gvr::GvrApi* GetGvrApi();
+ GvrDelegate* GetGvrDelegate();
- GvrDelegate* delegate_;
GvrDeviceProvider* gvr_provider_;
bool secure_origin_ = false;
« no previous file with comments | « device/vr/android/gvr/gvr_delegate.h ('k') | device/vr/android/gvr/gvr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698