| OLD | NEW |
| 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 #ifndef WebVRClient_h | 5 #ifndef WebVRClient_h |
| 6 #define WebVRClient_h | 6 #define WebVRClient_h |
| 7 | 7 |
| 8 #include "public/platform/WebCallbacks.h" | 8 #include "public/platform/WebCallbacks.h" |
| 9 #include "public/platform/WebVR.h" | |
| 10 #include "public/platform/WebVector.h" | 9 #include "public/platform/WebVector.h" |
| 10 #include "public/platform/modules/vr/WebVR.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 // Success and failure callbacks for getDevices. | 14 // Success and failure callbacks for getDevices. |
| 15 typedef WebCallbacks<WebVector<blink::WebVRDevice>, void> WebVRGetDevicesCallbac
k; | 15 typedef WebCallbacks<WebVector<blink::WebVRDevice>, void> WebVRGetDevicesCallbac
k; |
| 16 | 16 |
| 17 // Client handling VR device communication for a given WebFrame. | 17 // Client handling VR device communication for a given WebFrame. |
| 18 class WebVRClient { | 18 class WebVRClient { |
| 19 public: | 19 public: |
| 20 virtual ~WebVRClient() { } | 20 virtual ~WebVRClient() { } |
| 21 | 21 |
| 22 virtual void getDevices(WebVRGetDevicesCallback*) = 0; | 22 virtual void getDevices(WebVRGetDevicesCallback*) = 0; |
| 23 | 23 |
| 24 virtual void getSensorState(unsigned index, blink::WebHMDSensorState& into)
= 0; | 24 virtual void getSensorState(unsigned index, blink::WebHMDSensorState& into)
= 0; |
| 25 | 25 |
| 26 virtual void resetSensor(unsigned index) = 0; | 26 virtual void resetSensor(unsigned index) = 0; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 } // namespace blink | 29 } // namespace blink |
| 30 | 30 |
| 31 #endif // WebVRClient_h | 31 #endif // WebVRClient_h |
| OLD | NEW |