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

Side by Side Diff: device/vr/vr_display_impl.h

Issue 2453973002: WIP WebVR mojo refactor (Closed)
Patch Set: Fixed crash. VR data doesn't seem to be polling correctly, though. Created 4 years, 1 month 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/vr_device_provider.h ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_VR_VR_DEVICE_SERVICE_IMPL_H
6 #define DEVICE_VR_VR_DEVICE_SERVICE_IMPL_H
7
8 #include <memory>
9
10 #include "base/macros.h"
11
12 #include "device/vr/vr_device.h"
13 #include "device/vr/vr_export.h"
14 #include "device/vr/vr_service.mojom.h"
15 #include "mojo/public/cpp/bindings/binding.h"
16
17 namespace device {
18
19 class VRDisplayImpl : public mojom::VRDisplay {
20 public:
21 VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service);
22 ~VRDisplayImpl() override;
23
24 mojom::VRDisplayClient* client() { return client_.get(); }
25
26 private:
27 friend class VRServiceImpl;
28
29 // mojom::VRDisplay implementation
30 void SetClient(mojom::VRDisplayClientPtr client) override;
31
32 void GetPose(const GetPoseCallback& callback) override;
33 void ResetPose() override;
34
35 void RequestPresent(bool secureOrigin,
36 const RequestPresentCallback& callback) override;
37 void ExitPresent() override;
38 void SubmitFrame(mojom::VRPosePtr pose) override;
39 void UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds,
40 mojom::VRLayerBoundsPtr rightBounds) override;
41
42 mojo::Binding<mojom::VRDisplay> binding_;
43 mojom::VRDisplayClientPtr client_;
44 device::VRDevice* device_;
45 std::unique_ptr<VRServiceImpl> service_;
46 };
47
48 } // namespace device
49
50 #endif // DEVICE_VR_VR_DEVICE_SERVICE_IMPL_H
OLDNEW
« no previous file with comments | « device/vr/vr_device_provider.h ('k') | device/vr/vr_display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698