| OLD | NEW |
| 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 #include "device/vr/vr_device.h" | 5 #include "device/vr/vr_device.h" |
| 6 #include "device/vr/vr_device_provider.h" | 6 #include "device/vr/vr_device_provider.h" |
| 7 #include "device/vr/vr_service_impl.h" | 7 #include "device/vr/vr_service_impl.h" |
| 8 | 8 |
| 9 namespace device { | 9 namespace device { |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 if (vr_device_info.is_null()) | 47 if (vr_device_info.is_null()) |
| 48 return; | 48 return; |
| 49 | 49 |
| 50 for (const auto& display : displays_) { | 50 for (const auto& display : displays_) { |
| 51 mojom::VRDisplayClient* client = display.second->client(); | 51 mojom::VRDisplayClient* client = display.second->client(); |
| 52 if (client) | 52 if (client) |
| 53 client->OnDisplayChanged(vr_device_info.Clone()); | 53 client->OnDisplayChanged(vr_device_info.Clone()); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 void VRDevice::OnExitPresent(VRServiceImpl* service) { | 57 void VRDevice::OnExitPresent() { |
| 58 DisplayClientMap::iterator it = displays_.find(service); | 58 DisplayClientMap::iterator it = displays_.find(presenting_service_); |
| 59 if (it != displays_.end()) { | 59 if (it != displays_.end()) { |
| 60 mojom::VRDisplayClient* client = it->second->client(); | 60 mojom::VRDisplayClient* client = it->second->client(); |
| 61 if (client) | 61 if (client) |
| 62 client->OnExitPresent(); | 62 client->OnExitPresent(); |
| 63 } | 63 } |
| 64 |
| 65 presenting_service_ = nullptr; |
| 64 } | 66 } |
| 65 | 67 |
| 66 } // namespace device | 68 } // namespace device |
| OLD | NEW |