Chromium Code Reviews| Index: components/cdm/browser/cdm_message_filter_android.cc |
| diff --git a/components/cdm/browser/cdm_message_filter_android.cc b/components/cdm/browser/cdm_message_filter_android.cc |
| index 2bda86078edf434c9f5dc759f716cb77ad7f2ab1..337d09863eddc962168ff81ac9c0b17a24a89c5d 100644 |
| --- a/components/cdm/browser/cdm_message_filter_android.cc |
| +++ b/components/cdm/browser/cdm_message_filter_android.cc |
| @@ -5,12 +5,15 @@ |
| #include "components/cdm/browser/cdm_message_filter_android.h" |
| #include <string> |
| +#include <vector> |
| #include "components/cdm/common/cdm_messages_android.h" |
| #include "ipc/ipc_message_macros.h" |
| #include "media/base/android/media_codec_bridge.h" |
| #include "media/base/android/media_drm_bridge.h" |
| +#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
|
ddorwin
2014/06/11 01:54:01
you can remove this now.
ycheo (away)
2014/06/11 07:43:43
Done.
|
| + |
| using content::BrowserThread; |
| using content::SupportedCodecs; |
| using media::MediaCodecBridge; |
| @@ -73,8 +76,10 @@ CdmMessageFilterAndroid::~CdmMessageFilterAndroid() {} |
| bool CdmMessageFilterAndroid::OnMessageReceived(const IPC::Message& message) { |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(CdmMessageFilterAndroid, message) |
| - IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetSupportedKeySystems, |
| - OnGetSupportedKeySystems) |
| + IPC_MESSAGE_HANDLER(ChromeViewHostMsg_QueryKeySystemInfo, |
| + OnQueryKeySystemInfo) |
| + IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetPlatformKeySystemNames, |
| + OnGetPlatformKeySystemNames) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| return handled; |
| @@ -83,11 +88,11 @@ bool CdmMessageFilterAndroid::OnMessageReceived(const IPC::Message& message) { |
| void CdmMessageFilterAndroid::OverrideThreadForMessage( |
| const IPC::Message& message, BrowserThread::ID* thread) { |
| // Move the IPC handling to FILE thread as it is not very cheap. |
| - if (message.type() == ChromeViewHostMsg_GetSupportedKeySystems::ID) |
| + if (message.type() == ChromeViewHostMsg_QueryKeySystemInfo::ID) |
| *thread = BrowserThread::FILE; |
| } |
| -void CdmMessageFilterAndroid::OnGetSupportedKeySystems( |
| +void CdmMessageFilterAndroid::OnQueryKeySystemInfo( |
| const SupportedKeySystemRequest& request, |
| SupportedKeySystemResponse* response) { |
| if (!response) { |
| @@ -110,4 +115,9 @@ void CdmMessageFilterAndroid::OnGetSupportedKeySystems( |
| response->non_compositing_codecs = GetSupportedCodecs(request, false); |
| } |
| +void CdmMessageFilterAndroid::OnGetPlatformKeySystemNames( |
| + std::vector<std::string>* key_systems) { |
| + *key_systems = MediaDrmBridge::GetPlatformKeySystemNames(); |
| +} |
| + |
| } // namespace cdm |