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

Side by Side Diff: components/cdm/browser/cdm_message_filter_android.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/cdm/browser/cdm_message_filter_android.h" 5 #include "components/cdm/browser/cdm_message_filter_android.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "components/cdm/common/cdm_messages_android.h" 9 #include "components/cdm/common/cdm_messages_android.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 return supported_codecs; 65 return supported_codecs;
66 } 66 }
67 67
68 CdmMessageFilterAndroid::CdmMessageFilterAndroid() 68 CdmMessageFilterAndroid::CdmMessageFilterAndroid()
69 : BrowserMessageFilter(EncryptedMediaMsgStart) {} 69 : BrowserMessageFilter(EncryptedMediaMsgStart) {}
70 70
71 CdmMessageFilterAndroid::~CdmMessageFilterAndroid() {} 71 CdmMessageFilterAndroid::~CdmMessageFilterAndroid() {}
72 72
73 bool CdmMessageFilterAndroid::OnMessageReceived( 73 bool CdmMessageFilterAndroid::OnMessageReceived(const IPC::Message& message) {
74 const IPC::Message& message, bool* message_was_ok) {
75 bool handled = true; 74 bool handled = true;
76 IPC_BEGIN_MESSAGE_MAP_EX( 75 IPC_BEGIN_MESSAGE_MAP(CdmMessageFilterAndroid, message)
77 CdmMessageFilterAndroid, message, *message_was_ok)
78 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetSupportedKeySystems, 76 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_GetSupportedKeySystems,
79 OnGetSupportedKeySystems) 77 OnGetSupportedKeySystems)
80 IPC_MESSAGE_UNHANDLED(handled = false) 78 IPC_MESSAGE_UNHANDLED(handled = false)
81 IPC_END_MESSAGE_MAP_EX() 79 IPC_END_MESSAGE_MAP()
82 return handled; 80 return handled;
83 } 81 }
84 82
85 void CdmMessageFilterAndroid::OverrideThreadForMessage( 83 void CdmMessageFilterAndroid::OverrideThreadForMessage(
86 const IPC::Message& message, BrowserThread::ID* thread) { 84 const IPC::Message& message, BrowserThread::ID* thread) {
87 // Move the IPC handling to FILE thread as it is not very cheap. 85 // Move the IPC handling to FILE thread as it is not very cheap.
88 if (message.type() == ChromeViewHostMsg_GetSupportedKeySystems::ID) 86 if (message.type() == ChromeViewHostMsg_GetSupportedKeySystems::ID)
89 *thread = BrowserThread::FILE; 87 *thread = BrowserThread::FILE;
90 } 88 }
91 89
(...skipping 14 matching lines...) Expand all
106 return; 104 return;
107 105
108 DCHECK(request.codecs & content::EME_CODEC_ALL) << "unrecognized codec"; 106 DCHECK(request.codecs & content::EME_CODEC_ALL) << "unrecognized codec";
109 response->key_system = request.key_system; 107 response->key_system = request.key_system;
110 // TODO(qinmin): check composition is supported or not. 108 // TODO(qinmin): check composition is supported or not.
111 response->compositing_codecs = GetSupportedCodecs(request, true); 109 response->compositing_codecs = GetSupportedCodecs(request, true);
112 response->non_compositing_codecs = GetSupportedCodecs(request, false); 110 response->non_compositing_codecs = GetSupportedCodecs(request, false);
113 } 111 }
114 112
115 } // namespace cdm 113 } // namespace cdm
OLDNEW
« no previous file with comments | « components/cdm/browser/cdm_message_filter_android.h ('k') | components/nacl/browser/nacl_host_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698