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

Unified Diff: content/browser/vr/vr_service_impl.h

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated to use Mojo as requested by eng review Created 5 years, 7 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
Index: content/browser/vr/vr_service_impl.h
diff --git a/content/browser/vr/vr_service_impl.h b/content/browser/vr/vr_service_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..b42256f410cb3e73b168d314c0d18853135a1b31
--- /dev/null
+++ b/content/browser/vr/vr_service_impl.h
@@ -0,0 +1,43 @@
+// Copyright 2015 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 CONTENT_BROWSER_VR_VR_SERVICE_IMPL_H_
+#define CONTENT_BROWSER_VR_VR_SERVICE_IMPL_H_
+
+#include <vector>
+#include "base/compiler_specific.h"
+#include "content/browser/vr/vr_device_manager.h"
+#include "content/common/vr_service.mojom.h"
+
+namespace content {
+
+class VRDeviceManager;
+
+class VRServiceImpl : public mojo::InterfaceImpl<VRService> {
Ken Rockot(use gerrit already) 2015/05/31 23:43:47 InterfaceImpl is deprecated, so please don't use i
+ public:
+ static void Create(mojo::InterfaceRequest<VRService> request);
+
+ protected:
+ VRServiceImpl();
+ ~VRServiceImpl() override;
+
+ private:
+ // Returns the VRDeviceManager singleton.
+ VRDeviceManager* GetDeviceManager();
+
+ void GetDevices(const GetDevicesCallback& callback) override;
+
+ void GetSensorState(uint32_t index,
+ const GetSensorStateCallback& callback) override;
+
+ void ResetSensor(uint32_t index) override;
+
+ bool registered_with_device_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(VRServiceImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_VR_VR_SERVICE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698