Chromium Code Reviews| 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 "media/cdm/ppapi/cdm_adapter.h" | 5 #include "media/cdm/ppapi/cdm_adapter.h" |
| 6 | 6 |
| 7 #include "media/base/limits.h" | 7 #include "media/base/limits.h" |
| 8 #include "media/cdm/ppapi/cdm_file_io_impl.h" | 8 #include "media/cdm/ppapi/cdm_file_io_impl.h" |
| 9 #include "media/cdm/ppapi/cdm_helpers.h" | 9 #include "media/cdm/ppapi/cdm_helpers.h" |
| 10 #include "media/cdm/ppapi/cdm_logging.h" | 10 #include "media/cdm/ppapi/cdm_logging.h" |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 711 } | 711 } |
| 712 | 712 |
| 713 // cdm::Host_7 only. | 713 // cdm::Host_7 only. |
| 714 void CdmAdapter::OnSessionMessage(const char* session_id, | 714 void CdmAdapter::OnSessionMessage(const char* session_id, |
| 715 uint32_t session_id_size, | 715 uint32_t session_id_size, |
| 716 cdm::MessageType message_type, | 716 cdm::MessageType message_type, |
| 717 const char* message, | 717 const char* message, |
| 718 uint32_t message_size, | 718 uint32_t message_size, |
| 719 const char* legacy_destination_url, | 719 const char* legacy_destination_url, |
| 720 uint32_t legacy_destination_url_size) { | 720 uint32_t legacy_destination_url_size) { |
| 721 // Only license renewals should specify |legacy_destination_url|. | 721 // License requests should not specify |legacy_destination_url|. |
| 722 // |legacy_destination_url| is not passed to unprefixed EME applications, | 722 // |legacy_destination_url| is not passed to unprefixed EME applications, |
| 723 // so it can be removed when the prefixed API is removed. | 723 // so it can be removed when the prefixed API is removed. |
| 724 PP_DCHECK(legacy_destination_url_size == 0 || | 724 PP_DCHECK(legacy_destination_url_size == 0 || |
| 725 message_type == cdm::MessageType::kLicenseRenewal); | 725 message_type != cdm::MessageType::kLicenseRequest); |
|
ddorwin
2015/01/14 21:11:52
The inverted logic won't automatically catch new t
jrummell
2015/01/14 21:42:37
Acknowledged.
| |
| 726 | 726 |
| 727 PostOnMain(callback_factory_.NewCallback( | 727 PostOnMain(callback_factory_.NewCallback( |
| 728 &CdmAdapter::SendSessionMessageInternal, | 728 &CdmAdapter::SendSessionMessageInternal, |
| 729 SessionMessage( | 729 SessionMessage( |
| 730 std::string(session_id, session_id_size), message_type, message, | 730 std::string(session_id, session_id_size), message_type, message, |
| 731 message_size, | 731 message_size, |
| 732 std::string(legacy_destination_url, legacy_destination_url_size)))); | 732 std::string(legacy_destination_url, legacy_destination_url_size)))); |
| 733 } | 733 } |
| 734 | 734 |
| 735 // cdm::Host_6 only. | 735 // cdm::Host_6 only. |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1388 } // namespace media | 1388 } // namespace media |
| 1389 | 1389 |
| 1390 namespace pp { | 1390 namespace pp { |
| 1391 | 1391 |
| 1392 // Factory function for your specialization of the Module object. | 1392 // Factory function for your specialization of the Module object. |
| 1393 Module* CreateModule() { | 1393 Module* CreateModule() { |
| 1394 return new media::CdmAdapterModule(); | 1394 return new media::CdmAdapterModule(); |
| 1395 } | 1395 } |
| 1396 | 1396 |
| 1397 } // namespace pp | 1397 } // namespace pp |
| OLD | NEW |