Index: content/renderer/vr_dispatcher.cc |
diff --git a/content/renderer/vr_dispatcher.cc b/content/renderer/vr_dispatcher.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e0e1e941d2820fc95a5f6e5db07ad15d4819c6de |
--- /dev/null |
+++ b/content/renderer/vr_dispatcher.cc |
@@ -0,0 +1,53 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/renderer/vr_dispatcher.h" |
+ |
+#include "content/public/renderer/render_thread.h" |
+#include "ipc/ipc_sync_message_filter.h" |
+ |
+namespace content { |
+ |
+VRDispatcher::VRDispatcher() { |
+} |
+ |
+VRDispatcher::~VRDispatcher() { |
+} |
+ |
+void VRDispatcher::GetVRDevices( |
+ blink::WebVector<blink::WebVRDevice>* devices) { |
+ std::vector<blink::WebVRDevice> ipcDevices; |
+ |
+ CHECK(RenderThread::Get()->Send(new VRMsg_GetVRDevices( |
no sievers
2015/03/19 01:24:53
not sure about the CHECKs(). or why we would do th
|
+ &ipcDevices))); |
+ |
+ if (devices && ipcDevices.size() > 0) |
+ devices->assign(&ipcDevices.front(), ipcDevices.size()); |
+} |
+ |
+void VRDispatcher::GetHMDSensorState( |
+ unsigned int index, blink::WebHMDSensorState& state) { |
+ CHECK(RenderThread::Get()->Send(new VRMsg_GetHMDSensorState(index, &state))); |
no sievers
2015/03/19 01:24:53
On a related note... for GetSensorState and GetRen
|
+} |
+ |
+void VRDispatcher::ResetSensor(unsigned int index) { |
+ CHECK(RenderThread::Get()->Send(new VRMsg_ResetSensor( |
+ index))); |
+} |
+ |
+void VRDispatcher::GetRenderTargetRects(unsigned index, |
+ blink::WebVRFieldOfView leftFov, |
+ blink::WebVRFieldOfView rightFov, |
+ blink::WebVRVector4* leftRect, |
+ blink::WebVRVector4* rightRect) { |
+ CHECK(RenderThread::Get()->Send(new VRMsg_GetRenderTargetRects( |
+ index, leftFov, rightFov, leftRect, rightRect))); |
+} |
+ |
+bool VRDispatcher::OnControlMessageReceived( |
+ const IPC::Message& message) { |
+ return false; |
no sievers
2015/03/19 01:24:53
Why is this a RenderProcessObserver then?
|
+} |
+ |
+} // namespace content |