| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 media::CdmContext* PpapiDecryptor::GetCdmContext() { | 188 media::CdmContext* PpapiDecryptor::GetCdmContext() { |
| 189 return this; | 189 return this; |
| 190 } | 190 } |
| 191 | 191 |
| 192 media::Decryptor* PpapiDecryptor::GetDecryptor() { | 192 media::Decryptor* PpapiDecryptor::GetDecryptor() { |
| 193 return this; | 193 return this; |
| 194 } | 194 } |
| 195 | 195 |
| 196 int PpapiDecryptor::GetCdmId() const { |
| 197 return kInvalidCdmId; |
| 198 } |
| 199 |
| 196 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, | 200 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, |
| 197 const NewKeyCB& new_key_cb) { | 201 const NewKeyCB& new_key_cb) { |
| 198 if (!render_loop_proxy_->BelongsToCurrentThread()) { | 202 if (!render_loop_proxy_->BelongsToCurrentThread()) { |
| 199 render_loop_proxy_->PostTask(FROM_HERE, | 203 render_loop_proxy_->PostTask(FROM_HERE, |
| 200 base::Bind(&PpapiDecryptor::RegisterNewKeyCB, | 204 base::Bind(&PpapiDecryptor::RegisterNewKeyCB, |
| 201 weak_ptr_factory_.GetWeakPtr(), | 205 weak_ptr_factory_.GetWeakPtr(), |
| 202 stream_type, | 206 stream_type, |
| 203 new_key_cb)); | 207 new_key_cb)); |
| 204 return; | 208 return; |
| 205 } | 209 } |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 454 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 451 pepper_cdm_wrapper_.reset(); | 455 pepper_cdm_wrapper_.reset(); |
| 452 } | 456 } |
| 453 | 457 |
| 454 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { | 458 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { |
| 455 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 459 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 456 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; | 460 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; |
| 457 } | 461 } |
| 458 | 462 |
| 459 } // namespace content | 463 } // namespace content |
| OLD | NEW |