| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 DEVICE_VR_EXPORT void ExitPresent(VRServiceImpl* service, unsigned int index); | 49 DEVICE_VR_EXPORT void ExitPresent(VRServiceImpl* service, unsigned int index); |
| 50 void SubmitFrame(VRServiceImpl* service, unsigned int index, VRPosePtr pose); | 50 void SubmitFrame(VRServiceImpl* service, unsigned int index, VRPosePtr pose); |
| 51 | 51 |
| 52 // VRClientDispatcher implementation | 52 // VRClientDispatcher implementation |
| 53 void OnDeviceChanged(VRDisplayPtr device) override; | 53 void OnDeviceChanged(VRDisplayPtr device) override; |
| 54 void OnDeviceConnectionStatusChanged(VRDevice* device, | 54 void OnDeviceConnectionStatusChanged(VRDevice* device, |
| 55 bool is_connected) override; | 55 bool is_connected) override; |
| 56 void OnPresentEnded(VRDevice* device) override; |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 friend class VRDeviceManagerTest; | 59 friend class VRDeviceManagerTest; |
| 59 friend class VRServiceImplTest; | 60 friend class VRServiceImplTest; |
| 60 | 61 |
| 61 VRDeviceManager(); | 62 VRDeviceManager(); |
| 62 // Constructor for testing. | 63 // Constructor for testing. |
| 63 DEVICE_VR_EXPORT explicit VRDeviceManager( | 64 DEVICE_VR_EXPORT explicit VRDeviceManager( |
| 64 std::unique_ptr<VRDeviceProvider> provider); | 65 std::unique_ptr<VRDeviceProvider> provider); |
| 65 | 66 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 base::ThreadChecker thread_checker_; | 100 base::ThreadChecker thread_checker_; |
| 100 | 101 |
| 101 base::RepeatingTimer timer_; | 102 base::RepeatingTimer timer_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); | 104 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 } // namespace content | 107 } // namespace content |
| 107 | 108 |
| 108 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H | 109 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H |
| OLD | NEW |