OLD | NEW |
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 namespace { |
| 11 const uint32 kFilteredMessageClasses[] = { |
| 12 PeerConnectionTrackerMsgStart, |
| 13 }; |
| 14 } // namespace |
10 | 15 |
11 PeerConnectionTrackerHost::PeerConnectionTrackerHost(int render_process_id) | 16 PeerConnectionTrackerHost::PeerConnectionTrackerHost(int render_process_id) |
12 : render_process_id_(render_process_id) {} | 17 : BrowserMessageFilter( |
| 18 kFilteredMessageClasses, arraysize(kFilteredMessageClasses)), |
| 19 render_process_id_(render_process_id) {} |
13 | 20 |
14 bool PeerConnectionTrackerHost::OnMessageReceived(const IPC::Message& message, | 21 bool PeerConnectionTrackerHost::OnMessageReceived(const IPC::Message& message, |
15 bool* message_was_ok) { | 22 bool* message_was_ok) { |
16 bool handled = true; | 23 bool handled = true; |
17 | 24 |
18 IPC_BEGIN_MESSAGE_MAP_EX(PeerConnectionTrackerHost, message, *message_was_ok) | 25 IPC_BEGIN_MESSAGE_MAP_EX(PeerConnectionTrackerHost, message, *message_was_ok) |
19 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_AddPeerConnection, | 26 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_AddPeerConnection, |
20 OnAddPeerConnection) | 27 OnAddPeerConnection) |
21 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_RemovePeerConnection, | 28 IPC_MESSAGE_HANDLER(PeerConnectionTrackerHost_RemovePeerConnection, |
22 OnRemovePeerConnection) | 29 OnRemovePeerConnection) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 WebRTCInternals::GetInstance()->OnGetUserMedia(render_process_id_, | 83 WebRTCInternals::GetInstance()->OnGetUserMedia(render_process_id_, |
77 peer_pid(), | 84 peer_pid(), |
78 origin, | 85 origin, |
79 audio, | 86 audio, |
80 video, | 87 video, |
81 audio_constraints, | 88 audio_constraints, |
82 video_constraints); | 89 video_constraints); |
83 } | 90 } |
84 | 91 |
85 } // namespace content | 92 } // namespace content |
OLD | NEW |