| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 void PpapiDecryptor::CancelKeyRequest(const std::string& session_id) { | 121 void PpapiDecryptor::CancelKeyRequest(const std::string& session_id) { |
| 122 DVLOG(2) << "CancelKeyRequest()"; | 122 DVLOG(2) << "CancelKeyRequest()"; |
| 123 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 123 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 124 | 124 |
| 125 if (!plugin_cdm_delegate_->CancelKeyRequest(session_id)) | 125 if (!plugin_cdm_delegate_->CancelKeyRequest(session_id)) |
| 126 ReportFailureToCallPlugin(session_id); | 126 ReportFailureToCallPlugin(session_id); |
| 127 } | 127 } |
| 128 | 128 |
| 129 media::MediaKeys* PpapiDecryptor::GetMediaKeys() { | 129 media::Decryptor* PpapiDecryptor::GetDecryptor() { |
| 130 return this; | 130 return this; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, | 133 void PpapiDecryptor::RegisterNewKeyCB(StreamType stream_type, |
| 134 const NewKeyCB& new_key_cb) { | 134 const NewKeyCB& new_key_cb) { |
| 135 switch (stream_type) { | 135 switch (stream_type) { |
| 136 case kAudio: | 136 case kAudio: |
| 137 new_audio_key_cb_ = new_key_cb; | 137 new_audio_key_cb_ = new_key_cb; |
| 138 break; | 138 break; |
| 139 case kVideo: | 139 case kVideo: |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 void PpapiDecryptor::NeedKey(const std::string& session_id, | 302 void PpapiDecryptor::NeedKey(const std::string& session_id, |
| 303 const std::string& type, | 303 const std::string& type, |
| 304 scoped_ptr<uint8[]> init_data, | 304 scoped_ptr<uint8[]> init_data, |
| 305 int init_data_size) { | 305 int init_data_size) { |
| 306 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); | 306 DCHECK(render_loop_proxy_->BelongsToCurrentThread()); |
| 307 need_key_cb_.Run(session_id, type, init_data.Pass(), init_data_size); | 307 need_key_cb_.Run(session_id, type, init_data.Pass(), init_data_size); |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace webkit_media | 310 } // namespace webkit_media |
| OLD | NEW |