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

Unified Diff: device/vr/vr_display_impl.h

Issue 2494733002: Reland of mojo VR interface simpified. (Closed)
Patch Set: Fix Werror 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_display_impl.h
diff --git a/device/vr/vr_display_impl.h b/device/vr/vr_display_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc34ed1753445c8ab13390bbce628665d48f7d8e
--- /dev/null
+++ b/device/vr/vr_display_impl.h
@@ -0,0 +1,47 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_VR_VR_DISPLAY_IMPL_H
+#define DEVICE_VR_VR_DISPLAY_IMPL_H
+
+#include <memory>
+
+#include "base/macros.h"
+
+#include "device/vr/vr_device.h"
+#include "device/vr/vr_export.h"
+#include "device/vr/vr_service.mojom.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace device {
+
+class VRDisplayImpl : public mojom::VRDisplay {
+ public:
+ VRDisplayImpl(device::VRDevice* device, VRServiceImpl* service);
+ ~VRDisplayImpl() override;
+
+ mojom::VRDisplayClient* client() { return client_.get(); }
+
+ private:
+ friend class VRServiceImpl;
+
+ void GetPose(const GetPoseCallback& callback) override;
+ void ResetPose() override;
+
+ void RequestPresent(bool secureOrigin,
+ const RequestPresentCallback& callback) override;
+ void ExitPresent() override;
+ void SubmitFrame(mojom::VRPosePtr pose) override;
+ void UpdateLayerBounds(mojom::VRLayerBoundsPtr leftBounds,
+ mojom::VRLayerBoundsPtr rightBounds) override;
+
+ mojo::Binding<mojom::VRDisplay> binding_;
+ mojom::VRDisplayClientPtr client_;
+ device::VRDevice* device_;
+ std::unique_ptr<VRServiceImpl> service_;
+};
+
+} // namespace device
+
+#endif // DEVICE_VR_VR_DISPLAY_IMPL_H
« 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