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

Unified Diff: third_party/WebKit/Source/modules/vr/VRHardwareUnit.cpp

Issue 1398523002: Use NoBaseWillBeGarbageCollectedFinalized for VRController as other LocalFrame supplements in modul… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/modules/vr/VRHardwareUnit.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRHardwareUnit.cpp b/third_party/WebKit/Source/modules/vr/VRHardwareUnit.cpp
index b4d7c78875286f960ad9fb27f40ca34658a1db93..f4633322d369e6e24924a500fa01266cd83c7fdf 100644
--- a/third_party/WebKit/Source/modules/vr/VRHardwareUnit.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRHardwareUnit.cpp
@@ -14,10 +14,10 @@
namespace blink {
-VRHardwareUnit::VRHardwareUnit(VRController* controller)
+VRHardwareUnit::VRHardwareUnit(NavigatorVRDevice* navigatorVRDevice)
: m_nextDeviceId(1)
, m_frameIndex(0)
- , m_controller(controller)
+ , m_navigatorVRDevice(navigatorVRDevice)
{
m_positionState = VRPositionState::create();
}
@@ -59,13 +59,13 @@ void VRHardwareUnit::addDevicesToVector(HeapVector<Member<VRDevice>>& vrDevices)
VRController* VRHardwareUnit::controller()
{
- return m_controller;
+ return m_navigatorVRDevice->controller();
}
VRPositionState* VRHardwareUnit::getSensorState()
{
WebHMDSensorState state;
- m_controller->getSensorState(m_index, state);
+ controller()->getSensorState(m_index, state);
m_positionState->setState(state);
m_frameIndex = state.frameIndex;
return m_positionState;
@@ -73,7 +73,7 @@ VRPositionState* VRHardwareUnit::getSensorState()
DEFINE_TRACE(VRHardwareUnit)
{
- visitor->trace(m_controller);
+ visitor->trace(m_navigatorVRDevice);
visitor->trace(m_positionState);
visitor->trace(m_hmd);
visitor->trace(m_positionSensor);
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRHardwareUnit.h ('k') | third_party/WebKit/Source/modules/vr/VRHardwareUnitCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698