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/cdm/ppapi/cdm_file_io_impl.h" | 7 #include "media/cdm/ppapi/cdm_file_io_impl.h" |
| 8 #include "media/cdm/ppapi/cdm_helpers.h" | 8 #include "media/cdm/ppapi/cdm_helpers.h" |
| 9 #include "media/cdm/ppapi/cdm_logging.h" | 9 #include "media/cdm/ppapi/cdm_logging.h" |
| 10 #include "media/cdm/ppapi/supported_cdm_versions.h" | 10 #include "media/cdm/ppapi/supported_cdm_versions.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 | 378 |
| 379 cdm_->UpdateSession(promise_id, | 379 cdm_->UpdateSession(promise_id, |
| 380 web_session_id.data(), | 380 web_session_id.data(), |
| 381 web_session_id.length(), | 381 web_session_id.length(), |
| 382 response_ptr, | 382 response_ptr, |
| 383 response_size); | 383 response_size); |
| 384 } | 384 } |
| 385 | 385 |
| 386 void CdmAdapter::ReleaseSession(uint32_t promise_id, | 386 void CdmAdapter::ReleaseSession(uint32_t promise_id, |
| 387 const std::string& web_session_id) { | 387 const std::string& web_session_id) { |
| 388 cdm_->CloseSession( | 388 cdm_->RemoveSession( |
|
ddorwin
2014/08/22 23:59:44
This CL makes a bunch of changes we'll want to und
ddorwin
2014/08/23 00:14:30
As discussed, even after piping everything through
jrummell
2014/08/23 00:27:15
Description updated.
| |
| 389 promise_id, web_session_id.data(), web_session_id.length()); | 389 promise_id, web_session_id.data(), web_session_id.length()); |
| 390 } | 390 } |
| 391 | 391 |
| 392 void CdmAdapter::RemoveSession(uint32_t promise_id, | 392 void CdmAdapter::CloseSession(uint32_t promise_id, |
| 393 const std::string& web_session_id) { | 393 const std::string& web_session_id) { |
| 394 if (!cdm_->RemoveSession( | 394 if (!cdm_->CloseSession( |
| 395 promise_id, web_session_id.data(), web_session_id.length())) { | 395 promise_id, web_session_id.data(), web_session_id.length())) { |
| 396 // CDM_4 and CDM_5 don't support this method, so reject the promise. | 396 // CDM_4 and CDM_5 don't support this method, so reject the promise. |
| 397 RejectPromise(promise_id, cdm::kNotSupportedError, 0, "Not implemented."); | 397 RejectPromise(promise_id, cdm::kNotSupportedError, 0, "Not implemented."); |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 | 400 |
| 401 void CdmAdapter::GetUsableKeyIds(uint32_t promise_id, | 401 void CdmAdapter::GetUsableKeyIds(uint32_t promise_id, |
| 402 const std::string& web_session_id) { | 402 const std::string& web_session_id) { |
| 403 if (!cdm_->GetUsableKeyIds( | 403 if (!cdm_->GetUsableKeyIds( |
| 404 promise_id, web_session_id.data(), web_session_id.length())) { | 404 promise_id, web_session_id.data(), web_session_id.length())) { |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1357 } // namespace media | 1357 } // namespace media |
| 1358 | 1358 |
| 1359 namespace pp { | 1359 namespace pp { |
| 1360 | 1360 |
| 1361 // Factory function for your specialization of the Module object. | 1361 // Factory function for your specialization of the Module object. |
| 1362 Module* CreateModule() { | 1362 Module* CreateModule() { |
| 1363 return new media::CdmAdapterModule(); | 1363 return new media::CdmAdapterModule(); |
| 1364 } | 1364 } |
| 1365 | 1365 |
| 1366 } // namespace pp | 1366 } // namespace pp |
| OLD | NEW |