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

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

Issue 2510993002: Notify VRDeviceProviders when there are pages listening for vrdisplayactivate (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 | « device/vr/vr_service.mojom ('k') | 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 10 matching lines...) Expand all
21 public: 21 public:
22 DEVICE_VR_EXPORT ~VRServiceImpl() override; 22 DEVICE_VR_EXPORT ~VRServiceImpl() override;
23 23
24 DEVICE_VR_EXPORT static void BindRequest( 24 DEVICE_VR_EXPORT static void BindRequest(
25 mojo::InterfaceRequest<mojom::VRService> request); 25 mojo::InterfaceRequest<mojom::VRService> request);
26 26
27 mojom::VRServiceClient* client() { return client_.get(); } 27 mojom::VRServiceClient* client() { return client_.get(); }
28 28
29 VRDisplayImpl* GetVRDisplayImpl(VRDevice* device); 29 VRDisplayImpl* GetVRDisplayImpl(VRDevice* device);
30 30
31 bool listening_for_activate() { return listening_for_activate_; }
32
31 private: 33 private:
32 friend class VRServiceTestBinding; 34 friend class VRServiceTestBinding;
33 friend class VRDeviceManagerTest; 35 friend class VRDeviceManagerTest;
34 friend class VRDisplayImpl; 36 friend class VRDisplayImpl;
35 37
36 DEVICE_VR_EXPORT VRServiceImpl(); 38 DEVICE_VR_EXPORT VRServiceImpl();
37 39
38 // Mojo connection handling. 40 // Mojo connection handling.
39 DEVICE_VR_EXPORT void Bind(mojo::InterfaceRequest<mojom::VRService> request); 41 DEVICE_VR_EXPORT void Bind(mojo::InterfaceRequest<mojom::VRService> request);
40 void RemoveFromDeviceManager(); 42 void RemoveFromDeviceManager();
41 void RemoveDevice(VRDevice* device); 43 void RemoveDevice(VRDevice* device);
42 44
43 // mojom::VRService implementation 45 // mojom::VRService implementation
44 void SetClient(mojom::VRServiceClientPtr service_client, 46 void SetClient(mojom::VRServiceClientPtr service_client,
45 const SetClientCallback& callback) override; 47 const SetClientCallback& callback) override;
48 void SetListeningForActivate(bool listening) override;
46 49
47 using DisplayImplMap = std::map<VRDevice*, std::unique_ptr<VRDisplayImpl>>; 50 using DisplayImplMap = std::map<VRDevice*, std::unique_ptr<VRDisplayImpl>>;
48 DisplayImplMap displays_; 51 DisplayImplMap displays_;
49 52
50 mojom::VRServiceClientPtr client_; 53 mojom::VRServiceClientPtr client_;
51 54
55 bool listening_for_activate_;
56
52 std::unique_ptr<mojo::Binding<mojom::VRService>> binding_; 57 std::unique_ptr<mojo::Binding<mojom::VRService>> binding_;
53 58
54 DISALLOW_COPY_AND_ASSIGN(VRServiceImpl); 59 DISALLOW_COPY_AND_ASSIGN(VRServiceImpl);
55 }; 60 };
56 61
57 } // namespace device 62 } // namespace device
58 63
59 #endif // DEVICE_VR_VR_SERVICE_IMPL_H 64 #endif // DEVICE_VR_VR_SERVICE_IMPL_H
OLDNEW
« no previous file with comments | « device/vr/vr_service.mojom ('k') | device/vr/vr_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698