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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRGetDevicesCallback.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 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/VRDisplayCollection.h" 8 #include "modules/vr/VRDisplayCollection.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 VRGetDevicesCallback::VRGetDevicesCallback(ScriptPromiseResolver* resolver, VRDi splayCollection* displays) 12 VRGetDevicesCallback::VRGetDevicesCallback(ScriptPromiseResolver* resolver, VRDi splayCollection* displays)
13 : m_resolver(resolver) 13 : m_resolver(resolver)
14 , m_displays(displays) 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(mojo::WTFArray<mojom::blink::VRDeviceInfoPt r> devices) 22 void VRGetDevicesCallback::onSuccess(mojo::WTFArray<mojom::blink::VRDisplayPtr> displays)
23 { 23 {
24 m_resolver->resolve(m_displays->updateDisplays(std::move(devices))); 24 m_resolver->resolve(m_displays->updateDisplays(std::move(displays)));
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/VRPose.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698