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

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

Issue 1918143007: Updated Blink WebVR interfaces to WebVR v1 spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webvr_mojo
Patch Set: Fixed layout test 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/HMDVRDevice.cpp
diff --git a/third_party/WebKit/Source/modules/vr/HMDVRDevice.cpp b/third_party/WebKit/Source/modules/vr/HMDVRDevice.cpp
deleted file mode 100644
index 3404f7b6781b827b91db48f9429ceffb64517a5d..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/vr/HMDVRDevice.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "modules/vr/HMDVRDevice.h"
-
-#include "modules/vr/VRController.h"
-#include "modules/vr/VRFieldOfView.h"
-
-namespace blink {
-
-namespace {
-
-VREye stringToVREye(const String& whichEye)
-{
- if (whichEye == "left")
- return VREyeLeft;
- if (whichEye == "right")
- return VREyeRight;
- return VREyeNone;
-}
-
-} // namespace
-
-HMDVRDevice::HMDVRDevice(VRHardwareUnit* hardwareUnit, unsigned deviceId)
- : VRDevice(hardwareUnit, deviceId)
-{
- m_eyeParametersLeft = VREyeParameters::create();
- m_eyeParametersRight = VREyeParameters::create();
-}
-
-void HMDVRDevice::updateFromWebVRDevice(const WebVRDevice& device)
-{
- VRDevice::updateFromWebVRDevice(device);
- const WebVRHMDInfo &hmdInfo = device.hmdInfo;
-
- m_eyeParametersLeft->setFromWebVREyeParameters(hmdInfo.leftEye);
- m_eyeParametersRight->setFromWebVREyeParameters(hmdInfo.rightEye);
-}
-
-VREyeParameters* HMDVRDevice::getEyeParameters(const String& whichEye)
-{
- switch (stringToVREye(whichEye)) {
- case VREyeLeft:
- return m_eyeParametersLeft;
- case VREyeRight:
- return m_eyeParametersRight;
- default:
- return nullptr;
- }
-}
-
-void HMDVRDevice::setFieldOfView(VRFieldOfView* leftFov, VRFieldOfView* rightFov)
-{
- // FIXME: Currently min == max == recommended FOV, but when that changes
- // this function will need to perform clamping and track the set value
-}
-
-DEFINE_TRACE(HMDVRDevice)
-{
- visitor->trace(m_eyeParametersLeft);
- visitor->trace(m_eyeParametersRight);
-
- VRDevice::trace(visitor);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/vr/HMDVRDevice.h ('k') | third_party/WebKit/Source/modules/vr/HMDVRDevice.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698