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

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

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 years, 1 month 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/VRController.h" 5 #include "modules/vr/VRController.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "modules/vr/NavigatorVR.h" 10 #include "modules/vr/NavigatorVR.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // If we've previously synced the VRDisplays just return the current list. 42 // If we've previously synced the VRDisplays just return the current list.
43 if (m_displaySynced) { 43 if (m_displaySynced) {
44 resolver->resolve(m_displays); 44 resolver->resolve(m_displays);
45 return; 45 return;
46 } 46 }
47 47
48 // Otherwise we're still waiting for the full list of displays to be populated 48 // Otherwise we're still waiting for the full list of displays to be populated
49 // so queue up the promise for resolution when onDisplaysSynced is called. 49 // so queue up the promise for resolution when onDisplaysSynced is called.
50 m_pendingGetDevicesCallbacks.append( 50 m_pendingGetDevicesCallbacks.append(
51 wrapUnique(new VRGetDevicesCallback(resolver))); 51 makeUnique<VRGetDevicesCallback>(resolver));
52 } 52 }
53 53
54 // Each time a new VRDisplay is connected we'll recieve a VRDisplayPtr for it 54 // Each time a new VRDisplay is connected we'll recieve a VRDisplayPtr for it
55 // here. Upon calling SetClient in the constructor we should receive one call 55 // here. Upon calling SetClient in the constructor we should receive one call
56 // for each VRDisplay that was already connected at the time. 56 // for each VRDisplay that was already connected at the time.
57 void VRController::OnDisplayConnected( 57 void VRController::OnDisplayConnected(
58 device::mojom::blink::VRDisplayPtr display, 58 device::mojom::blink::VRDisplayPtr display,
59 device::mojom::blink::VRDisplayClientRequest request, 59 device::mojom::blink::VRDisplayClientRequest request,
60 device::mojom::blink::VRDisplayInfoPtr displayInfo) { 60 device::mojom::blink::VRDisplayInfoPtr displayInfo) {
61 VRDisplay* vrDisplay = 61 VRDisplay* vrDisplay =
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 DEFINE_TRACE(VRController) { 108 DEFINE_TRACE(VRController) {
109 visitor->trace(m_navigatorVR); 109 visitor->trace(m_navigatorVR);
110 visitor->trace(m_displays); 110 visitor->trace(m_displays);
111 111
112 ContextLifecycleObserver::trace(visitor); 112 ContextLifecycleObserver::trace(visitor);
113 } 113 }
114 114
115 } // namespace blink 115 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698