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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // Adds a listener for device manager events. VRDeviceManager does not own | 35 // Adds a listener for device manager events. VRDeviceManager does not own |
36 // this object. | 36 // this object. |
37 void AddService(VRServiceImpl* service); | 37 void AddService(VRServiceImpl* service); |
38 void RemoveService(VRServiceImpl* service); | 38 void RemoveService(VRServiceImpl* service); |
39 | 39 |
40 DEVICE_VR_EXPORT mojo::Array<VRDisplayPtr> GetVRDevices(); | 40 DEVICE_VR_EXPORT mojo::Array<VRDisplayPtr> GetVRDevices(); |
41 DEVICE_VR_EXPORT VRDevice* GetDevice(unsigned int index); | 41 DEVICE_VR_EXPORT VRDevice* GetDevice(unsigned int index); |
42 | 42 |
43 void OnDeviceChanged(VRDisplayPtr device) override; | 43 void OnDeviceChanged(VRDisplayPtr device) override; |
| 44 void OnDeviceConnectionStatusChanged(VRDevice* device, |
| 45 bool is_connected) override; |
44 | 46 |
45 private: | 47 private: |
46 friend class VRDeviceManagerTest; | 48 friend class VRDeviceManagerTest; |
47 friend class VRServiceImplTest; | 49 friend class VRServiceImplTest; |
48 | 50 |
49 VRDeviceManager(); | 51 VRDeviceManager(); |
50 // Constructor for testing. | 52 // Constructor for testing. |
51 DEVICE_VR_EXPORT explicit VRDeviceManager( | 53 DEVICE_VR_EXPORT explicit VRDeviceManager( |
52 std::unique_ptr<VRDeviceProvider> provider); | 54 std::unique_ptr<VRDeviceProvider> provider); |
53 | 55 |
(...skipping 27 matching lines...) Expand all Loading... |
81 base::ThreadChecker thread_checker_; | 83 base::ThreadChecker thread_checker_; |
82 | 84 |
83 base::RepeatingTimer timer_; | 85 base::RepeatingTimer timer_; |
84 | 86 |
85 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); | 87 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); |
86 }; | 88 }; |
87 | 89 |
88 } // namespace content | 90 } // namespace content |
89 | 91 |
90 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H | 92 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H |
OLD | NEW |