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

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

Issue 2915993004: [WebVR] Only count devices that have successfully connected. (Closed)
Patch Set: Ignore device manager, just track the connected devices directly from the callbacks Created 3 years, 6 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 | « no previous file | device/vr/vr_service_impl.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SERVICE_IMPL_H 5 #ifndef DEVICE_VR_VR_SERVICE_IMPL_H
6 #define DEVICE_VR_VR_SERVICE_IMPL_H 6 #define DEVICE_VR_VR_SERVICE_IMPL_H
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 void SetListeningForActivate(bool listening) override; 54 void SetListeningForActivate(bool listening) override;
55 void OnVRDisplayInfoCreated(VRDevice* device, 55 void OnVRDisplayInfoCreated(VRDevice* device,
56 mojom::VRDisplayInfoPtr display_info); 56 mojom::VRDisplayInfoPtr display_info);
57 57
58 std::map<VRDevice*, std::unique_ptr<VRDisplayImpl>> displays_; 58 std::map<VRDevice*, std::unique_ptr<VRDisplayImpl>> displays_;
59 59
60 mojom::VRServiceClientPtr client_; 60 mojom::VRServiceClientPtr client_;
61 61
62 bool listening_for_activate_; 62 bool listening_for_activate_;
63 unsigned connected_devices_;
63 64
64 base::WeakPtrFactory<VRServiceImpl> weak_ptr_factory_; 65 base::WeakPtrFactory<VRServiceImpl> weak_ptr_factory_;
65 66
66 // Getter for testing. 67 // Getter for testing.
67 DEVICE_VR_EXPORT VRDisplayImpl* GetVRDisplayImplForTesting(VRDevice* device); 68 DEVICE_VR_EXPORT VRDisplayImpl* GetVRDisplayImplForTesting(VRDevice* device);
68 69
69 DISALLOW_COPY_AND_ASSIGN(VRServiceImpl); 70 DISALLOW_COPY_AND_ASSIGN(VRServiceImpl);
70 }; 71 };
71 72
72 } // namespace device 73 } // namespace device
73 74
74 #endif // DEVICE_VR_VR_SERVICE_IMPL_H 75 #endif // DEVICE_VR_VR_SERVICE_IMPL_H
OLDNEW
« no previous file with comments | « no previous file | device/vr/vr_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698