| 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 DEVICE_VR_VR_DEVICE_MANAGER_H | 5 #ifndef DEVICE_VR_VR_DEVICE_MANAGER_H |
| 6 #define DEVICE_VR_VR_DEVICE_MANAGER_H | 6 #define DEVICE_VR_VR_DEVICE_MANAGER_H |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Adds a listener for device manager events. VRDeviceManager does not own | 39 // Adds a listener for device manager events. VRDeviceManager does not own |
| 40 // this object. | 40 // this object. |
| 41 void AddService(VRServiceImpl* service); | 41 void AddService(VRServiceImpl* service); |
| 42 void RemoveService(VRServiceImpl* service); | 42 void RemoveService(VRServiceImpl* service); |
| 43 | 43 |
| 44 DEVICE_VR_EXPORT mojo::Array<VRDisplayPtr> GetVRDevices(); | 44 DEVICE_VR_EXPORT mojo::Array<VRDisplayPtr> GetVRDevices(); |
| 45 | 45 |
| 46 // Manage presentation to only allow a single service and device at a time. | 46 // Manage presentation to only allow a single service and device at a time. |
| 47 DEVICE_VR_EXPORT bool RequestPresent(VRServiceImpl* service, | 47 DEVICE_VR_EXPORT bool RequestPresent(VRServiceImpl* service, |
| 48 unsigned int index); | 48 unsigned int index, |
| 49 bool secure_origin); |
| 49 DEVICE_VR_EXPORT void ExitPresent(VRServiceImpl* service, unsigned int index); | 50 DEVICE_VR_EXPORT void ExitPresent(VRServiceImpl* service, unsigned int index); |
| 50 void SubmitFrame(VRServiceImpl* service, unsigned int index, VRPosePtr pose); | 51 void SubmitFrame(VRServiceImpl* service, unsigned int index, VRPosePtr pose); |
| 51 | 52 |
| 52 // VRClientDispatcher implementation | 53 // VRClientDispatcher implementation |
| 53 void OnDeviceChanged(VRDisplayPtr device) override; | 54 void OnDeviceChanged(VRDisplayPtr device) override; |
| 54 void OnDeviceConnectionStatusChanged(VRDevice* device, | 55 void OnDeviceConnectionStatusChanged(VRDevice* device, |
| 55 bool is_connected) override; | 56 bool is_connected) override; |
| 56 void OnPresentEnded(VRDevice* device) override; | 57 void OnPresentEnded(VRDevice* device) override; |
| 57 | 58 |
| 58 private: | 59 private: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 base::ThreadChecker thread_checker_; | 101 base::ThreadChecker thread_checker_; |
| 101 | 102 |
| 102 base::RepeatingTimer timer_; | 103 base::RepeatingTimer timer_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); | 105 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace content | 108 } // namespace content |
| 108 | 109 |
| 109 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H | 110 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H |
| OLD | NEW |