| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/vr/HMDVRDevice.h" | 5 #include "modules/vr/HMDVRDevice.h" |
| 6 | 6 |
| 7 #include "modules/vr/VRController.h" | 7 #include "modules/vr/VRController.h" |
| 8 #include "modules/vr/VRFieldOfView.h" | 8 #include "modules/vr/VRFieldOfView.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 VREye stringToVREye(const String& whichEye) | 14 VREye stringToVREye(const String& whichEye) |
| 15 { | 15 { |
| 16 if (whichEye == "left") | 16 if (whichEye == "left") |
| 17 return VREyeLeft; | 17 return VREyeLeft; |
| 18 if (whichEye == "right") | 18 if (whichEye == "right") |
| 19 return VREyeRight; | 19 return VREyeRight; |
| 20 return VREyeNone; | 20 return VREyeNone; |
| 21 } | 21 } |
| 22 | 22 |
| 23 } // namepspace | 23 } // namespace |
| 24 | 24 |
| 25 HMDVRDevice::HMDVRDevice(VRHardwareUnit* hardwareUnit, unsigned deviceId) | 25 HMDVRDevice::HMDVRDevice(VRHardwareUnit* hardwareUnit, unsigned deviceId) |
| 26 : VRDevice(hardwareUnit, deviceId) | 26 : VRDevice(hardwareUnit, deviceId) |
| 27 { | 27 { |
| 28 m_eyeParametersLeft = VREyeParameters::create(); | 28 m_eyeParametersLeft = VREyeParameters::create(); |
| 29 m_eyeParametersRight = VREyeParameters::create(); | 29 m_eyeParametersRight = VREyeParameters::create(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void HMDVRDevice::updateFromWebVRDevice(const WebVRDevice& device) | 32 void HMDVRDevice::updateFromWebVRDevice(const WebVRDevice& device) |
| 33 { | 33 { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 58 | 58 |
| 59 DEFINE_TRACE(HMDVRDevice) | 59 DEFINE_TRACE(HMDVRDevice) |
| 60 { | 60 { |
| 61 visitor->trace(m_eyeParametersLeft); | 61 visitor->trace(m_eyeParametersLeft); |
| 62 visitor->trace(m_eyeParametersRight); | 62 visitor->trace(m_eyeParametersRight); |
| 63 | 63 |
| 64 VRDevice::trace(visitor); | 64 VRDevice::trace(visitor); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace blink | 67 } // namespace blink |
| OLD | NEW |