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

Side by Side Diff: device/vr/android/gvr/gvr_delegate.h

Issue 2774933003: Fixes WebVR presentation from within VRShell. (Closed)
Patch Set: Rebased on ToT, nits Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H 5 #ifndef DEVICE_VR_ANDROID_GVR_DELEGATE_H
6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H 6 #define DEVICE_VR_ANDROID_GVR_DELEGATE_H
7 7
8 #include "device/vr/android/gvr/gvr_device_provider.h" 8 #include "device/vr/android/gvr/gvr_device_provider.h"
9 #include "device/vr/vr_export.h" 9 #include "device/vr/vr_export.h"
10 #include "device/vr/vr_service.mojom.h" 10 #include "device/vr/vr_service.mojom.h"
(...skipping 17 matching lines...) Expand all
28 virtual void ResetPose() = 0; 28 virtual void ResetPose() = 0;
29 virtual void CreateVRDisplayInfo( 29 virtual void CreateVRDisplayInfo(
30 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback, 30 const base::Callback<void(mojom::VRDisplayInfoPtr)>& callback,
31 uint32_t device_id) = 0; 31 uint32_t device_id) = 0;
32 32
33 protected: 33 protected:
34 virtual ~GvrDelegate() {} 34 virtual ~GvrDelegate() {}
35 }; 35 };
36 36
37 // GvrDelegate, which allows WebVR presentation. 37 // GvrDelegate, which allows WebVR presentation.
38 class DEVICE_VR_EXPORT PresentingGvrDelegate : public GvrDelegate {}; 38 class DEVICE_VR_EXPORT PresentingGvrDelegate : public GvrDelegate {
39 public:
40 virtual void SetSubmitClient(
41 device::mojom::VRSubmitFrameClientPtr submit_client) = 0;
42 };
39 43
40 class DEVICE_VR_EXPORT GvrDelegateProvider { 44 class DEVICE_VR_EXPORT GvrDelegateProvider {
41 public: 45 public:
42 static void SetInstance( 46 static void SetInstance(
43 const base::Callback<GvrDelegateProvider*()>& provider_callback); 47 const base::Callback<GvrDelegateProvider*()>& provider_callback);
44 static GvrDelegateProvider* GetInstance(); 48 static GvrDelegateProvider* GetInstance();
45 49
46 virtual void SetDeviceProvider(GvrDeviceProvider* device_provider) = 0; 50 virtual void SetDeviceProvider(GvrDeviceProvider* device_provider) = 0;
47 virtual void ClearDeviceProvider() = 0; 51 virtual void ClearDeviceProvider() = 0;
48 virtual void RequestWebVRPresent( 52 virtual void RequestWebVRPresent(
49 mojom::VRSubmitFrameClientPtr submit_client, 53 mojom::VRSubmitFrameClientPtr submit_client,
50 const base::Callback<void(bool)>& callback) = 0; 54 const base::Callback<void(bool)>& callback) = 0;
51 virtual void ExitWebVRPresent() = 0; 55 virtual void ExitWebVRPresent() = 0;
52 virtual GvrDelegate* GetDelegate() = 0; 56 virtual GvrDelegate* GetDelegate() = 0;
53 virtual void SetListeningForActivate(bool listening) = 0; 57 virtual void SetListeningForActivate(bool listening) = 0;
54 58
55 protected: 59 protected:
56 virtual ~GvrDelegateProvider() {} 60 virtual ~GvrDelegateProvider() {}
57 61
58 private: 62 private:
59 static base::Callback<GvrDelegateProvider*()> delegate_provider_; 63 static base::Callback<GvrDelegateProvider*()> delegate_provider_;
60 }; 64 };
61 65
62 } // namespace device 66 } // namespace device
63 67
64 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H 68 #endif // DEVICE_VR_ANDROID_GVR_DELEGATE_H
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698