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

Side by Side Diff: content/browser/renderer_host/media/media_stream_dispatcher_host.cc

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 2 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) 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/browser/renderer_host/media/web_contents_capture_util.h" 8 #include "content/browser/renderer_host/media/web_contents_capture_util.h"
9 #include "content/common/media/media_stream_messages.h" 9 #include "content/common/media/media_stream_messages.h"
10 #include "content/common/media/media_stream_options.h" 10 #include "content/common/media/media_stream_options.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_EnumerateDevices, 118 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_EnumerateDevices,
119 OnEnumerateDevices) 119 OnEnumerateDevices)
120 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_OpenDevice, 120 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_OpenDevice,
121 OnOpenDevice) 121 OnOpenDevice)
122 IPC_MESSAGE_UNHANDLED(handled = false) 122 IPC_MESSAGE_UNHANDLED(handled = false)
123 IPC_END_MESSAGE_MAP_EX() 123 IPC_END_MESSAGE_MAP_EX()
124 return handled; 124 return handled;
125 } 125 }
126 126
127 void MediaStreamDispatcherHost::OnChannelClosing() { 127 void MediaStreamDispatcherHost::OnChannelClosing() {
128 BrowserMessageFilter::OnChannelClosing();
129 DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing"; 128 DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing";
130 129
131 // Since the IPC channel is gone, close all requesting/requested streams. 130 // Since the IPC channel is gone, close all requesting/requested streams.
132 for (StreamMap::iterator it = streams_.begin(); 131 for (StreamMap::iterator it = streams_.begin();
133 it != streams_.end(); 132 it != streams_.end();
134 ++it) { 133 ++it) {
135 std::string label = it->first; 134 std::string label = it->first;
136 media_stream_manager_->StopGeneratedStream(label); 135 media_stream_manager_->StopGeneratedStream(label);
137 } 136 }
138 // Clear the map after we have stopped all the streams. 137 // Clear the map after we have stopped all the streams.
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 << security_origin.spec() << ")"; 225 << security_origin.spec() << ")";
227 226
228 const std::string& label = media_stream_manager_->OpenDevice( 227 const std::string& label = media_stream_manager_->OpenDevice(
229 this, render_process_id_, render_view_id, page_request_id, 228 this, render_process_id_, render_view_id, page_request_id,
230 device_id, type, security_origin); 229 device_id, type, security_origin);
231 DCHECK(!label.empty()); 230 DCHECK(!label.empty());
232 streams_[label] = StreamRequest(render_view_id, page_request_id); 231 streams_[label] = StreamRequest(render_view_id, page_request_id);
233 } 232 }
234 233
235 } // namespace content 234 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/device_request_message_filter.cc ('k') | content/browser/renderer_host/media/midi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698