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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRGetDevicesCallback.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 unified diff | Download patch
OLDNEW
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 "modules/vr/VRGetDevicesCallback.h" 5 #include "modules/vr/VRGetDevicesCallback.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "modules/vr/VRHardwareUnitCollection.h" 8 #include "modules/vr/VRDisplayCollection.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 VRGetDevicesCallback::VRGetDevicesCallback(ScriptPromiseResolver* resolver, VRHa rdwareUnitCollection* hardwareUnits) 12 VRGetDevicesCallback::VRGetDevicesCallback(ScriptPromiseResolver* resolver, VRDi splayCollection* displays)
13 : m_resolver(resolver) 13 : m_resolver(resolver)
14 , m_hardwareUnits(hardwareUnits) 14 , m_displays(displays)
15 { 15 {
16 } 16 }
17 17
18 VRGetDevicesCallback::~VRGetDevicesCallback() 18 VRGetDevicesCallback::~VRGetDevicesCallback()
19 { 19 {
20 } 20 }
21 21
22 void VRGetDevicesCallback::onSuccess(const WebVector<WebVRDevice>& devices) 22 void VRGetDevicesCallback::onSuccess(const WebVector<WebVRDevice>& devices)
23 { 23 {
24 m_resolver->resolve(m_hardwareUnits->updateVRHardwareUnits(devices)); 24 m_resolver->resolve(m_displays->updateDisplays(devices));
25 } 25 }
26 26
27 void VRGetDevicesCallback::onError() 27 void VRGetDevicesCallback::onError()
28 { 28 {
29 m_resolver->reject(); 29 m_resolver->reject();
30 } 30 }
31 31
32 } // namespace blink 32 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRGetDevicesCallback.h ('k') | third_party/WebKit/Source/modules/vr/VRHardwareUnit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698