OLD | NEW |
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 #include "device/vr/vr_service_impl.h" | 5 #include "device/vr/vr_service_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/memory/ptr_util.h" |
10 #include "device/vr/vr_device.h" | 11 #include "device/vr/vr_device.h" |
11 #include "device/vr/vr_device_manager.h" | 12 #include "device/vr/vr_device_manager.h" |
12 #include "mojo/public/cpp/bindings/strong_binding.h" | 13 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 | 14 |
14 namespace device { | 15 namespace device { |
15 | 16 |
16 VRServiceImpl::VRServiceImpl() : listening_for_activate_(false) {} | 17 VRServiceImpl::VRServiceImpl() : listening_for_activate_(false) {} |
17 | 18 |
18 VRServiceImpl::~VRServiceImpl() { | 19 VRServiceImpl::~VRServiceImpl() { |
19 VRDeviceManager::GetInstance()->RemoveService(this); | 20 VRDeviceManager::GetInstance()->RemoveService(this); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 callback.Run(device_manager->GetNumberOfConnectedDevices()); | 54 callback.Run(device_manager->GetNumberOfConnectedDevices()); |
54 } | 55 } |
55 | 56 |
56 void VRServiceImpl::SetListeningForActivate(bool listening) { | 57 void VRServiceImpl::SetListeningForActivate(bool listening) { |
57 listening_for_activate_ = listening; | 58 listening_for_activate_ = listening; |
58 VRDeviceManager* device_manager = VRDeviceManager::GetInstance(); | 59 VRDeviceManager* device_manager = VRDeviceManager::GetInstance(); |
59 device_manager->ListeningForActivateChanged(listening); | 60 device_manager->ListeningForActivateChanged(listening); |
60 } | 61 } |
61 | 62 |
62 } // namespace device | 63 } // namespace device |
OLD | NEW |