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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelEnumerateDevices, | 125 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelEnumerateDevices, |
126 OnCancelEnumerateDevices) | 126 OnCancelEnumerateDevices) |
127 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_OpenDevice, | 127 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_OpenDevice, |
128 OnOpenDevice) | 128 OnOpenDevice) |
129 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CloseDevice, | 129 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CloseDevice, |
130 OnCloseDevice) | 130 OnCloseDevice) |
131 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_SubscribeToDeviceChangeNotifications, | 131 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_SubscribeToDeviceChangeNotifications, |
132 OnSubscribeToDeviceChangeNotifications) | 132 OnSubscribeToDeviceChangeNotifications) |
133 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelDeviceChangeNotifications, | 133 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CancelDeviceChangeNotifications, |
134 OnCancelDeviceChangeNotifications) | 134 OnCancelDeviceChangeNotifications) |
| 135 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_SetCapturingLinkSecured, |
| 136 OnSetCapturingLinkSecured) |
135 IPC_MESSAGE_UNHANDLED(handled = false) | 137 IPC_MESSAGE_UNHANDLED(handled = false) |
136 IPC_END_MESSAGE_MAP() | 138 IPC_END_MESSAGE_MAP() |
137 return handled; | 139 return handled; |
138 } | 140 } |
139 | 141 |
140 void MediaStreamDispatcherHost::OnChannelClosing() { | 142 void MediaStreamDispatcherHost::OnChannelClosing() { |
141 DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing"; | 143 DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing"; |
142 | 144 |
143 // Since the IPC sender is gone, close all requesting/requested streams. | 145 // Since the IPC sender is gone, close all requesting/requested streams. |
144 media_stream_manager_->CancelAllRequests(render_process_id_); | 146 media_stream_manager_->CancelAllRequests(render_process_id_); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 295 |
294 void MediaStreamDispatcherHost::HandleCheckAccessResponse( | 296 void MediaStreamDispatcherHost::HandleCheckAccessResponse( |
295 std::unique_ptr<MediaStreamUIProxy> ui_proxy, | 297 std::unique_ptr<MediaStreamUIProxy> ui_proxy, |
296 int render_frame_id, | 298 int render_frame_id, |
297 bool have_access) { | 299 bool have_access) { |
298 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 300 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
299 if (have_access) | 301 if (have_access) |
300 Send(new MediaStreamMsg_DevicesChanged(render_frame_id)); | 302 Send(new MediaStreamMsg_DevicesChanged(render_frame_id)); |
301 } | 303 } |
302 | 304 |
| 305 void MediaStreamDispatcherHost::OnSetCapturingLinkSecured(int session_id, |
| 306 MediaStreamType type, |
| 307 bool is_secure) { |
| 308 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 309 |
| 310 media_stream_manager_->SetCapturingLinkSecured(render_process_id_, session_id, |
| 311 type, is_secure); |
| 312 } |
| 313 |
303 } // namespace content | 314 } // namespace content |
OLD | NEW |