Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: device/vr/vr_device_manager.h

Issue 2537723002: Refine VRDevice Class (Closed)
Patch Set: address comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 using ServiceSet = std::set<VRServiceImpl*>;
mthiesse 2016/11/30 13:59:04 nit: type alias is also pretty useless here, might
76 ServiceList services_; 76 ServiceSet services_;
77 77
78 // For testing. If true will not delete self when consumer count reaches 0. 78 // For testing. If true will not delete self when consumer count reaches 0.
79 bool keep_alive_; 79 bool keep_alive_;
80 80
81 bool has_scheduled_poll_; 81 bool has_scheduled_poll_;
82 82
83 bool has_activate_listeners_; 83 bool has_activate_listeners_;
84 84
85 base::ThreadChecker thread_checker_; 85 base::ThreadChecker thread_checker_;
86 86
87 base::RepeatingTimer timer_; 87 base::RepeatingTimer timer_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); 89 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager);
90 }; 90 };
91 91
92 } // namespace content 92 } // namespace content
93 93
94 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H 94 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698