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

Side by Side Diff: webkit/media/crypto/ppapi_decryptor.cc

Issue 10822026: Implement "Key Presence" step in "Encrypted Block Encounted" algorithm in EME. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/media/crypto/ppapi_decryptor.h ('k') | webkit/media/crypto/proxy_decryptor.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/media/crypto/ppapi_decryptor.h" 5 #include "webkit/media/crypto/ppapi_decryptor.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/decoder_buffer.h" 8 #include "media/base/decoder_buffer.h"
9 #include "media/base/decryptor_client.h" 9 #include "media/base/decryptor_client.h"
10 #include "webkit/media/crypto/key_systems.h" 10 #include "webkit/media/crypto/key_systems.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const DecryptCB& decrypt_cb) { 60 const DecryptCB& decrypt_cb) {
61 DCHECK(cdm_plugin_); 61 DCHECK(cdm_plugin_);
62 // TODO(xhwang): Enable the following once we have updated PluginInstance. 62 // TODO(xhwang): Enable the following once we have updated PluginInstance.
63 // TODO(xhwang): Need to figure out thread safety about PPP calls. 63 // TODO(xhwang): Need to figure out thread safety about PPP calls.
64 // if (!cdm_plugin_->Decrypt( 64 // if (!cdm_plugin_->Decrypt(
65 // encrypted, base::Bind(&PpapiDecryptor::DataReady, this, decrypt_cb))) { 65 // encrypted, base::Bind(&PpapiDecryptor::DataReady, this, decrypt_cb))) {
66 // decrypt_cb.Run(kError, NULL); 66 // decrypt_cb.Run(kError, NULL);
67 // } 67 // }
68 } 68 }
69 69
70 void PpapiDecryptor::Stop() {
71 }
72
70 void PpapiDecryptor::DataReady(const DecryptCB& decrypt_cb, 73 void PpapiDecryptor::DataReady(const DecryptCB& decrypt_cb,
71 const uint8* data, int data_size ) { 74 const uint8* data, int data_size ) {
72 DCHECK(!decrypt_cb.is_null()); 75 DCHECK(!decrypt_cb.is_null());
73 scoped_refptr<media::DecoderBuffer> decrypted_data = 76 scoped_refptr<media::DecoderBuffer> decrypted_data =
74 media::DecoderBuffer::CopyFrom(data, data_size); 77 media::DecoderBuffer::CopyFrom(data, data_size);
75 decrypt_cb.Run(kSuccess, decrypted_data); 78 decrypt_cb.Run(kSuccess, decrypted_data);
76 } 79 }
77 80
78 } // namespace webkit_media 81 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/crypto/ppapi_decryptor.h ('k') | webkit/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698