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

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

Issue 1967633002: Updated VRService to match the latest Blink WebVR interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: And we're back to removing all the array size checks Created 4 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: third_party/WebKit/Source/modules/vr/VRController.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRController.cpp b/third_party/WebKit/Source/modules/vr/VRController.cpp
index 2d0fdbff316eea6f0e7d57c3c3dccb19bb1994f7..15e4c500d18cf7ad888d36710e94400c8d934f94 100644
--- a/third_party/WebKit/Source/modules/vr/VRController.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRController.cpp
@@ -39,7 +39,7 @@ const char* VRController::supplementName()
return "VRController";
}
-void VRController::getDevices(std::unique_ptr<VRGetDevicesCallback> callback)
+void VRController::getDisplays(std::unique_ptr<VRGetDevicesCallback> callback)
{
if (!m_service) {
callback->onError();
@@ -47,24 +47,24 @@ void VRController::getDevices(std::unique_ptr<VRGetDevicesCallback> callback)
}
m_pendingGetDevicesCallbacks.append(std::move(callback));
- m_service->GetDevices(createBaseCallback(bind<mojo::WTFArray<mojom::blink::VRDeviceInfoPtr>>(&VRController::OnGetDevices, this)));
+ m_service->GetDisplays(createBaseCallback(bind<mojo::WTFArray<mojom::blink::VRDisplayPtr>>(&VRController::onGetDisplays, this)));
}
-mojom::blink::VRSensorStatePtr VRController::getSensorState(unsigned index)
+mojom::blink::VRPosePtr VRController::getPose(unsigned index)
{
if (!m_service)
return nullptr;
- mojom::blink::VRSensorStatePtr state;
- m_service->GetSensorState(index, &state);
- return state;
+ mojom::blink::VRPosePtr pose;
+ m_service->GetPose(index, &pose);
+ return pose;
}
-void VRController::resetSensor(unsigned index)
+void VRController::resetPose(unsigned index)
{
if (!m_service)
return;
- m_service->ResetSensor(index);
+ m_service->ResetPose(index);
}
void VRController::willDetachFrameHost()
@@ -72,13 +72,13 @@ void VRController::willDetachFrameHost()
// TODO(kphanee): Detach from the mojo service connection.
}
-void VRController::OnGetDevices(mojo::WTFArray<mojom::blink::VRDeviceInfoPtr> devices)
+void VRController::onGetDisplays(mojo::WTFArray<mojom::blink::VRDisplayPtr> displays)
{
std::unique_ptr<VRGetDevicesCallback> callback = m_pendingGetDevicesCallbacks.takeFirst();
if (!callback)
return;
- callback->onSuccess(std::move(devices));
+ callback->onSuccess(std::move(displays));
}
DEFINE_TRACE(VRController)
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRController.h ('k') | third_party/WebKit/Source/modules/vr/VRDisplay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698