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

Side by Side Diff: device/vr/android/gvr/gvr_device.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 unified diff | Download patch
« no previous file with comments | « device/vr/android/gvr/gvr_delegate.cc ('k') | device/vr/android/gvr/gvr_device.cc » ('j') | 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_DEVICE_H 5 #ifndef DEVICE_VR_ANDROID_GVR_DEVICE_H
6 #define DEVICE_VR_ANDROID_GVR_DEVICE_H 6 #define DEVICE_VR_ANDROID_GVR_DEVICE_H
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "device/vr/vr_device.h" 9 #include "device/vr/vr_device.h"
10 10
11 namespace gvr {
12 class GvrApi;
13 } // namespace gvr
14
11 namespace device { 15 namespace device {
12 16
17 class GvrDeviceProvider;
13 class GvrDelegate; 18 class GvrDelegate;
14 19
15 class GvrDevice : public VRDevice { 20 class GvrDevice : public VRDevice {
16 public: 21 public:
17 GvrDevice(VRDeviceProvider* provider, GvrDelegate* delegate); 22 GvrDevice(GvrDeviceProvider* provider, GvrDelegate* delegate);
18 ~GvrDevice() override; 23 ~GvrDevice() override;
19 24
20 // VRDevice 25 // VRDevice
21 VRDisplayPtr GetVRDevice() override; 26 VRDisplayPtr GetVRDevice() override;
22 VRPosePtr GetPose() override; 27 VRPosePtr GetPose() override;
23 void ResetPose() override; 28 void ResetPose() override;
24 29
25 bool RequestPresent() override; 30 bool RequestPresent() override;
26 void ExitPresent() override; 31 void ExitPresent() override;
27 32
28 void SubmitFrame(VRPosePtr pose) override; 33 void SubmitFrame(VRPosePtr pose) override;
29 void UpdateLayerBounds(VRLayerBoundsPtr leftBounds, 34 void UpdateLayerBounds(VRLayerBoundsPtr leftBounds,
30 VRLayerBoundsPtr rightBounds) override; 35 VRLayerBoundsPtr rightBounds) override;
31 36
37 void SetDelegate(GvrDelegate* delegate);
38
32 private: 39 private:
40 gvr::GvrApi* GetGvrApi();
41
33 GvrDelegate* delegate_; 42 GvrDelegate* delegate_;
43 GvrDeviceProvider* gvr_provider_;
34 44
35 DISALLOW_COPY_AND_ASSIGN(GvrDevice); 45 DISALLOW_COPY_AND_ASSIGN(GvrDevice);
36 }; 46 };
37 47
38 } // namespace device 48 } // namespace device
39 49
40 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H 50 #endif // DEVICE_VR_ANDROID_GVR_DEVICE_H
OLDNEW
« no previous file with comments | « device/vr/android/gvr/gvr_delegate.cc ('k') | device/vr/android/gvr/gvr_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698