OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/mojo/services/mojo_cdm_service.h" | 5 #include "media/mojo/services/mojo_cdm_service.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 mojo::Array<uint8_t>::From(message), legacy_destination_url); | 230 mojo::Array<uint8_t>::From(message), legacy_destination_url); |
231 } | 231 } |
232 | 232 |
233 void MojoCdmService::OnSessionKeysChange(const std::string& session_id, | 233 void MojoCdmService::OnSessionKeysChange(const std::string& session_id, |
234 bool has_additional_usable_key, | 234 bool has_additional_usable_key, |
235 CdmKeysInfo keys_info) { | 235 CdmKeysInfo keys_info) { |
236 DVLOG(2) << __FUNCTION__ | 236 DVLOG(2) << __FUNCTION__ |
237 << " has_additional_usable_key=" << has_additional_usable_key; | 237 << " has_additional_usable_key=" << has_additional_usable_key; |
238 | 238 |
239 mojo::Array<mojom::CdmKeyInformationPtr> keys_data; | 239 mojo::Array<mojom::CdmKeyInformationPtr> keys_data; |
240 for (const auto& key : keys_info) | 240 for (auto* key : keys_info) |
241 keys_data.push_back(mojom::CdmKeyInformation::From(*key)); | 241 keys_data.push_back(mojom::CdmKeyInformation::From(*key)); |
242 client_->OnSessionKeysChange(session_id, has_additional_usable_key, | 242 client_->OnSessionKeysChange(session_id, has_additional_usable_key, |
243 std::move(keys_data)); | 243 std::move(keys_data)); |
244 } | 244 } |
245 | 245 |
246 void MojoCdmService::OnSessionExpirationUpdate( | 246 void MojoCdmService::OnSessionExpirationUpdate( |
247 const std::string& session_id, | 247 const std::string& session_id, |
248 const base::Time& new_expiry_time_sec) { | 248 const base::Time& new_expiry_time_sec) { |
249 DVLOG(2) << __FUNCTION__ << " expiry=" << new_expiry_time_sec; | 249 DVLOG(2) << __FUNCTION__ << " expiry=" << new_expiry_time_sec; |
250 client_->OnSessionExpirationUpdate(session_id, | 250 client_->OnSessionExpirationUpdate(session_id, |
(...skipping 17 matching lines...) Expand all Loading... |
268 | 268 |
269 void MojoCdmService::OnDecryptorConnectionError() { | 269 void MojoCdmService::OnDecryptorConnectionError() { |
270 DVLOG(2) << __FUNCTION__; | 270 DVLOG(2) << __FUNCTION__; |
271 | 271 |
272 // MojoDecryptorService has lost connectivity to it's client, so it can be | 272 // MojoDecryptorService has lost connectivity to it's client, so it can be |
273 // freed. | 273 // freed. |
274 decryptor_.reset(); | 274 decryptor_.reset(); |
275 } | 275 } |
276 | 276 |
277 } // namespace media | 277 } // namespace media |
OLD | NEW |