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 "config.h" | 5 #include "config.h" |
6 #include "modules/vr/VRHardwareUnit.h" | 6 #include "modules/vr/VRHardwareUnit.h" |
7 | 7 |
8 #include "modules/vr/HMDVRDevice.h" | 8 #include "modules/vr/HMDVRDevice.h" |
9 #include "modules/vr/NavigatorVRDevice.h" | 9 #include "modules/vr/NavigatorVRDevice.h" |
10 #include "modules/vr/PositionSensorVRDevice.h" | 10 #include "modules/vr/PositionSensorVRDevice.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 vrDevices.append(m_positionSensor); | 57 vrDevices.append(m_positionSensor); |
58 } | 58 } |
59 | 59 |
60 VRController* VRHardwareUnit::controller() | 60 VRController* VRHardwareUnit::controller() |
61 { | 61 { |
62 return m_controller; | 62 return m_controller; |
63 } | 63 } |
64 | 64 |
65 VRPositionState* VRHardwareUnit::getSensorState() | 65 VRPositionState* VRHardwareUnit::getSensorState() |
66 { | 66 { |
67 blink::WebHMDSensorState state; | 67 WebHMDSensorState state; |
68 m_controller->getSensorState(m_index, state); | 68 m_controller->getSensorState(m_index, state); |
69 m_positionState->setState(state); | 69 m_positionState->setState(state); |
70 m_frameIndex = state.frameIndex; | 70 m_frameIndex = state.frameIndex; |
71 return m_positionState; | 71 return m_positionState; |
72 } | 72 } |
73 | 73 |
74 DEFINE_TRACE(VRHardwareUnit) | 74 DEFINE_TRACE(VRHardwareUnit) |
75 { | 75 { |
76 visitor->trace(m_controller); | 76 visitor->trace(m_controller); |
77 visitor->trace(m_positionState); | 77 visitor->trace(m_positionState); |
78 visitor->trace(m_hmd); | 78 visitor->trace(m_hmd); |
79 visitor->trace(m_positionSensor); | 79 visitor->trace(m_positionSensor); |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |