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

Unified Diff: device/vr/vr_service_impl.h

Issue 2615723002: Revert of Fix leak in VRServiceImpl (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/vr/vr_display_impl.cc ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_service_impl.h
diff --git a/device/vr/vr_service_impl.h b/device/vr/vr_service_impl.h
index 190f23fa260c428aa65401db3eec5ed781fd3785..091c81d6b01e4d9686bd2b67dff379fc256c5ca3 100644
--- a/device/vr/vr_service_impl.h
+++ b/device/vr/vr_service_impl.h
@@ -19,10 +19,9 @@
class VRServiceImpl : public mojom::VRService {
public:
- DEVICE_VR_EXPORT VRServiceImpl();
DEVICE_VR_EXPORT ~VRServiceImpl() override;
- DEVICE_VR_EXPORT static void Create(
+ DEVICE_VR_EXPORT static void BindRequest(
mojo::InterfaceRequest<mojom::VRService> request);
mojom::VRServiceClient* client() { return client_.get(); }
@@ -36,6 +35,11 @@
friend class VRDeviceManagerTest;
friend class VRDisplayImpl;
+ DEVICE_VR_EXPORT VRServiceImpl();
+
+ // Mojo connection handling.
+ DEVICE_VR_EXPORT void Bind(mojo::InterfaceRequest<mojom::VRService> request);
+ void RemoveFromDeviceManager();
void RemoveDevice(VRDevice* device);
// mojom::VRService implementation
@@ -43,11 +47,14 @@
const SetClientCallback& callback) override;
void SetListeningForActivate(bool listening) override;
- std::map<VRDevice*, std::unique_ptr<VRDisplayImpl>> displays_;
+ using DisplayImplMap = std::map<VRDevice*, std::unique_ptr<VRDisplayImpl>>;
+ DisplayImplMap displays_;
mojom::VRServiceClientPtr client_;
bool listening_for_activate_;
+
+ std::unique_ptr<mojo::Binding<mojom::VRService>> binding_;
DISALLOW_COPY_AND_ASSIGN(VRServiceImpl);
};
« no previous file with comments | « device/vr/vr_display_impl.cc ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698