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

Unified Diff: chrome/browser/media/encrypted_media_message_filter_android.cc

Issue 142923005: Allow MessageFilters to restrict listening to specific message classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK valid message class OR special message type Created 6 years, 10 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
Index: chrome/browser/media/encrypted_media_message_filter_android.cc
diff --git a/chrome/browser/media/encrypted_media_message_filter_android.cc b/chrome/browser/media/encrypted_media_message_filter_android.cc
index 968f9b9f301ca1d976c961b9d30fed94ccc7a260..13b55c685bdcebeae574b59748d23d104764477b 100644
--- a/chrome/browser/media/encrypted_media_message_filter_android.cc
+++ b/chrome/browser/media/encrypted_media_message_filter_android.cc
@@ -16,6 +16,11 @@ using media::MediaCodecBridge;
using media::MediaDrmBridge;
namespace chrome {
+namespace {
+const uint32 kFilteredMessageClasses[] = {
+ EncryptedMediaMsgStart,
+};
+} // namespace
// Check whether the available codecs are supported.
static android::SupportedCodecs GetSupportedCodecs(
@@ -45,7 +50,9 @@ static android::SupportedCodecs GetSupportedCodecs(
return supported_codecs;
}
-EncryptedMediaMessageFilterAndroid::EncryptedMediaMessageFilterAndroid() {}
+EncryptedMediaMessageFilterAndroid::EncryptedMediaMessageFilterAndroid()
+ : BrowserMessageFilter(
+ kFilteredMessageClasses, arraysize(kFilteredMessageClasses)) {}
EncryptedMediaMessageFilterAndroid::~EncryptedMediaMessageFilterAndroid() {}

Powered by Google App Engine
This is Rietveld 408576698