| 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 "content/renderer/media/crypto/proxy_decryptor.h" | 5 #include "content/renderer/media/crypto/proxy_decryptor.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/renderer/media/crypto/content_decryption_module_factory.h" | 10 #include "content/renderer/media/crypto/content_decryption_module_factory.h" |
| 11 #if defined(OS_ANDROID) | 11 #if defined(OS_ANDROID) |
| 12 #include "content/renderer/media/android/renderer_media_player_manager.h" | 12 #include "content/renderer/media/android/renderer_media_player_manager.h" |
| 13 #endif // defined(OS_ANDROID) | 13 #endif // defined(OS_ANDROID) |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 #if defined(ENABLE_PEPPER_CDMS) | 17 #if defined(ENABLE_PEPPER_CDMS) |
| 18 void ProxyDecryptor::DestroyHelperPlugin() { | 18 void ProxyDecryptor::DestroyHelperPlugin() { |
| 19 ContentDecryptionModuleFactory::DestroyHelperPlugin( | 19 ContentDecryptionModuleFactory::DestroyHelperPlugin( |
| 20 web_media_player_client_, web_frame_); | 20 web_media_player_client_, web_frame_); |
| 21 } | 21 } |
| 22 #endif // defined(ENABLE_PEPPER_CDMS) | 22 #endif // defined(ENABLE_PEPPER_CDMS) |
| 23 | 23 |
| 24 ProxyDecryptor::ProxyDecryptor( | 24 ProxyDecryptor::ProxyDecryptor( |
| 25 #if defined(ENABLE_PEPPER_CDMS) | 25 #if defined(ENABLE_PEPPER_CDMS) |
| 26 WebKit::WebMediaPlayerClient* web_media_player_client, | 26 blink::WebMediaPlayerClient* web_media_player_client, |
| 27 WebKit::WebFrame* web_frame, | 27 blink::WebFrame* web_frame, |
| 28 #elif defined(OS_ANDROID) | 28 #elif defined(OS_ANDROID) |
| 29 RendererMediaPlayerManager* manager, | 29 RendererMediaPlayerManager* manager, |
| 30 int media_keys_id, | 30 int media_keys_id, |
| 31 #endif // defined(ENABLE_PEPPER_CDMS) | 31 #endif // defined(ENABLE_PEPPER_CDMS) |
| 32 const media::KeyAddedCB& key_added_cb, | 32 const media::KeyAddedCB& key_added_cb, |
| 33 const media::KeyErrorCB& key_error_cb, | 33 const media::KeyErrorCB& key_error_cb, |
| 34 const media::KeyMessageCB& key_message_cb) | 34 const media::KeyMessageCB& key_message_cb) |
| 35 : weak_ptr_factory_(this), | 35 : weak_ptr_factory_(this), |
| 36 #if defined(ENABLE_PEPPER_CDMS) | 36 #if defined(ENABLE_PEPPER_CDMS) |
| 37 web_media_player_client_(web_media_player_client), | 37 web_media_player_client_(web_media_player_client), |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 key_error_cb_.Run(session_id, error_code, system_code); | 153 key_error_cb_.Run(session_id, error_code, system_code); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void ProxyDecryptor::KeyMessage(const std::string& session_id, | 156 void ProxyDecryptor::KeyMessage(const std::string& session_id, |
| 157 const std::vector<uint8>& message, | 157 const std::vector<uint8>& message, |
| 158 const std::string& default_url) { | 158 const std::string& default_url) { |
| 159 key_message_cb_.Run(session_id, message, default_url); | 159 key_message_cb_.Run(session_id, message, default_url); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace content | 162 } // namespace content |
| OLD | NEW |