Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 | 204 |
| 205 #if defined(ENABLE_WEBRTC) | 205 #if defined(ENABLE_WEBRTC) |
| 206 #include "content/browser/media/webrtc_internals.h" | 206 #include "content/browser/media/webrtc_internals.h" |
| 207 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" | 207 #include "content/browser/renderer_host/media/media_stream_track_metrics_host.h" |
| 208 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 208 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
| 209 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" | 209 #include "content/browser/renderer_host/p2p/socket_dispatcher_host.h" |
| 210 #include "content/common/media/aec_dump_messages.h" | 210 #include "content/common/media/aec_dump_messages.h" |
| 211 #include "content/common/media/media_stream_messages.h" | 211 #include "content/common/media/media_stream_messages.h" |
| 212 #endif | 212 #endif |
| 213 | 213 |
| 214 #if defined(OS_WIN) | |
| 215 #define IntToStringType base::IntToString16 | |
| 216 #else | |
| 217 #define IntToStringType base::IntToString | |
| 218 #endif | |
| 219 | |
| 214 extern bool g_exited_main_message_loop; | 220 extern bool g_exited_main_message_loop; |
| 215 | 221 |
| 216 namespace content { | 222 namespace content { |
| 217 namespace { | 223 namespace { |
| 218 | 224 |
| 219 const char kSiteProcessMapKeyName[] = "content_site_process_map"; | 225 const char kSiteProcessMapKeyName[] = "content_site_process_map"; |
| 220 | 226 |
| 227 const base::FilePath::CharType kAecDumpFileNameAddition[] = | |
| 228 FILE_PATH_LITERAL("aec_dump"); | |
| 229 | |
| 221 void CacheShaderInfo(int32 id, base::FilePath path) { | 230 void CacheShaderInfo(int32 id, base::FilePath path) { |
| 222 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); | 231 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); |
| 223 } | 232 } |
| 224 | 233 |
| 225 void RemoveShaderInfo(int32 id) { | 234 void RemoveShaderInfo(int32 id) { |
| 226 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); | 235 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); |
| 227 } | 236 } |
| 228 | 237 |
| 229 net::URLRequestContext* GetRequestContext( | 238 net::URLRequestContext* GetRequestContext( |
| 230 scoped_refptr<net::URLRequestContextGetter> request_context, | 239 scoped_refptr<net::URLRequestContextGetter> request_context, |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 784 storage_partition_impl_->GetAppCacheService(), | 793 storage_partition_impl_->GetAppCacheService(), |
| 785 ChromeBlobStorageContext::GetFor(browser_context), | 794 ChromeBlobStorageContext::GetFor(browser_context), |
| 786 storage_partition_impl_->GetFileSystemContext(), | 795 storage_partition_impl_->GetFileSystemContext(), |
| 787 storage_partition_impl_->GetServiceWorkerContext(), | 796 storage_partition_impl_->GetServiceWorkerContext(), |
| 788 storage_partition_impl_->GetHostZoomLevelContext(), | 797 storage_partition_impl_->GetHostZoomLevelContext(), |
| 789 get_contexts_callback); | 798 get_contexts_callback); |
| 790 | 799 |
| 791 AddFilter(resource_message_filter); | 800 AddFilter(resource_message_filter); |
| 792 MediaStreamManager* media_stream_manager = | 801 MediaStreamManager* media_stream_manager = |
| 793 BrowserMainLoop::GetInstance()->media_stream_manager(); | 802 BrowserMainLoop::GetInstance()->media_stream_manager(); |
| 794 AddFilter(new AudioInputRendererHost( | 803 // The AudioInputRendererHost and AudioRendererHost needs to be available for |
| 804 // lookup, so it's stashed in a member variable. | |
| 805 audio_input_renderer_host_ = new AudioInputRendererHost( | |
| 795 GetID(), | 806 GetID(), |
| 807 base::GetProcId(GetHandle()), | |
| 796 audio_manager, | 808 audio_manager, |
| 797 media_stream_manager, | 809 media_stream_manager, |
| 798 AudioMirroringManager::GetInstance(), | 810 AudioMirroringManager::GetInstance(), |
| 799 BrowserMainLoop::GetInstance()->user_input_monitor())); | 811 BrowserMainLoop::GetInstance()->user_input_monitor()); |
| 800 // The AudioRendererHost needs to be available for lookup, so it's | 812 AddFilter(audio_input_renderer_host_.get()); |
| 801 // stashed in a member variable. | |
| 802 audio_renderer_host_ = new AudioRendererHost( | 813 audio_renderer_host_ = new AudioRendererHost( |
| 803 GetID(), | 814 GetID(), |
| 804 audio_manager, | 815 audio_manager, |
| 805 AudioMirroringManager::GetInstance(), | 816 AudioMirroringManager::GetInstance(), |
| 806 media_internals, | 817 media_internals, |
| 807 media_stream_manager, | 818 media_stream_manager, |
| 808 browser_context->GetResourceContext()->GetMediaDeviceIDSalt()); | 819 browser_context->GetResourceContext()->GetMediaDeviceIDSalt()); |
| 809 AddFilter(audio_renderer_host_.get()); | 820 AddFilter(audio_renderer_host_.get()); |
| 810 AddFilter( | 821 AddFilter( |
| 811 new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager())); | 822 new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_manager())); |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1598 tracked_objects::ThreadData::Status status = | 1609 tracked_objects::ThreadData::Status status = |
| 1599 tracked_objects::ThreadData::status(); | 1610 tracked_objects::ThreadData::status(); |
| 1600 Send(new ChildProcessMsg_SetProfilerStatus(status)); | 1611 Send(new ChildProcessMsg_SetProfilerStatus(status)); |
| 1601 | 1612 |
| 1602 #if defined(OS_MACOSX) && !defined(OS_IOS) | 1613 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 1603 io_surface_manager_token_ = | 1614 io_surface_manager_token_ = |
| 1604 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( | 1615 BrowserIOSurfaceManager::GetInstance()->GenerateChildProcessToken( |
| 1605 GetID()); | 1616 GetID()); |
| 1606 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); | 1617 Send(new ChildProcessMsg_SetIOSurfaceManagerToken(io_surface_manager_token_)); |
| 1607 #endif | 1618 #endif |
| 1619 | |
| 1620 // Inform AudioInputRendererHost about the new render process PID. | |
| 1621 // AudioInputRendererHost is reference counted, so it's lifetime is | |
| 1622 // guarantueed during the lifetime of the closure. | |
| 1623 BrowserThread::PostTask( | |
| 1624 BrowserThread::IO, FROM_HERE, | |
| 1625 base::Bind(&AudioInputRendererHost::set_renderer_pid, | |
|
tommi (sloooow) - chröme
2015/08/31 17:19:07
when this happens, does the AudioInputRendererHost
Henrik Grunell
2015/09/04 12:37:37
No, if this happens the previous channel has been
| |
| 1626 audio_input_renderer_host_, | |
| 1627 peer_pid)); | |
| 1608 } | 1628 } |
| 1609 | 1629 |
| 1610 void RenderProcessHostImpl::OnChannelError() { | 1630 void RenderProcessHostImpl::OnChannelError() { |
| 1611 ProcessDied(true /* already_dead */, nullptr); | 1631 ProcessDied(true /* already_dead */, nullptr); |
| 1612 } | 1632 } |
| 1613 | 1633 |
| 1614 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { | 1634 void RenderProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { |
| 1615 // Message de-serialization failed. We consider this a capital crime. Kill the | 1635 // Message de-serialization failed. We consider this a capital crime. Kill the |
| 1616 // renderer if we have one. | 1636 // renderer if we have one. |
| 1617 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; | 1637 LOG(ERROR) << "bad message " << message.type() << " terminating renderer."; |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1753 | 1773 |
| 1754 void RenderProcessHostImpl::ResumeRequestsForView(int route_id) { | 1774 void RenderProcessHostImpl::ResumeRequestsForView(int route_id) { |
| 1755 widget_helper_->ResumeRequestsForView(route_id); | 1775 widget_helper_->ResumeRequestsForView(route_id); |
| 1756 } | 1776 } |
| 1757 | 1777 |
| 1758 void RenderProcessHostImpl::FilterURL(bool empty_allowed, GURL* url) { | 1778 void RenderProcessHostImpl::FilterURL(bool empty_allowed, GURL* url) { |
| 1759 FilterURL(this, empty_allowed, url); | 1779 FilterURL(this, empty_allowed, url); |
| 1760 } | 1780 } |
| 1761 | 1781 |
| 1762 #if defined(ENABLE_WEBRTC) | 1782 #if defined(ENABLE_WEBRTC) |
| 1763 void RenderProcessHostImpl::EnableAecDump(const base::FilePath& file) { | 1783 void RenderProcessHostImpl::EnableAudioDebugRecordings( |
| 1784 const base::FilePath& file) { | |
| 1764 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1785 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1786 | |
| 1765 // Enable AEC dump for each registered consumer. | 1787 // Enable AEC dump for each registered consumer. |
| 1788 base::FilePath file_with_extensions = | |
| 1789 GetAecDumpFilePathWithExtensions(file); | |
| 1766 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); | 1790 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); |
| 1767 it != aec_dump_consumers_.end(); ++it) { | 1791 it != aec_dump_consumers_.end(); ++it) { |
| 1768 EnableAecDumpForId(file, *it); | 1792 EnableAecDumpForId(file_with_extensions, *it); |
| 1769 } | 1793 } |
| 1794 | |
| 1795 // Enable mic input recording. AudioInputRendererHost is reference counted, so | |
| 1796 // it's lifetime is guarantueed during the lifetime of the closure. | |
| 1797 BrowserThread::PostTask( | |
| 1798 BrowserThread::IO, FROM_HERE, | |
| 1799 base::Bind(&AudioInputRendererHost::EnableDebugRecording, | |
| 1800 audio_input_renderer_host_, | |
| 1801 file)); | |
| 1770 } | 1802 } |
| 1771 | 1803 |
| 1772 void RenderProcessHostImpl::DisableAecDump() { | 1804 void RenderProcessHostImpl::DisableAudioDebugRecordings() { |
| 1773 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1805 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 1806 | |
| 1774 // Posting on the FILE thread and then replying back on the UI thread is only | 1807 // Posting on the FILE thread and then replying back on the UI thread is only |
| 1775 // for avoiding races between enable and disable. Nothing is done on the FILE | 1808 // for avoiding races between enable and disable. Nothing is done on the FILE |
| 1776 // thread. | 1809 // thread. |
| 1777 BrowserThread::PostTaskAndReply( | 1810 BrowserThread::PostTaskAndReply( |
| 1778 BrowserThread::FILE, FROM_HERE, | 1811 BrowserThread::FILE, FROM_HERE, |
| 1779 base::Bind(&DisableAecDumpOnFileThread), | 1812 base::Bind(&DisableAecDumpOnFileThread), |
| 1780 base::Bind(&RenderProcessHostImpl::SendDisableAecDumpToRenderer, | 1813 base::Bind(&RenderProcessHostImpl::SendDisableAecDumpToRenderer, |
| 1781 weak_factory_.GetWeakPtr())); | 1814 weak_factory_.GetWeakPtr())); |
| 1815 | |
| 1816 // AudioInputRendererHost is reference counted, so it's lifetime is | |
| 1817 // guarantueed during the lifetime of the closure. | |
|
tommi (sloooow) - chröme
2015/08/31 17:19:07
guaranteed
Henrik Grunell
2015/09/04 12:37:37
Done.
| |
| 1818 BrowserThread::PostTask( | |
| 1819 BrowserThread::IO, FROM_HERE, | |
| 1820 base::Bind( | |
| 1821 &AudioInputRendererHost::DisableDebugRecording, | |
| 1822 audio_input_renderer_host_)); | |
| 1782 } | 1823 } |
| 1783 | 1824 |
| 1784 void RenderProcessHostImpl::SetWebRtcLogMessageCallback( | 1825 void RenderProcessHostImpl::SetWebRtcLogMessageCallback( |
| 1785 base::Callback<void(const std::string&)> callback) { | 1826 base::Callback<void(const std::string&)> callback) { |
| 1786 webrtc_log_message_callback_ = callback; | 1827 webrtc_log_message_callback_ = callback; |
| 1787 } | 1828 } |
| 1788 | 1829 |
| 1789 RenderProcessHostImpl::WebRtcStopRtpDumpCallback | 1830 RenderProcessHostImpl::WebRtcStopRtpDumpCallback |
| 1790 RenderProcessHostImpl::StartRtpDump( | 1831 RenderProcessHostImpl::StartRtpDump( |
| 1791 bool incoming, | 1832 bool incoming, |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2375 Send(queued_messages_.front()); | 2416 Send(queued_messages_.front()); |
| 2376 queued_messages_.pop(); | 2417 queued_messages_.pop(); |
| 2377 } | 2418 } |
| 2378 | 2419 |
| 2379 #if defined(ENABLE_WEBRTC) | 2420 #if defined(ENABLE_WEBRTC) |
| 2380 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 | 2421 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/465841 |
| 2381 // is fixed. | 2422 // is fixed. |
| 2382 tracked_objects::ScopedTracker tracking_profile7( | 2423 tracked_objects::ScopedTracker tracking_profile7( |
| 2383 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 2424 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 2384 "465841 RenderProcessHostImpl::OnProcessLaunched::EnableAec")); | 2425 "465841 RenderProcessHostImpl::OnProcessLaunched::EnableAec")); |
| 2385 if (WebRTCInternals::GetInstance()->aec_dump_enabled()) | 2426 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) { |
| 2386 EnableAecDump(WebRTCInternals::GetInstance()->aec_dump_file_path()); | 2427 EnableAudioDebugRecordings( |
| 2428 WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath()); | |
| 2429 } | |
| 2387 #endif | 2430 #endif |
| 2388 } | 2431 } |
| 2389 | 2432 |
| 2390 void RenderProcessHostImpl::OnProcessLaunchFailed() { | 2433 void RenderProcessHostImpl::OnProcessLaunchFailed() { |
| 2391 // If this object will be destructed soon, then observers have already been | 2434 // If this object will be destructed soon, then observers have already been |
| 2392 // sent a RenderProcessHostDestroyed notification, and we must observe our | 2435 // sent a RenderProcessHostDestroyed notification, and we must observe our |
| 2393 // contract that says that will be the last call. | 2436 // contract that says that will be the last call. |
| 2394 if (deleting_soon_) | 2437 if (deleting_soon_) |
| 2395 return; | 2438 return; |
| 2396 | 2439 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2455 FROM_HERE, | 2498 FROM_HERE, |
| 2456 base::Bind( | 2499 base::Bind( |
| 2457 &RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread, | 2500 &RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread, |
| 2458 weak_factory_.GetWeakPtr(), | 2501 weak_factory_.GetWeakPtr(), |
| 2459 id)); | 2502 id)); |
| 2460 } | 2503 } |
| 2461 | 2504 |
| 2462 void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) { | 2505 void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) { |
| 2463 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2506 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2464 aec_dump_consumers_.push_back(id); | 2507 aec_dump_consumers_.push_back(id); |
| 2465 if (WebRTCInternals::GetInstance()->aec_dump_enabled()) { | 2508 |
| 2466 EnableAecDumpForId(WebRTCInternals::GetInstance()->aec_dump_file_path(), | 2509 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) { |
| 2467 id); | 2510 base::FilePath file_with_extensions = GetAecDumpFilePathWithExtensions( |
| 2511 WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath()); | |
| 2512 EnableAecDumpForId(file_with_extensions, id); | |
| 2468 } | 2513 } |
| 2469 } | 2514 } |
| 2470 | 2515 |
| 2471 void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) { | 2516 void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) { |
| 2472 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2517 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2473 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); | 2518 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); |
| 2474 it != aec_dump_consumers_.end(); ++it) { | 2519 it != aec_dump_consumers_.end(); ++it) { |
| 2475 if (*it == id) { | 2520 if (*it == id) { |
| 2476 aec_dump_consumers_.erase(it); | 2521 aec_dump_consumers_.erase(it); |
| 2477 break; | 2522 break; |
| 2478 } | 2523 } |
| 2479 } | 2524 } |
| 2480 } | 2525 } |
| 2481 | 2526 |
| 2482 #if defined(OS_WIN) | |
| 2483 #define IntToStringType base::IntToString16 | |
| 2484 #else | |
| 2485 #define IntToStringType base::IntToString | |
| 2486 #endif | |
| 2487 | |
| 2488 void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file, | 2527 void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file, |
| 2489 int id) { | 2528 int id) { |
| 2490 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2529 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2491 base::FilePath unique_file = | |
| 2492 file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) | |
| 2493 .AddExtension(IntToStringType(id)); | |
| 2494 BrowserThread::PostTaskAndReplyWithResult( | 2530 BrowserThread::PostTaskAndReplyWithResult( |
| 2495 BrowserThread::FILE, FROM_HERE, | 2531 BrowserThread::FILE, FROM_HERE, |
| 2496 base::Bind(&CreateAecDumpFileForProcess, unique_file, GetHandle()), | 2532 base::Bind(&CreateAecDumpFileForProcess, |
| 2533 file.AddExtension(IntToStringType(id)), | |
| 2534 GetHandle()), | |
| 2497 base::Bind(&RenderProcessHostImpl::SendAecDumpFileToRenderer, | 2535 base::Bind(&RenderProcessHostImpl::SendAecDumpFileToRenderer, |
| 2498 weak_factory_.GetWeakPtr(), | 2536 weak_factory_.GetWeakPtr(), |
| 2499 id)); | 2537 id)); |
| 2500 } | 2538 } |
| 2501 | 2539 |
| 2502 #undef IntToStringType | |
| 2503 | |
| 2504 void RenderProcessHostImpl::SendAecDumpFileToRenderer( | 2540 void RenderProcessHostImpl::SendAecDumpFileToRenderer( |
| 2505 int id, | 2541 int id, |
| 2506 IPC::PlatformFileForTransit file_for_transit) { | 2542 IPC::PlatformFileForTransit file_for_transit) { |
| 2507 if (file_for_transit == IPC::InvalidPlatformFileForTransit()) | 2543 if (file_for_transit == IPC::InvalidPlatformFileForTransit()) |
| 2508 return; | 2544 return; |
| 2509 Send(new AecDumpMsg_EnableAecDump(id, file_for_transit)); | 2545 Send(new AecDumpMsg_EnableAecDump(id, file_for_transit)); |
| 2510 } | 2546 } |
| 2511 | 2547 |
| 2512 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { | 2548 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { |
| 2513 Send(new AecDumpMsg_DisableAecDump()); | 2549 Send(new AecDumpMsg_DisableAecDump()); |
| 2514 } | 2550 } |
| 2515 #endif | 2551 |
| 2552 base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions( | |
| 2553 const base::FilePath& file) { | |
| 2554 return file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) | |
| 2555 .AddExtension(kAecDumpFileNameAddition); | |
| 2556 } | |
| 2557 #endif // defined(ENABLE_WEBRTC) | |
| 2516 | 2558 |
| 2517 void RenderProcessHostImpl::IncrementWorkerRefCount() { | 2559 void RenderProcessHostImpl::IncrementWorkerRefCount() { |
| 2518 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2560 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2519 ++worker_ref_count_; | 2561 ++worker_ref_count_; |
| 2520 if (worker_ref_count_ > max_worker_count_) | 2562 if (worker_ref_count_ > max_worker_count_) |
| 2521 max_worker_count_ = worker_ref_count_; | 2563 max_worker_count_ = worker_ref_count_; |
| 2522 } | 2564 } |
| 2523 | 2565 |
| 2524 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2566 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2525 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2567 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2526 DCHECK_GT(worker_ref_count_, 0); | 2568 DCHECK_GT(worker_ref_count_, 0); |
| 2527 --worker_ref_count_; | 2569 --worker_ref_count_; |
| 2528 if (worker_ref_count_ == 0) | 2570 if (worker_ref_count_ == 0) |
| 2529 Cleanup(); | 2571 Cleanup(); |
| 2530 } | 2572 } |
| 2531 | 2573 |
| 2532 void RenderProcessHostImpl::GetAudioOutputControllers( | 2574 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2533 const GetAudioOutputControllersCallback& callback) const { | 2575 const GetAudioOutputControllersCallback& callback) const { |
| 2534 audio_renderer_host()->GetOutputControllers(callback); | 2576 audio_renderer_host()->GetOutputControllers(callback); |
| 2535 } | 2577 } |
| 2536 | 2578 |
| 2537 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2579 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2538 return bluetooth_dispatcher_host_.get(); | 2580 return bluetooth_dispatcher_host_.get(); |
| 2539 } | 2581 } |
| 2540 | 2582 |
| 2541 } // namespace content | 2583 } // namespace content |
| OLD | NEW |