Index: content/browser/renderer_host/vr_message_filter.h |
diff --git a/content/browser/renderer_host/vr_message_filter.h b/content/browser/renderer_host/vr_message_filter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c7b5656995058dd710c1666f25f9c26571a843b3 |
--- /dev/null |
+++ b/content/browser/renderer_host/vr_message_filter.h |
@@ -0,0 +1,54 @@ |
+// 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. |
+ |
+#ifndef CONTENT_BROWSER_RENDERER_HOST_VR_MESSAGE_FILTER_H_ |
+#define CONTENT_BROWSER_RENDERER_HOST_VR_MESSAGE_FILTER_H_ |
+ |
+#include <vector> |
+#include "base/compiler_specific.h" |
+#include "base/memory/shared_memory.h" |
+#include "content/browser/vr/vr_service.h" |
+#include "content/browser/vr/vr_service_consumer.h" |
+#include "content/public/browser/browser_message_filter.h" |
+ |
+namespace blink { |
+struct WebHMDSensorState; |
+class WebVRDevice; |
+struct WebVRVector4; |
+} |
+ |
+namespace content { |
+ |
+class RenderProcessHost; |
+ |
+class VRMessageFilter : |
+ public BrowserMessageFilter, public VRServiceConsumer { |
+ public: |
+ VRMessageFilter(); |
+ |
+ // BrowserMessageFilter implementation. |
+ bool OnMessageReceived(const IPC::Message& message) override; |
+ |
+ private: |
+ ~VRMessageFilter() override; |
+ |
+ void OnGetVRDevices(std::vector<blink::WebVRDevice>* devices); |
+ |
+ void OnGetSensorState( |
+ unsigned int index, blink::WebHMDSensorState* state); |
+ |
+ void OnResetSensor(unsigned int index); |
+ |
+ void OnGetRenderTargetRects(unsigned index, |
+ blink::WebVRFieldOfView leftFov, |
+ blink::WebVRFieldOfView rightFov, |
+ blink::WebVRVector4* leftRect, |
+ blink::WebVRVector4* rightRect); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(VRMessageFilter); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_VR_MESSAGE_FILTER_H_ |