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

Unified Diff: device/vr/android/gvr/gvr_device_provider.h

Issue 2343023002: Switch WebVR to handle GvrApi management through VrShellDelegate (Closed)
Patch Set: Renamed onNativeLibraryReady to initializeNative Created 4 years, 3 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_device.cc ('k') | device/vr/android/gvr/gvr_device_provider.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_provider.h
diff --git a/device/vr/android/gvr/gvr_device_provider.h b/device/vr/android/gvr/gvr_device_provider.h
index 4c6c9495f8350d4cd0952a909210a14ab476d6f6..bffbf2350a319c80cd2e00042b882d5b9f46f1ce 100644
--- a/device/vr/android/gvr/gvr_device_provider.h
+++ b/device/vr/android/gvr/gvr_device_provider.h
@@ -8,16 +8,19 @@
#include <memory>
#include "base/macros.h"
-#include "device/vr/android/gvr/gvr_delegate.h"
+#include "base/single_thread_task_runner.h"
#include "device/vr/vr_client_dispatcher.h"
#include "device/vr/vr_device.h"
#include "device/vr/vr_device_provider.h"
+#include "device/vr/vr_export.h"
namespace device {
-class GvrDeviceProviderDelegate;
+class GvrDelegate;
+class GvrDevice;
+class GvrNonPresentingDelegate;
-class GvrDeviceProvider : public VRDeviceProvider, public GvrDelegateClient {
+class DEVICE_VR_EXPORT GvrDeviceProvider : public VRDeviceProvider {
public:
GvrDeviceProvider();
~GvrDeviceProvider() override;
@@ -25,16 +28,25 @@ class GvrDeviceProvider : public VRDeviceProvider, public GvrDelegateClient {
void GetDevices(std::vector<VRDevice*>* devices) override;
void Initialize() override;
- // GvrDelegateClient
- void OnDelegateInitialized(GvrDelegate* delegate) override;
- void OnDelegateShutdown() override;
+ // Called from GvrDevice
+ bool RequestPresent();
+ void ExitPresent();
+
+ // Called from GvrDelegate
+ void OnGvrDelegateReady(GvrDelegate* delegate);
+ void OnGvrDelegateRemoved();
void SetClient(VRClientDispatcher* client) override;
private:
+ void GvrDelegateReady(GvrDelegate* delegate);
+ void GvrDelegateRemoved();
+
std::unique_ptr<VRClientDispatcher> client_;
- std::unique_ptr<VRDevice> vr_device_;
- std::unique_ptr<GvrDeviceProviderDelegate> delegate_;
+ std::unique_ptr<GvrDevice> vr_device_;
+ std::unique_ptr<GvrNonPresentingDelegate> non_presenting_delegate_;
+
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
DISALLOW_COPY_AND_ASSIGN(GvrDeviceProvider);
};
« no previous file with comments | « device/vr/android/gvr/gvr_device.cc ('k') | device/vr/android/gvr/gvr_device_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698