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

Unified Diff: components/cdm/browser/cdm_message_filter_android.cc

Issue 320383005: Add an IPC to return the platform supported key-system names in Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed xhwang's comments. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cdm/browser/cdm_message_filter_android.h ('k') | components/cdm/common/cdm_messages_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ccea5fe872664e245b6c409ae46b83f846bbbabf 100644
--- a/components/cdm/browser/cdm_message_filter_android.cc
+++ b/components/cdm/browser/cdm_message_filter_android.cc
@@ -5,6 +5,7 @@
#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"
@@ -73,8 +74,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_QueryKeySystemSupport,
+ OnQueryKeySystemSupport)
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetPlatformKeySystemNames,
+ OnGetPlatformKeySystemNames)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -83,11 +86,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_QueryKeySystemSupport::ID)
*thread = BrowserThread::FILE;
}
-void CdmMessageFilterAndroid::OnGetSupportedKeySystems(
+void CdmMessageFilterAndroid::OnQueryKeySystemSupport(
const SupportedKeySystemRequest& request,
SupportedKeySystemResponse* response) {
if (!response) {
@@ -110,4 +113,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
« no previous file with comments | « components/cdm/browser/cdm_message_filter_android.h ('k') | components/cdm/common/cdm_messages_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698