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

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

Issue 2420743003: mojo VR interface simplified (Closed)
Patch Set: address leon@ comments about name 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
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 VRDeviceClientImpl : public mojom::VRDevice {
20 public:
21 VRDeviceClientImpl(mojo::InterfaceRequest<mojom::VRDevice> request,
22 device::VRDevice* device,
23 VRServiceImpl* service);
24
25 private:
26 friend class VRServiceImpl;
27
28 void GetPose(const GetPoseCallback& callback) override;
29 void ResetPose() override;
30
31 void RequestPresent(bool secureOrigin,
32 const RequestPresentCallback& callback) override;
33 void ExitPresent() override;
34 void SubmitFrame(mojom::VRPosePtr pose) override;
35 void UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds,
36 mojom::VRLayerBoundsPtr rightBounds) override;
37
38 mojo::Binding<mojom::VRDevice> binding_;
39 std::unique_ptr<device::VRDevice> device_;
40 std::unique_ptr<VRServiceImpl> service_;
41 };
42
43 } // namespace device
44
45 #endif // DEVICE_VR_VR_DEVICE_SERVICE_IMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698