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 "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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 } | 178 } |
| 179 | 179 |
| 180 media::CdmContext* PpapiDecryptor::GetCdmContext() { | 180 media::CdmContext* PpapiDecryptor::GetCdmContext() { |
| 181 return this; | 181 return this; |
| 182 } | 182 } |
| 183 | 183 |
| 184 media::Decryptor* PpapiDecryptor::GetDecryptor() { | 184 media::Decryptor* PpapiDecryptor::GetDecryptor() { |
| 185 return this; | 185 return this; |
| 186 } | 186 } |
| 187 | 187 |
| 188 int PpapiDecryptor::GetCdmId() const { | |
| 189 return kInvalidCdmId; | |
|
ddorwin
2015/01/05 22:59:05
Should this be NOTREACHED()?
xhwang
2015/03/17 23:40:28
Maybe, but that's very implementation dependent (e
| |
| 190 } | |
| 191 | |
| 188 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, | 192 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, |
| 189 const NewKeyCB& new_key_cb) { | 193 const NewKeyCB& new_key_cb) { |
| 190 if (!render_loop_proxy_->BelongsToCurrentThread()) { | 194 if (!render_loop_proxy_->BelongsToCurrentThread()) { |
| 191 render_loop_proxy_->PostTask(FROM_HERE, | 195 render_loop_proxy_->PostTask(FROM_HERE, |
| 192 base::Bind(&PpapiDecryptor::RegisterNewKeyCB, | 196 base::Bind(&PpapiDecryptor::RegisterNewKeyCB, |
| 193 weak_ptr_factory_.GetWeakPtr(), | 197 weak_ptr_factory_.GetWeakPtr(), |
| 194 stream_type, | 198 stream_type, |
| 195 new_key_cb)); | 199 new_key_cb)); |
| 196 return; | 200 return; |
| 197 } | 201 } |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 438 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 442 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 439 pepper_cdm_wrapper_.reset(); | 443 pepper_cdm_wrapper_.reset(); |
| 440 } | 444 } |
| 441 | 445 |
| 442 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { | 446 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { |
| 443 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 447 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 444 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; | 448 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; |
| 445 } | 449 } |
| 446 | 450 |
| 447 } // namespace content | 451 } // namespace content |
| OLD | NEW |