| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "media/base/cdm_key_information.h" | 8 #include "media/base/cdm_key_information.h" |
| 9 #include "media/base/key_systems.h" | 9 #include "media/base/key_systems.h" |
| 10 #include "media/cdm/aes_decryptor.h" | 10 #include "media/cdm/aes_decryptor.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 void MojoCdmService::GetDecryptor( | 131 void MojoCdmService::GetDecryptor( |
| 132 mojo::InterfaceRequest<mojo::Decryptor> decryptor) { | 132 mojo::InterfaceRequest<mojo::Decryptor> decryptor) { |
| 133 NOTIMPLEMENTED(); | 133 NOTIMPLEMENTED(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 CdmContext* MojoCdmService::GetCdmContext() { | 136 CdmContext* MojoCdmService::GetCdmContext() { |
| 137 return cdm_->GetCdmContext(); | 137 return cdm_->GetCdmContext(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void MojoCdmService::set_connection_error_handler( |
| 141 const base::Closure& error_handler) { |
| 142 binding_.set_connection_error_handler(error_handler); |
| 143 } |
| 144 |
| 140 void MojoCdmService::OnSessionMessage(const std::string& session_id, | 145 void MojoCdmService::OnSessionMessage(const std::string& session_id, |
| 141 MediaKeys::MessageType message_type, | 146 MediaKeys::MessageType message_type, |
| 142 const std::vector<uint8_t>& message, | 147 const std::vector<uint8_t>& message, |
| 143 const GURL& legacy_destination_url) { | 148 const GURL& legacy_destination_url) { |
| 144 DVLOG(2) << __FUNCTION__; | 149 DVLOG(2) << __FUNCTION__; |
| 145 client_->OnSessionMessage(session_id, | 150 client_->OnSessionMessage(session_id, |
| 146 static_cast<mojo::CdmMessageType>(message_type), | 151 static_cast<mojo::CdmMessageType>(message_type), |
| 147 mojo::Array<uint8_t>::From(message), | 152 mojo::Array<uint8_t>::From(message), |
| 148 mojo::String::From(legacy_destination_url)); | 153 mojo::String::From(legacy_destination_url)); |
| 149 } | 154 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 176 MediaKeys::Exception exception, | 181 MediaKeys::Exception exception, |
| 177 uint32_t system_code, | 182 uint32_t system_code, |
| 178 const std::string& error_message) { | 183 const std::string& error_message) { |
| 179 DVLOG(2) << __FUNCTION__; | 184 DVLOG(2) << __FUNCTION__; |
| 180 client_->OnLegacySessionError(session_id, | 185 client_->OnLegacySessionError(session_id, |
| 181 static_cast<mojo::CdmException>(exception), | 186 static_cast<mojo::CdmException>(exception), |
| 182 system_code, error_message); | 187 system_code, error_message); |
| 183 } | 188 } |
| 184 | 189 |
| 185 } // namespace media | 190 } // namespace media |
| OLD | NEW |