Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: media/filters/decrypting_video_decoder.cc

Issue 416333011: Allow setContentDecryptionModule() to get called when setting is done. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + android tweaks Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/decrypting_video_decoder.h ('k') | media/filters/decrypting_video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decrypting_video_decoder.cc
diff --git a/media/filters/decrypting_video_decoder.cc b/media/filters/decrypting_video_decoder.cc
index 2651c5da7404031a82f2453a542f737f7f48ab04..421ec07fa89f8cc1e7ed7bba552ce4fa8d2368e8 100644
--- a/media/filters/decrypting_video_decoder.cc
+++ b/media/filters/decrypting_video_decoder.cc
@@ -146,7 +146,9 @@ DecryptingVideoDecoder::~DecryptingVideoDecoder() {
base::ResetAndReturn(&reset_cb_).Run();
}
-void DecryptingVideoDecoder::SetDecryptor(Decryptor* decryptor) {
+void DecryptingVideoDecoder::SetDecryptor(
+ Decryptor* decryptor,
+ const DecryptorAttachedCB& decryptor_attached_cb) {
DVLOG(2) << "SetDecryptor()";
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_EQ(state_, kDecryptorRequested) << state_;
@@ -157,6 +159,7 @@ void DecryptingVideoDecoder::SetDecryptor(Decryptor* decryptor) {
if (!decryptor) {
base::ResetAndReturn(&init_cb_).Run(DECODER_ERROR_NOT_SUPPORTED);
state_ = kError;
+ decryptor_attached_cb.Run(false);
return;
}
@@ -167,6 +170,7 @@ void DecryptingVideoDecoder::SetDecryptor(Decryptor* decryptor) {
config_,
BindToCurrentLoop(base::Bind(
&DecryptingVideoDecoder::FinishInitialization, weak_this_)));
+ decryptor_attached_cb.Run(true);
}
void DecryptingVideoDecoder::FinishInitialization(bool success) {
« no previous file with comments | « media/filters/decrypting_video_decoder.h ('k') | media/filters/decrypting_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698