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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 uint32_t system_code, | 805 uint32_t system_code, |
806 const char* error_message, | 806 const char* error_message, |
807 uint32_t error_message_size) { | 807 uint32_t error_message_size) { |
808 PostOnMain(callback_factory_.NewCallback( | 808 PostOnMain(callback_factory_.NewCallback( |
809 &CdmAdapter::SendSessionErrorInternal, | 809 &CdmAdapter::SendSessionErrorInternal, |
810 std::string(session_id, session_id_size), | 810 std::string(session_id, session_id_size), |
811 SessionError(error, system_code, | 811 SessionError(error, system_code, |
812 std::string(error_message, error_message_size)))); | 812 std::string(error_message, error_message_size)))); |
813 } | 813 } |
814 | 814 |
| 815 // cdm::Host_7 only. |
| 816 void CdmAdapter::OnLegacySessionError(const char* session_id, |
| 817 uint32_t session_id_size, |
| 818 cdm::Error error, |
| 819 uint32_t system_code, |
| 820 const char* error_message, |
| 821 uint32_t error_message_size) { |
| 822 OnSessionError(session_id, session_id_size, error, system_code, error_message, |
| 823 error_message_size); |
| 824 } |
| 825 |
815 // Helpers to pass the event to Pepper. | 826 // Helpers to pass the event to Pepper. |
816 | 827 |
817 void CdmAdapter::SendPromiseResolvedInternal(int32_t result, | 828 void CdmAdapter::SendPromiseResolvedInternal(int32_t result, |
818 uint32_t promise_id) { | 829 uint32_t promise_id) { |
819 PP_DCHECK(result == PP_OK); | 830 PP_DCHECK(result == PP_OK); |
820 pp::ContentDecryptor_Private::PromiseResolved(promise_id); | 831 pp::ContentDecryptor_Private::PromiseResolved(promise_id); |
821 } | 832 } |
822 | 833 |
823 void CdmAdapter::SendPromiseResolvedWithSessionInternal( | 834 void CdmAdapter::SendPromiseResolvedWithSessionInternal( |
824 int32_t result, | 835 int32_t result, |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 } // namespace media | 1366 } // namespace media |
1356 | 1367 |
1357 namespace pp { | 1368 namespace pp { |
1358 | 1369 |
1359 // Factory function for your specialization of the Module object. | 1370 // Factory function for your specialization of the Module object. |
1360 Module* CreateModule() { | 1371 Module* CreateModule() { |
1361 return new media::CdmAdapterModule(); | 1372 return new media::CdmAdapterModule(); |
1362 } | 1373 } |
1363 | 1374 |
1364 } // namespace pp | 1375 } // namespace pp |
OLD | NEW |