Chromium Code Reviews| 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1513 void RenderProcessHostImpl::DisableAecDump() { | 1513 void RenderProcessHostImpl::DisableAecDump() { |
| 1514 // Posting on the FILE thread and then replying back on the UI thread is only | 1514 // Posting on the FILE thread and then replying back on the UI thread is only |
| 1515 // for avoiding races between enable and disable. Nothing is done on the FILE | 1515 // for avoiding races between enable and disable. Nothing is done on the FILE |
| 1516 // thread. | 1516 // thread. |
| 1517 BrowserThread::PostTaskAndReply( | 1517 BrowserThread::PostTaskAndReply( |
| 1518 BrowserThread::FILE, FROM_HERE, | 1518 BrowserThread::FILE, FROM_HERE, |
| 1519 base::Bind(&DisableAecDumpOnFileThread), | 1519 base::Bind(&DisableAecDumpOnFileThread), |
| 1520 base::Bind(&RenderProcessHostImpl::SendDisableAecDumpToRenderer, | 1520 base::Bind(&RenderProcessHostImpl::SendDisableAecDumpToRenderer, |
| 1521 weak_factory_.GetWeakPtr())); | 1521 weak_factory_.GetWeakPtr())); |
| 1522 } | 1522 } |
| 1523 | |
| 1524 void RenderProcessHostImpl::SetWebRtcLogMessageCallback( | |
| 1525 base::Callback<void(const std::string&)> callback) { | |
| 1526 DCHECK(webrtc_log_message_callback_.is_null()); | |
| 1527 webrtc_log_message_callback_ = callback; | |
| 1528 } | |
| 1529 | |
| 1530 void RenderProcessHostImpl::WebRtcLogMessage(const std::string& message) { | |
| 1531 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | |
| 1532 if (!webrtc_log_message_callback_.is_null()) { | |
| 1533 BrowserThread::PostTask(BrowserThread::IO, | |
| 1534 FROM_HERE, | |
| 1535 base::Bind(webrtc_log_message_callback_, message)); | |
|
jam
2014/01/17 05:47:44
how do we guarantee that the callback is valid on
vrk (LEFT CHROMIUM)
2014/01/22 02:25:42
OK, yeah that makes sense. Moved the thread hop to
| |
| 1536 }; | |
| 1537 } | |
| 1523 #endif | 1538 #endif |
| 1524 | 1539 |
| 1525 IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { | 1540 IPC::ChannelProxy* RenderProcessHostImpl::GetChannel() { |
| 1526 return channel_.get(); | 1541 return channel_.get(); |
| 1527 } | 1542 } |
| 1528 | 1543 |
| 1529 void RenderProcessHostImpl::AddFilter(BrowserMessageFilter* filter) { | 1544 void RenderProcessHostImpl::AddFilter(BrowserMessageFilter* filter) { |
| 1530 channel_->AddFilter(filter->GetFilter()); | 1545 channel_->AddFilter(filter->GetFilter()); |
| 1531 } | 1546 } |
| 1532 | 1547 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2026 return; | 2041 return; |
| 2027 Send(new MediaStreamMsg_EnableAecDump(file_for_transit)); | 2042 Send(new MediaStreamMsg_EnableAecDump(file_for_transit)); |
| 2028 } | 2043 } |
| 2029 | 2044 |
| 2030 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { | 2045 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { |
| 2031 Send(new MediaStreamMsg_DisableAecDump()); | 2046 Send(new MediaStreamMsg_DisableAecDump()); |
| 2032 } | 2047 } |
| 2033 #endif | 2048 #endif |
| 2034 | 2049 |
| 2035 } // namespace content | 2050 } // namespace content |
| OLD | NEW |