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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |