| 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/browser/child_process_security_policy_impl.h" | 8 #include "content/browser/child_process_security_policy_impl.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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CloseDevice, | 110 IPC_MESSAGE_HANDLER(MediaStreamHostMsg_CloseDevice, |
| 111 OnCloseDevice) | 111 OnCloseDevice) |
| 112 IPC_MESSAGE_UNHANDLED(handled = false) | 112 IPC_MESSAGE_UNHANDLED(handled = false) |
| 113 IPC_END_MESSAGE_MAP() | 113 IPC_END_MESSAGE_MAP() |
| 114 return handled; | 114 return handled; |
| 115 } | 115 } |
| 116 | 116 |
| 117 void MediaStreamDispatcherHost::OnChannelClosing() { | 117 void MediaStreamDispatcherHost::OnChannelClosing() { |
| 118 DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing"; | 118 DVLOG(1) << "MediaStreamDispatcherHost::OnChannelClosing"; |
| 119 | 119 |
| 120 // Since the IPC channel is gone, close all requesting/requested streams. | 120 // Since the IPC sender is gone, close all requesting/requested streams. |
| 121 media_stream_manager_->CancelAllRequests(render_process_id_); | 121 media_stream_manager_->CancelAllRequests(render_process_id_); |
| 122 } | 122 } |
| 123 | 123 |
| 124 MediaStreamDispatcherHost::~MediaStreamDispatcherHost() { | 124 MediaStreamDispatcherHost::~MediaStreamDispatcherHost() { |
| 125 } | 125 } |
| 126 | 126 |
| 127 void MediaStreamDispatcherHost::OnGenerateStream( | 127 void MediaStreamDispatcherHost::OnGenerateStream( |
| 128 int render_view_id, | 128 int render_view_id, |
| 129 int page_request_id, | 129 int page_request_id, |
| 130 const StreamOptions& components, | 130 const StreamOptions& components, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL( | 238 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL( |
| 239 render_process_id_, url)) { | 239 render_process_id_, url)) { |
| 240 LOG(ERROR) << "MSDH: Renderer requested a URL it's not allowed to use."; | 240 LOG(ERROR) << "MSDH: Renderer requested a URL it's not allowed to use."; |
| 241 return false; | 241 return false; |
| 242 } | 242 } |
| 243 | 243 |
| 244 return true; | 244 return true; |
| 245 } | 245 } |
| 246 | 246 |
| 247 } // namespace content | 247 } // namespace content |
| OLD | NEW |