OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CONTENT_BROWSER_VR_VR_DEVICE_H |
| 6 #define CONTENT_BROWSER_VR_VR_DEVICE_H |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 namespace blink { |
| 11 struct WebHMDSensorState; |
| 12 struct WebVRFieldOfView; |
| 13 class WebVRDevice; |
| 14 struct WebVRVector4; |
| 15 } |
| 16 |
| 17 namespace ui { |
| 18 class BaseWindow; |
| 19 } |
| 20 |
| 21 namespace content { |
| 22 |
| 23 class VRDeviceProvider; |
| 24 |
| 25 const unsigned int VR_DEVICE_LAST_ID = 0xFFFFFFFF; |
| 26 |
| 27 class VRDevice { |
| 28 public: |
| 29 explicit VRDevice(VRDeviceProvider* provider); |
| 30 virtual ~VRDevice(); |
| 31 |
| 32 VRDeviceProvider* provider() const { return provider_; } |
| 33 unsigned int id() const { return id_; } |
| 34 |
| 35 virtual void GetVRDevice(blink::WebVRDevice* device) = 0; |
| 36 virtual void GetSensorState(blink::WebHMDSensorState* state) = 0; |
| 37 virtual void ResetSensor() = 0; |
| 38 |
| 39 private: |
| 40 VRDeviceProvider* provider_; |
| 41 unsigned int id_; |
| 42 |
| 43 static unsigned int next_id_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(VRDevice); |
| 46 }; |
| 47 |
| 48 } // namespace content |
| 49 |
| 50 #endif // CONTENT_BROWSER_VR_VR_DEVICE_H |
OLD | NEW |