OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/crypto/ppapi_decryptor.h" | 5 #include "content/renderer/media/crypto/ppapi_decryptor.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 DCHECK(!video_decoder_init_cb_.is_null()); | 381 DCHECK(!video_decoder_init_cb_.is_null()); |
382 base::ResetAndReturn(&video_decoder_init_cb_).Run(success); | 382 base::ResetAndReturn(&video_decoder_init_cb_).Run(success); |
383 break; | 383 break; |
384 default: | 384 default: |
385 NOTREACHED(); | 385 NOTREACHED(); |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 void PpapiDecryptor::OnSessionMessage(const std::string& web_session_id, | 389 void PpapiDecryptor::OnSessionMessage(const std::string& web_session_id, |
390 MessageType message_type, | 390 MessageType message_type, |
391 const std::vector<uint8>& message) { | 391 const std::vector<uint8>& message, |
| 392 const GURL& legacy_destination_url) { |
392 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 393 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
393 session_message_cb_.Run(web_session_id, message_type, message); | 394 session_message_cb_.Run(web_session_id, message_type, message, |
| 395 legacy_destination_url); |
394 } | 396 } |
395 | 397 |
396 void PpapiDecryptor::OnSessionKeysChange(const std::string& web_session_id, | 398 void PpapiDecryptor::OnSessionKeysChange(const std::string& web_session_id, |
397 bool has_additional_usable_key, | 399 bool has_additional_usable_key, |
398 media::CdmKeysInfo keys_info) { | 400 media::CdmKeysInfo keys_info) { |
399 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 401 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
400 | 402 |
401 // TODO(jrummell): Handling resume playback should be done in the media | 403 // TODO(jrummell): Handling resume playback should be done in the media |
402 // player, not in the Decryptors. http://crbug.com/413413. | 404 // player, not in the Decryptors. http://crbug.com/413413. |
403 if (has_additional_usable_key) | 405 if (has_additional_usable_key) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 442 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
441 pepper_cdm_wrapper_.reset(); | 443 pepper_cdm_wrapper_.reset(); |
442 } | 444 } |
443 | 445 |
444 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { | 446 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { |
445 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 447 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
446 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; | 448 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; |
447 } | 449 } |
448 | 450 |
449 } // namespace content | 451 } // namespace content |
OLD | NEW |