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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRGetDevicesCallback.cpp

Issue 2167643003: Refactored VRService interaction and added VRServiceClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Liberal sprinkling of 'u's Created 4 years, 4 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"
9 8
10 namespace blink { 9 namespace blink {
11 10
12 VRGetDevicesCallback::VRGetDevicesCallback(ScriptPromiseResolver* resolver, VRDi splayCollection* displays) 11 VRGetDevicesCallback::VRGetDevicesCallback(ScriptPromiseResolver* resolver)
13 : m_resolver(resolver) 12 : m_resolver(resolver)
14 , m_displays(displays)
15 { 13 {
16 } 14 }
17 15
18 VRGetDevicesCallback::~VRGetDevicesCallback() 16 VRGetDevicesCallback::~VRGetDevicesCallback()
19 { 17 {
20 } 18 }
21 19
22 void VRGetDevicesCallback::onSuccess(mojo::WTFArray<device::blink::VRDisplayPtr> displays) 20 void VRGetDevicesCallback::onSuccess(VRDisplayVector displays)
23 { 21 {
24 m_resolver->resolve(m_displays->updateDisplays(std::move(displays))); 22 m_resolver->resolve(displays);
25 } 23 }
26 24
27 void VRGetDevicesCallback::onError() 25 void VRGetDevicesCallback::onError()
28 { 26 {
29 m_resolver->reject(); 27 m_resolver->reject();
30 } 28 }
31 29
32 } // namespace blink 30 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRGetDevicesCallback.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698