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

Unified Diff: third_party/WebKit/Source/modules/vr/VRController.cpp

Issue 2603553002: Ports VRService to be hosted in the device service.
Patch Set: Ports VRService to be hosted in the device service. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« services/device/manifest.json ('K') | « third_party/WebKit/Source/modules/vr/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/vr/VRController.cpp
diff --git a/third_party/WebKit/Source/modules/vr/VRController.cpp b/third_party/WebKit/Source/modules/vr/VRController.cpp
index 0df41d123929b8776bdb9a749274202c3f2677af..a8df2779012e0c5e6329e24201d53b4d7299c667 100644
--- a/third_party/WebKit/Source/modules/vr/VRController.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRController.cpp
@@ -10,7 +10,8 @@
#include "core/frame/LocalFrame.h"
#include "modules/vr/NavigatorVR.h"
#include "modules/vr/VRGetDevicesCallback.h"
-#include "public/platform/InterfaceProvider.h"
+#include "platform/ServiceConnector.h"
+#include "services/device/public/interfaces/constants.mojom-blink.h"
#include "wtf/Assertions.h"
@@ -21,10 +22,8 @@ VRController::VRController(NavigatorVR* navigatorVR)
m_navigatorVR(navigatorVR),
m_displaySynced(false),
m_binding(this) {
- navigatorVR->document()->frame()->interfaceProvider()->getInterface(
- mojo::MakeRequest(&m_service));
- m_service.set_connection_error_handler(convertToBaseCallback(
ke.he 2017/04/17 05:38:44 del this by mistake.
- WTF::bind(&VRController::dispose, wrapWeakPersistent(this))));
+ ServiceConnector::instance().connectToInterface(
+ device::mojom::blink::kServiceName, mojo::MakeRequest(&m_service));
m_service->SetClient(
m_binding.CreateInterfacePtrAndBind(),
convertToBaseCallback(
« services/device/manifest.json ('K') | « third_party/WebKit/Source/modules/vr/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698