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

Side by Side Diff: content/renderer/media/crypto/ppapi_decryptor.cc

Issue 496143002: Update Pepper interface for EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove vector.data() Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/pepper/content_decryptor_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/callback.h" 10 #include "base/callback.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 void PpapiDecryptor::ReleaseSession( 214 void PpapiDecryptor::ReleaseSession(
215 const std::string& web_session_id, 215 const std::string& web_session_id,
216 scoped_ptr<media::SimpleCdmPromise> promise) { 216 scoped_ptr<media::SimpleCdmPromise> promise) {
217 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 217 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
218 218
219 if (!CdmDelegate()) { 219 if (!CdmDelegate()) {
220 promise->reject(INVALID_STATE_ERROR, 0, "CdmDelegate() does not exist."); 220 promise->reject(INVALID_STATE_ERROR, 0, "CdmDelegate() does not exist.");
221 return; 221 return;
222 } 222 }
223 223
224 CdmDelegate()->ReleaseSession(web_session_id, promise.Pass()); 224 CdmDelegate()->CloseSession(web_session_id, promise.Pass());
225 } 225 }
226 226
227 media::Decryptor* PpapiDecryptor::GetDecryptor() { 227 media::Decryptor* PpapiDecryptor::GetDecryptor() {
228 return this; 228 return this;
229 } 229 }
230 230
231 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, 231 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type,
232 const NewKeyCB& new_key_cb) { 232 const NewKeyCB& new_key_cb) {
233 if (!render_loop_proxy_->BelongsToCurrentThread()) { 233 if (!render_loop_proxy_->BelongsToCurrentThread()) {
234 render_loop_proxy_->PostTask(FROM_HERE, 234 render_loop_proxy_->PostTask(FROM_HERE,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 472 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
473 pepper_cdm_wrapper_.reset(); 473 pepper_cdm_wrapper_.reset();
474 } 474 }
475 475
476 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() { 476 ContentDecryptorDelegate* PpapiDecryptor::CdmDelegate() {
477 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 477 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
478 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL; 478 return (pepper_cdm_wrapper_) ? pepper_cdm_wrapper_->GetCdmDelegate() : NULL;
479 } 479 }
480 480
481 } // namespace content 481 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/content_decryptor_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698