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

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

Issue 2196843003: Blink ServiceRegistry -> InterfaceProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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/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"
11 #include "modules/vr/VRGetDevicesCallback.h" 11 #include "modules/vr/VRGetDevicesCallback.h"
12 #include "public/platform/ServiceRegistry.h" 12 #include "public/platform/InterfaceProvider.h"
13 13
14 #include "wtf/Assertions.h" 14 #include "wtf/Assertions.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 VRController::VRController(NavigatorVR* navigatorVR) 18 VRController::VRController(NavigatorVR* navigatorVR)
19 : ContextLifecycleObserver(navigatorVR->document()) 19 : ContextLifecycleObserver(navigatorVR->document())
20 , m_navigatorVR(navigatorVR) 20 , m_navigatorVR(navigatorVR)
21 , m_binding(this) 21 , m_binding(this)
22 { 22 {
23 navigatorVR->document()->frame()->serviceRegistry()->connectToRemoteService( mojo::GetProxy(&m_service)); 23 navigatorVR->document()->frame()->interfaceProvider()->getInterface(mojo::Ge tProxy(&m_service));
24 m_service->SetClient(m_binding.CreateInterfacePtrAndBind()); 24 m_service->SetClient(m_binding.CreateInterfacePtrAndBind());
25 } 25 }
26 26
27 VRController::~VRController() 27 VRController::~VRController()
28 { 28 {
29 } 29 }
30 30
31 void VRController::getDisplays(ScriptPromiseResolver* resolver) 31 void VRController::getDisplays(ScriptPromiseResolver* resolver)
32 { 32 {
33 if (!m_service) { 33 if (!m_service) {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 DEFINE_TRACE(VRController) 129 DEFINE_TRACE(VRController)
130 { 130 {
131 visitor->trace(m_navigatorVR); 131 visitor->trace(m_navigatorVR);
132 visitor->trace(m_displays); 132 visitor->trace(m_displays);
133 133
134 ContextLifecycleObserver::trace(visitor); 134 ContextLifecycleObserver::trace(visitor);
135 } 135 }
136 136
137 } // namespace blink 137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698