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

Side by Side Diff: chrome/browser/media/encrypted_media_message_filter_android.cc

Issue 165333004: Revert "Allow MessageFilters to restrict listening to specific message classes" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
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 "chrome/browser/media/encrypted_media_message_filter_android.h" 5 #include "chrome/browser/media/encrypted_media_message_filter_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/common/encrypted_media_messages_android.h" 9 #include "chrome/common/encrypted_media_messages_android.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 27 matching lines...) Expand all
38 if ((requested_codecs & android::MP4_AVC1) && 38 if ((requested_codecs & android::MP4_AVC1) &&
39 MediaCodecBridge::CanDecode("avc1", !video_must_be_compositable)) { 39 MediaCodecBridge::CanDecode("avc1", !video_must_be_compositable)) {
40 supported_codecs = static_cast<android::SupportedCodecs>( 40 supported_codecs = static_cast<android::SupportedCodecs>(
41 supported_codecs | android::MP4_AVC1); 41 supported_codecs | android::MP4_AVC1);
42 } 42 }
43 #endif // defined(USE_PROPRIETARY_CODECS) 43 #endif // defined(USE_PROPRIETARY_CODECS)
44 44
45 return supported_codecs; 45 return supported_codecs;
46 } 46 }
47 47
48 EncryptedMediaMessageFilterAndroid::EncryptedMediaMessageFilterAndroid() 48 EncryptedMediaMessageFilterAndroid::EncryptedMediaMessageFilterAndroid() {}
49 : BrowserMessageFilter(EncryptedMediaMsgStart) {}
50 49
51 EncryptedMediaMessageFilterAndroid::~EncryptedMediaMessageFilterAndroid() {} 50 EncryptedMediaMessageFilterAndroid::~EncryptedMediaMessageFilterAndroid() {}
52 51
53 bool EncryptedMediaMessageFilterAndroid::OnMessageReceived( 52 bool EncryptedMediaMessageFilterAndroid::OnMessageReceived(
54 const IPC::Message& message, bool* message_was_ok) { 53 const IPC::Message& message, bool* message_was_ok) {
55 bool handled = true; 54 bool handled = true;
56 IPC_BEGIN_MESSAGE_MAP_EX( 55 IPC_BEGIN_MESSAGE_MAP_EX(
57 EncryptedMediaMessageFilterAndroid, message, *message_was_ok) 56 EncryptedMediaMessageFilterAndroid, message, *message_was_ok)
58 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetSupportedKeySystems, 57 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetSupportedKeySystems,
59 OnGetSupportedKeySystems) 58 OnGetSupportedKeySystems)
(...skipping 23 matching lines...) Expand all
83 DCHECK_EQ(request.codecs >> 3, 0) << "unrecognized codec"; 82 DCHECK_EQ(request.codecs >> 3, 0) << "unrecognized codec";
84 response->uuid = request.uuid; 83 response->uuid = request.uuid;
85 // TODO(qinmin): check composition is supported or not. 84 // TODO(qinmin): check composition is supported or not.
86 response->compositing_codecs = 85 response->compositing_codecs =
87 GetSupportedCodecs(request.codecs, true); 86 GetSupportedCodecs(request.codecs, true);
88 response->non_compositing_codecs = 87 response->non_compositing_codecs =
89 GetSupportedCodecs(request.codecs, false); 88 GetSupportedCodecs(request.codecs, false);
90 } 89 }
91 90
92 } // namespace chrome 91 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/media/cast_transport_host_filter.cc ('k') | chrome/browser/media/webrtc_logging_handler_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698