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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 using ProviderList = std::vector<std::unique_ptr<VRDeviceProvider>>; | 66 using ProviderList = std::vector<std::unique_ptr<VRDeviceProvider>>; |
67 ProviderList providers_; | 67 ProviderList providers_; |
68 | 68 |
69 // Devices are owned by their providers. | 69 // Devices are owned by their providers. |
70 using DeviceMap = std::map<unsigned int, VRDevice*>; | 70 using DeviceMap = std::map<unsigned int, VRDevice*>; |
71 DeviceMap devices_; | 71 DeviceMap devices_; |
72 | 72 |
73 bool vr_initialized_; | 73 bool vr_initialized_; |
74 | 74 |
75 using ServiceList = std::vector<VRServiceImpl*>; | 75 std::set<VRServiceImpl*> services_; |
76 ServiceList services_; | |
77 | 76 |
78 // For testing. If true will not delete self when consumer count reaches 0. | 77 // For testing. If true will not delete self when consumer count reaches 0. |
79 bool keep_alive_; | 78 bool keep_alive_; |
80 | 79 |
81 bool has_scheduled_poll_; | 80 bool has_scheduled_poll_; |
82 | 81 |
83 bool has_activate_listeners_; | 82 bool has_activate_listeners_; |
84 | 83 |
85 base::ThreadChecker thread_checker_; | 84 base::ThreadChecker thread_checker_; |
86 | 85 |
87 base::RepeatingTimer timer_; | 86 base::RepeatingTimer timer_; |
88 | 87 |
89 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); | 88 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); |
90 }; | 89 }; |
91 | 90 |
92 } // namespace content | 91 } // namespace content |
93 | 92 |
94 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H | 93 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H |
OLD | NEW |