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

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

Issue 17381007: EME: ProxyDecryptor creates MediaKeys instead of Decryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 "webkit/renderer/media/crypto/ppapi_decryptor.h" 5 #include "webkit/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_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 void PpapiDecryptor::CancelKeyRequest(const std::string& key_system, 102 void PpapiDecryptor::CancelKeyRequest(const std::string& key_system,
103 const std::string& session_id) { 103 const std::string& session_id) {
104 DVLOG(2) << "CancelKeyRequest()"; 104 DVLOG(2) << "CancelKeyRequest()";
105 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 105 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
106 106
107 if (!plugin_cdm_delegate_->CancelKeyRequest(session_id)) 107 if (!plugin_cdm_delegate_->CancelKeyRequest(session_id))
108 ReportFailureToCallPlugin(key_system, session_id); 108 ReportFailureToCallPlugin(key_system, session_id);
109 } 109 }
110 110
111 media::MediaKeys* PpapiDecryptor::GetMediaKeys() { 111 media::Decryptor* PpapiDecryptor::GetDecryptor() {
112 return this; 112 return this;
113 } 113 }
114 114
115 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, 115 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type,
116 const NewKeyCB& new_key_cb) { 116 const NewKeyCB& new_key_cb) {
117 switch (stream_type) { 117 switch (stream_type) {
118 case kAudio: 118 case kAudio:
119 new_audio_key_cb_ = new_key_cb; 119 new_audio_key_cb_ = new_key_cb;
120 break; 120 break;
121 case kVideo: 121 case kVideo:
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 const std::string& session_id, 289 const std::string& session_id,
290 const std::string& type, 290 const std::string& type,
291 scoped_ptr<uint8[]> init_data, 291 scoped_ptr<uint8[]> init_data,
292 int init_data_size) { 292 int init_data_size) {
293 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); 293 DCHECK(render_loop_proxy_->BelongsToCurrentThread());
294 need_key_cb_.Run(key_system, session_id, type, 294 need_key_cb_.Run(key_system, session_id, type,
295 init_data.Pass(), init_data_size); 295 init_data.Pass(), init_data_size);
296 } 296 }
297 297
298 } // namespace webkit_media 298 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698