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

Side by Side Diff: content/browser/renderer_host/media/peer_connection_tracker_host.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" 4 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h"
5 5
6 #include "content/browser/media/webrtc_internals.h" 6 #include "content/browser/media/webrtc_internals.h"
7 #include "content/common/media/peer_connection_tracker_messages.h" 7 #include "content/common/media/peer_connection_tracker_messages.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 PeerConnectionTrackerHost::PeerConnectionTrackerHost(int render_process_id) 11 PeerConnectionTrackerHost::PeerConnectionTrackerHost(int render_process_id)
12 : BrowserMessageFilter(PeerConnectionTrackerMsgStart), 12 : BrowserMessageFilter(PeerConnectionTrackerMsgStart),
13 render_process_id_(render_process_id) {} 13 render_process_id_(render_process_id) {}
14 14
15 bool PeerConnectionTrackerHost::OnMessageReceived(const IPC::Message& message, 15 bool PeerConnectionTrackerHost::OnMessageReceived(const IPC::Message& message) {
16 bool* message_was_ok) {
17 bool handled = true; 16 bool handled = true;
18 17
19 IPC_BEGIN_MESSAGE_MAP_EX(PeerConnectionTrackerHost, message, *message_was_ok) 18 IPC_BEGIN_MESSAGE_MAP(PeerConnectionTrackerHost, message)
20 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_AddPeerConnection, 19 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_AddPeerConnection,
21 OnAddPeerConnection) 20 OnAddPeerConnection)
22 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_RemovePeerConnection, 21 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_RemovePeerConnection,
23 OnRemovePeerConnection) 22 OnRemovePeerConnection)
24 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_UpdatePeerConnection, 23 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_UpdatePeerConnection,
25 OnUpdatePeerConnection) 24 OnUpdatePeerConnection)
26 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_AddStats, OnAddStats) 25 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_AddStats, OnAddStats)
27 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_GetUserMedia, OnGetUserMedia) 26 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_GetUserMedia, OnGetUserMedia)
28 IPC_MESSAGE_UNHANDLED(handled = false) 27 IPC_MESSAGE_UNHANDLED(handled = false)
29 IPC_END_MESSAGE_MAP_EX() 28 IPC_END_MESSAGE_MAP()
30 return handled; 29 return handled;
31 } 30 }
32 31
33 void PeerConnectionTrackerHost::OverrideThreadForMessage( 32 void PeerConnectionTrackerHost::OverrideThreadForMessage(
34 const IPC::Message& message, BrowserThread::ID* thread) { 33 const IPC::Message& message, BrowserThread::ID* thread) {
35 if (IPC_MESSAGE_CLASS(message) == PeerConnectionTrackerMsgStart) 34 if (IPC_MESSAGE_CLASS(message) == PeerConnectionTrackerMsgStart)
36 *thread = BrowserThread::UI; 35 *thread = BrowserThread::UI;
37 } 36 }
38 37
39 PeerConnectionTrackerHost::~PeerConnectionTrackerHost() { 38 PeerConnectionTrackerHost::~PeerConnectionTrackerHost() {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 WebRTCInternals::GetInstance()->OnGetUserMedia(render_process_id_, 76 WebRTCInternals::GetInstance()->OnGetUserMedia(render_process_id_,
78 peer_pid(), 77 peer_pid(),
79 origin, 78 origin,
80 audio, 79 audio,
81 video, 80 video,
82 audio_constraints, 81 audio_constraints,
83 video_constraints); 82 video_constraints);
84 } 83 }
85 84
86 } // namespace content 85 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698