OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_VR_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_VR_MESSAGE_FILTER_H_ |
| 7 |
| 8 #include <vector> |
| 9 #include "base/compiler_specific.h" |
| 10 #include "content/browser/vr/vr_service.h" |
| 11 #include "content/browser/vr/vr_service_consumer.h" |
| 12 #include "content/public/browser/browser_message_filter.h" |
| 13 |
| 14 namespace blink { |
| 15 struct WebHMDSensorState; |
| 16 class WebVRDevice; |
| 17 struct WebVRVector4; |
| 18 } |
| 19 |
| 20 namespace content { |
| 21 |
| 22 class RenderProcessHost; |
| 23 |
| 24 class VRMessageFilter : |
| 25 public BrowserMessageFilter, public VRServiceConsumer { |
| 26 public: |
| 27 VRMessageFilter(); |
| 28 |
| 29 // BrowserMessageFilter implementation. |
| 30 bool OnMessageReceived(const IPC::Message& message) override; |
| 31 void OnDestruct() const override; |
| 32 |
| 33 protected: |
| 34 ~VRMessageFilter() override; |
| 35 |
| 36 private: |
| 37 friend class BrowserThread; |
| 38 friend class base::DeleteHelper<VRMessageFilter>; |
| 39 |
| 40 void OnGetVRDevices( |
| 41 int32_t render_frame_id, |
| 42 int request_id); |
| 43 |
| 44 void OnGetSensorState( |
| 45 int32_t render_frame_id, |
| 46 unsigned int index, |
| 47 blink::WebHMDSensorState* state); |
| 48 |
| 49 void OnResetSensor( |
| 50 int32_t render_frame_id, |
| 51 unsigned int index); |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(VRMessageFilter); |
| 54 }; |
| 55 |
| 56 } // namespace content |
| 57 |
| 58 #endif // CONTENT_BROWSER_RENDERER_HOST_VR_MESSAGE_FILTER_H_ |
OLD | NEW |