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

Side by Side Diff: content/browser/vr/vr_device_manager.h

Issue 1735583002: Rename WeakBindingSet/WeakInterfacePtrSet to BindingSet/InterfacePtrSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/gpu/gpu_child_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H 5 #ifndef CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
6 #define CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H 6 #define CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "content/browser/vr/vr_device.h" 17 #include "content/browser/vr/vr_device.h"
18 #include "content/browser/vr/vr_device_provider.h" 18 #include "content/browser/vr/vr_device_provider.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/common/vr_service.mojom.h" 20 #include "content/common/vr_service.mojom.h"
21 #include "mojo/public/cpp/bindings/weak_binding_set.h" 21 #include "mojo/public/cpp/bindings/binding_set.h"
22 22
23 namespace content { 23 namespace content {
24 24
25 class VRDeviceManager : public VRService { 25 class VRDeviceManager : public VRService {
26 public: 26 public:
27 ~VRDeviceManager() override; 27 ~VRDeviceManager() override;
28 28
29 static void BindRequest(mojo::InterfaceRequest<VRService> request); 29 static void BindRequest(mojo::InterfaceRequest<VRService> request);
30 30
31 // Returns the VRDeviceManager singleton. 31 // Returns the VRDeviceManager singleton.
(...skipping 26 matching lines...) Expand all
58 58
59 using ProviderList = std::vector<linked_ptr<VRDeviceProvider>>; 59 using ProviderList = std::vector<linked_ptr<VRDeviceProvider>>;
60 ProviderList providers_; 60 ProviderList providers_;
61 61
62 // Devices are owned by their providers. 62 // Devices are owned by their providers.
63 using DeviceMap = std::map<unsigned int, VRDevice*>; 63 using DeviceMap = std::map<unsigned int, VRDevice*>;
64 DeviceMap devices_; 64 DeviceMap devices_;
65 65
66 bool vr_initialized_; 66 bool vr_initialized_;
67 67
68 mojo::WeakBindingSet<VRService> bindings_; 68 mojo::BindingSet<VRService> bindings_;
69 69
70 // For testing. If true will not delete self when consumer count reaches 0. 70 // For testing. If true will not delete self when consumer count reaches 0.
71 bool keep_alive_; 71 bool keep_alive_;
72 72
73 base::ThreadChecker thread_checker_; 73 base::ThreadChecker thread_checker_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager); 75 DISALLOW_COPY_AND_ASSIGN(VRDeviceManager);
76 }; 76 };
77 77
78 } // namespace content 78 } // namespace content
79 79
80 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H 80 #endif // CONTENT_BROWSER_VR_VR_DEVICE_MANAGER_H
OLDNEW
« no previous file with comments | « content/browser/storage_partition_impl.h ('k') | content/gpu/gpu_child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698