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

Unified Diff: device/vr/vr_service_impl.h

Issue 2167643003: Refactored VRService interaction and added VRServiceClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Liberal sprinkling of 'u's Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/vr_service.mojom ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_service_impl.h
diff --git a/device/vr/vr_service_impl.h b/device/vr/vr_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c31abe0ad472c5445f7977de9f3b76d0125370ad
--- /dev/null
+++ b/device/vr/vr_service_impl.h
@@ -0,0 +1,50 @@
+// 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_SERVICE_IMPL_H
+#define DEVICE_VR_VR_SERVICE_IMPL_H
+
+#include <memory>
+
+#include "base/macros.h"
+
+#include "device/vr/vr_export.h"
+#include "device/vr/vr_service.mojom.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace device {
+
+class VRServiceImpl : public VRService {
+ public:
+ DEVICE_VR_EXPORT ~VRServiceImpl() override;
+
+ DEVICE_VR_EXPORT static void BindRequest(
+ mojo::InterfaceRequest<VRService> request);
+
+ VRServiceClientPtr& client() { return client_; }
+
+ private:
+ friend class VRServiceTestBinding;
+
+ DEVICE_VR_EXPORT VRServiceImpl();
+
+ // Mojo connection handling.
+ DEVICE_VR_EXPORT void Bind(mojo::InterfaceRequest<VRService> request);
+ void RemoveFromDeviceManager();
+
+ // mojom::VRService implementation
+ void SetClient(VRServiceClientPtr client) override;
+ void GetDisplays(const GetDisplaysCallback& callback) override;
+ void GetPose(uint32_t index, const GetPoseCallback& callback) override;
+ void ResetPose(uint32_t index) override;
+
+ std::unique_ptr<mojo::Binding<VRService>> binding_;
+ VRServiceClientPtr client_;
+
+ DISALLOW_COPY_AND_ASSIGN(VRServiceImpl);
+};
+
+} // namespace device
+
+#endif // DEVICE_VR_VR_SERVICE_IMPL_H
« no previous file with comments | « device/vr/vr_service.mojom ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698