OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
6 | 6 |
7 #include "content/browser/browser_main_loop.h" | 7 #include "content/browser/browser_main_loop.h" |
8 #include "content/common/media/media_stream_messages.h" | 8 #include "content/common/media/media_stream_messages.h" |
9 #include "content/common/media/media_stream_options.h" | 9 #include "content/common/media/media_stream_options.h" |
10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 MediaStreamDispatcherHost::MediaStreamDispatcherHost( | 14 MediaStreamDispatcherHost::MediaStreamDispatcherHost( |
15 int render_process_id, | 15 int render_process_id, |
16 ResourceContext* resource_context, | 16 ResourceContext* resource_context, |
17 MediaStreamManager* media_stream_manager) | 17 MediaStreamManager* media_stream_manager) |
18 : render_process_id_(render_process_id), | 18 : BrowserMessageFilter(MediaStreamMsgStart), |
| 19 render_process_id_(render_process_id), |
19 resource_context_(resource_context), | 20 resource_context_(resource_context), |
20 media_stream_manager_(media_stream_manager) { | 21 media_stream_manager_(media_stream_manager) { |
21 } | 22 } |
22 | 23 |
23 void MediaStreamDispatcherHost::StreamGenerated( | 24 void MediaStreamDispatcherHost::StreamGenerated( |
24 int render_view_id, | 25 int render_view_id, |
25 int page_request_id, | 26 int page_request_id, |
26 const std::string& label, | 27 const std::string& label, |
27 const StreamDeviceInfoArray& audio_devices, | 28 const StreamDeviceInfoArray& audio_devices, |
28 const StreamDeviceInfoArray& video_devices) { | 29 const StreamDeviceInfoArray& video_devices) { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 int render_view_id, | 207 int render_view_id, |
207 const std::string& label) { | 208 const std::string& label) { |
208 DVLOG(1) << "MediaStreamDispatcherHost::OnCloseDevice(" | 209 DVLOG(1) << "MediaStreamDispatcherHost::OnCloseDevice(" |
209 << render_view_id << ", " | 210 << render_view_id << ", " |
210 << label << ")"; | 211 << label << ")"; |
211 | 212 |
212 media_stream_manager_->CancelRequest(label); | 213 media_stream_manager_->CancelRequest(label); |
213 } | 214 } |
214 | 215 |
215 } // namespace content | 216 } // namespace content |
OLD | NEW |