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

Unified Diff: third_party/WebKit/Source/modules/vr/VRHardwareUnitCollection.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/VRHardwareUnitCollection.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRHardwareUnitCollection.cpp b/third_party/WebKit/Source/modules/vr/VRHardwareUnitCollection.cpp
deleted file mode 100644
index 830cac09677a7012d25aed0e11d9508b29d245e9..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/modules/vr/VRHardwareUnitCollection.cpp
+++ /dev/null
@@ -1,65 +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/VRHardwareUnitCollection.h"
-
-#include "bindings/core/v8/ScriptPromiseResolver.h"
-#include "core/dom/Document.h"
-#include "core/frame/LocalDOMWindow.h"
-#include "core/frame/LocalFrame.h"
-#include "core/frame/Navigator.h"
-#include "core/page/Page.h"
-#include "modules/vr/HMDVRDevice.h"
-#include "modules/vr/NavigatorVRDevice.h"
-#include "modules/vr/PositionSensorVRDevice.h"
-#include "modules/vr/VRController.h"
-#include "modules/vr/VRGetDevicesCallback.h"
-#include "modules/vr/VRHardwareUnit.h"
-#include "modules/vr/VRPositionState.h"
-
-namespace blink {
-
-VRHardwareUnitCollection::VRHardwareUnitCollection(NavigatorVRDevice* navigatorVRDevice)
- : m_navigatorVRDevice(navigatorVRDevice)
-{
-}
-
-HeapVector<Member<VRDevice>> VRHardwareUnitCollection::updateVRHardwareUnits(const WebVector<WebVRDevice>& devices)
-{
- VRDeviceVector vrDevices;
-
- for (const auto& device : devices) {
- VRHardwareUnit* hardwareUnit = getHardwareUnitForIndex(device.index);
- if (!hardwareUnit) {
- hardwareUnit = new VRHardwareUnit(m_navigatorVRDevice);
- m_hardwareUnits.append(hardwareUnit);
- }
-
- hardwareUnit->updateFromWebVRDevice(device);
- hardwareUnit->addDevicesToVector(vrDevices);
- }
-
- return vrDevices;
-}
-
-VRHardwareUnit* VRHardwareUnitCollection::getHardwareUnitForIndex(unsigned index)
-{
- VRHardwareUnit* hardwareUnit;
- for (size_t i = 0; i < m_hardwareUnits.size(); ++i) {
- hardwareUnit = m_hardwareUnits[i];
- if (hardwareUnit->index() == index) {
- return hardwareUnit;
- }
- }
-
- return 0;
-}
-
-DEFINE_TRACE(VRHardwareUnitCollection)
-{
- visitor->trace(m_navigatorVRDevice);
- visitor->trace(m_hardwareUnits);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRHardwareUnitCollection.h ('k') | third_party/WebKit/Source/modules/vr/VRLayer.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698