| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 #endif | 239 #endif |
| 240 | 240 |
| 241 namespace content { | 241 namespace content { |
| 242 namespace { | 242 namespace { |
| 243 | 243 |
| 244 const char kSiteProcessMapKeyName[] = "content_site_process_map"; | 244 const char kSiteProcessMapKeyName[] = "content_site_process_map"; |
| 245 | 245 |
| 246 #ifdef ENABLE_WEBRTC | 246 #ifdef ENABLE_WEBRTC |
| 247 const base::FilePath::CharType kAecDumpFileNameAddition[] = | 247 const base::FilePath::CharType kAecDumpFileNameAddition[] = |
| 248 FILE_PATH_LITERAL("aec_dump"); | 248 FILE_PATH_LITERAL("aec_dump"); |
| 249 const base::FilePath::CharType kEventLogFileNameAddition[] = | |
| 250 FILE_PATH_LITERAL("event_log"); | |
| 251 #endif | 249 #endif |
| 252 | 250 |
| 253 void CacheShaderInfo(int32_t id, base::FilePath path) { | 251 void CacheShaderInfo(int32_t id, base::FilePath path) { |
| 254 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); | 252 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); |
| 255 } | 253 } |
| 256 | 254 |
| 257 void RemoveShaderInfo(int32_t id) { | 255 void RemoveShaderInfo(int32_t id) { |
| 258 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); | 256 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); |
| 259 } | 257 } |
| 260 | 258 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()), | 560 id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()), |
| 563 browser_context_(browser_context), | 561 browser_context_(browser_context), |
| 564 storage_partition_impl_(storage_partition_impl), | 562 storage_partition_impl_(storage_partition_impl), |
| 565 sudden_termination_allowed_(true), | 563 sudden_termination_allowed_(true), |
| 566 ignore_input_events_(false), | 564 ignore_input_events_(false), |
| 567 is_for_guests_only_(is_for_guests_only), | 565 is_for_guests_only_(is_for_guests_only), |
| 568 gpu_observer_registered_(false), | 566 gpu_observer_registered_(false), |
| 569 delayed_cleanup_needed_(false), | 567 delayed_cleanup_needed_(false), |
| 570 within_process_died_observer_(false), | 568 within_process_died_observer_(false), |
| 571 power_monitor_broadcaster_(this), | 569 power_monitor_broadcaster_(this), |
| 570 #if defined(ENABLE_WEBRTC) |
| 571 webrtc_eventlog_host_(id_), |
| 572 #endif |
| 572 worker_ref_count_(0), | 573 worker_ref_count_(0), |
| 573 max_worker_count_(0), | 574 max_worker_count_(0), |
| 574 permission_service_context_(new PermissionServiceContext(this)), | 575 permission_service_context_(new PermissionServiceContext(this)), |
| 575 channel_connected_(false), | 576 channel_connected_(false), |
| 576 sent_render_process_ready_(false), | 577 sent_render_process_ready_(false), |
| 577 #if defined(OS_ANDROID) | 578 #if defined(OS_ANDROID) |
| 578 never_signaled_(true, false), | 579 never_signaled_(true, false), |
| 579 #endif | 580 #endif |
| 580 weak_factory_(this) { | 581 weak_factory_(this) { |
| 581 widget_helper_ = new RenderWidgetHelper(); | 582 widget_helper_ = new RenderWidgetHelper(); |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 storage_partition_impl_->GetDOMStorageContext())); | 930 storage_partition_impl_->GetDOMStorageContext())); |
| 930 AddFilter(new IndexedDBDispatcherHost( | 931 AddFilter(new IndexedDBDispatcherHost( |
| 931 GetID(), storage_partition_impl_->GetURLRequestContext(), | 932 GetID(), storage_partition_impl_->GetURLRequestContext(), |
| 932 storage_partition_impl_->GetIndexedDBContext(), | 933 storage_partition_impl_->GetIndexedDBContext(), |
| 933 blob_storage_context.get())); | 934 blob_storage_context.get())); |
| 934 | 935 |
| 935 #if defined(ENABLE_WEBRTC) | 936 #if defined(ENABLE_WEBRTC) |
| 936 AddFilter(new WebRTCIdentityServiceHost( | 937 AddFilter(new WebRTCIdentityServiceHost( |
| 937 GetID(), storage_partition_impl_->GetWebRTCIdentityStore(), | 938 GetID(), storage_partition_impl_->GetWebRTCIdentityStore(), |
| 938 resource_context)); | 939 resource_context)); |
| 939 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); | 940 peer_connection_tracker_host_ = |
| 941 new PeerConnectionTrackerHost(GetID(), &webrtc_eventlog_host_); |
| 940 AddFilter(peer_connection_tracker_host_.get()); | 942 AddFilter(peer_connection_tracker_host_.get()); |
| 941 AddFilter(new MediaStreamDispatcherHost( | 943 AddFilter(new MediaStreamDispatcherHost( |
| 942 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(), | 944 GetID(), browser_context->GetResourceContext()->GetMediaDeviceIDSalt(), |
| 943 media_stream_manager)); | 945 media_stream_manager)); |
| 944 AddFilter(new MediaStreamTrackMetricsHost()); | 946 AddFilter(new MediaStreamTrackMetricsHost()); |
| 945 #endif | 947 #endif |
| 946 #if defined(ENABLE_PLUGINS) | 948 #if defined(ENABLE_PLUGINS) |
| 947 AddFilter(new PepperRendererConnection(GetID())); | 949 AddFilter(new PepperRendererConnection(GetID())); |
| 948 #endif | 950 #endif |
| 949 AddFilter(new SpeechRecognitionDispatcherHost( | 951 AddFilter(new SpeechRecognitionDispatcherHost( |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, | 1730 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, |
| 1729 OnShutdownRequest) | 1731 OnShutdownRequest) |
| 1730 IPC_MESSAGE_HANDLER(RenderProcessHostMsg_SuddenTerminationChanged, | 1732 IPC_MESSAGE_HANDLER(RenderProcessHostMsg_SuddenTerminationChanged, |
| 1731 SuddenTerminationChanged) | 1733 SuddenTerminationChanged) |
| 1732 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, | 1734 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, |
| 1733 OnUserMetricsRecordAction) | 1735 OnUserMetricsRecordAction) |
| 1734 IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK) | 1736 IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK) |
| 1735 #if defined(ENABLE_WEBRTC) | 1737 #if defined(ENABLE_WEBRTC) |
| 1736 IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer, | 1738 IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer, |
| 1737 OnRegisterAecDumpConsumer) | 1739 OnRegisterAecDumpConsumer) |
| 1738 IPC_MESSAGE_HANDLER(WebRTCEventLogMsg_RegisterEventLogConsumer, | |
| 1739 OnRegisterEventLogConsumer) | |
| 1740 IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer, | 1740 IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer, |
| 1741 OnUnregisterAecDumpConsumer) | 1741 OnUnregisterAecDumpConsumer) |
| 1742 IPC_MESSAGE_HANDLER(WebRTCEventLogMsg_UnregisterEventLogConsumer, | |
| 1743 OnUnregisterEventLogConsumer) | |
| 1744 #endif | 1742 #endif |
| 1745 // Adding single handlers for your service here is fine, but once your | 1743 // Adding single handlers for your service here is fine, but once your |
| 1746 // service needs more than one handler, please extract them into a new | 1744 // service needs more than one handler, please extract them into a new |
| 1747 // message filter and add that filter to CreateMessageFilters(). | 1745 // message filter and add that filter to CreateMessageFilters(). |
| 1748 IPC_END_MESSAGE_MAP() | 1746 IPC_END_MESSAGE_MAP() |
| 1749 | 1747 |
| 1750 return true; | 1748 return true; |
| 1751 } | 1749 } |
| 1752 | 1750 |
| 1753 // Dispatch incoming messages to the appropriate IPC::Listener. | 1751 // Dispatch incoming messages to the appropriate IPC::Listener. |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 // guaranteed during the lifetime of the closure. | 1997 // guaranteed during the lifetime of the closure. |
| 2000 if (audio_input_renderer_host_) { | 1998 if (audio_input_renderer_host_) { |
| 2001 // Not null if RenderProcessHostImpl::Init has already been called. | 1999 // Not null if RenderProcessHostImpl::Init has already been called. |
| 2002 BrowserThread::PostTask( | 2000 BrowserThread::PostTask( |
| 2003 BrowserThread::IO, FROM_HERE, | 2001 BrowserThread::IO, FROM_HERE, |
| 2004 base::Bind(&AudioInputRendererHost::DisableDebugRecording, | 2002 base::Bind(&AudioInputRendererHost::DisableDebugRecording, |
| 2005 audio_input_renderer_host_)); | 2003 audio_input_renderer_host_)); |
| 2006 } | 2004 } |
| 2007 } | 2005 } |
| 2008 | 2006 |
| 2009 void RenderProcessHostImpl::EnableEventLogRecordings( | 2007 bool RenderProcessHostImpl::StartWebRTCEventLog( |
| 2010 const base::FilePath& file) { | 2008 const base::FilePath& file_path) { |
| 2011 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2009 return webrtc_eventlog_host_.StartWebRTCEventLog(file_path); |
| 2012 | |
| 2013 // Enable Event log for each registered consumer. | |
| 2014 base::FilePath file_with_extensions = GetEventLogFilePathWithExtensions(file); | |
| 2015 for (int id : aec_dump_consumers_) | |
| 2016 EnableEventLogForId(file_with_extensions, id); | |
| 2017 } | 2010 } |
| 2018 | 2011 |
| 2019 void RenderProcessHostImpl::DisableEventLogRecordings() { | 2012 bool RenderProcessHostImpl::StopWebRTCEventLog() { |
| 2020 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2013 return webrtc_eventlog_host_.StopWebRTCEventLog(); |
| 2021 | |
| 2022 // Posting on the FILE thread and then replying back on the UI thread is only | |
| 2023 // for avoiding races between enable and disable. Nothing is done on the FILE | |
| 2024 // thread. | |
| 2025 BrowserThread::PostTaskAndReply( | |
| 2026 BrowserThread::FILE, FROM_HERE, base::Bind(&base::DoNothing), | |
| 2027 base::Bind(&RenderProcessHostImpl::SendDisableEventLogToRenderer, | |
| 2028 weak_factory_.GetWeakPtr())); | |
| 2029 } | 2014 } |
| 2030 | 2015 |
| 2031 void RenderProcessHostImpl::SetWebRtcLogMessageCallback( | 2016 void RenderProcessHostImpl::SetWebRtcLogMessageCallback( |
| 2032 base::Callback<void(const std::string&)> callback) { | 2017 base::Callback<void(const std::string&)> callback) { |
| 2033 #if defined(ENABLE_WEBRTC) | 2018 #if defined(ENABLE_WEBRTC) |
| 2034 BrowserMainLoop::GetInstance()->media_stream_manager()-> | 2019 BrowserMainLoop::GetInstance()->media_stream_manager()-> |
| 2035 RegisterNativeLogCallback(GetID(), callback); | 2020 RegisterNativeLogCallback(GetID(), callback); |
| 2036 #endif | 2021 #endif |
| 2037 } | 2022 } |
| 2038 | 2023 |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2648 } | 2633 } |
| 2649 | 2634 |
| 2650 #if defined(ENABLE_WEBRTC) | 2635 #if defined(ENABLE_WEBRTC) |
| 2651 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) { | 2636 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) { |
| 2652 BrowserThread::PostTask( | 2637 BrowserThread::PostTask( |
| 2653 BrowserThread::UI, FROM_HERE, | 2638 BrowserThread::UI, FROM_HERE, |
| 2654 base::Bind(&RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread, | 2639 base::Bind(&RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread, |
| 2655 weak_factory_.GetWeakPtr(), id)); | 2640 weak_factory_.GetWeakPtr(), id)); |
| 2656 } | 2641 } |
| 2657 | 2642 |
| 2658 void RenderProcessHostImpl::OnRegisterEventLogConsumer(int id) { | |
| 2659 BrowserThread::PostTask( | |
| 2660 BrowserThread::UI, FROM_HERE, | |
| 2661 base::Bind(&RenderProcessHostImpl::RegisterEventLogConsumerOnUIThread, | |
| 2662 weak_factory_.GetWeakPtr(), id)); | |
| 2663 } | |
| 2664 | |
| 2665 void RenderProcessHostImpl::OnUnregisterAecDumpConsumer(int id) { | 2643 void RenderProcessHostImpl::OnUnregisterAecDumpConsumer(int id) { |
| 2666 BrowserThread::PostTask( | 2644 BrowserThread::PostTask( |
| 2667 BrowserThread::UI, FROM_HERE, | 2645 BrowserThread::UI, FROM_HERE, |
| 2668 base::Bind(&RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread, | 2646 base::Bind(&RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread, |
| 2669 weak_factory_.GetWeakPtr(), id)); | 2647 weak_factory_.GetWeakPtr(), id)); |
| 2670 } | 2648 } |
| 2671 | 2649 |
| 2672 void RenderProcessHostImpl::OnUnregisterEventLogConsumer(int id) { | |
| 2673 BrowserThread::PostTask( | |
| 2674 BrowserThread::UI, FROM_HERE, | |
| 2675 base::Bind(&RenderProcessHostImpl::UnregisterEventLogConsumerOnUIThread, | |
| 2676 weak_factory_.GetWeakPtr(), id)); | |
| 2677 } | |
| 2678 | |
| 2679 void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) { | 2650 void RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread(int id) { |
| 2680 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2651 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2681 aec_dump_consumers_.push_back(id); | 2652 aec_dump_consumers_.push_back(id); |
| 2682 | 2653 |
| 2683 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) { | 2654 if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) { |
| 2684 base::FilePath file_with_extensions = GetAecDumpFilePathWithExtensions( | 2655 base::FilePath file_with_extensions = GetAecDumpFilePathWithExtensions( |
| 2685 WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath()); | 2656 WebRTCInternals::GetInstance()->GetAudioDebugRecordingsFilePath()); |
| 2686 EnableAecDumpForId(file_with_extensions, id); | 2657 EnableAecDumpForId(file_with_extensions, id); |
| 2687 } | 2658 } |
| 2688 } | 2659 } |
| 2689 | 2660 |
| 2690 void RenderProcessHostImpl::RegisterEventLogConsumerOnUIThread(int id) { | |
| 2691 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
| 2692 aec_dump_consumers_.push_back(id); | |
| 2693 | |
| 2694 if (WebRTCInternals::GetInstance()->IsEventLogRecordingsEnabled()) { | |
| 2695 base::FilePath file_with_extensions = GetEventLogFilePathWithExtensions( | |
| 2696 WebRTCInternals::GetInstance()->GetEventLogRecordingsFilePath()); | |
| 2697 EnableEventLogForId(file_with_extensions, id); | |
| 2698 } | |
| 2699 } | |
| 2700 | |
| 2701 void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) { | 2661 void RenderProcessHostImpl::UnregisterAecDumpConsumerOnUIThread(int id) { |
| 2702 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2662 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2703 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); | 2663 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); |
| 2704 it != aec_dump_consumers_.end(); ++it) { | 2664 it != aec_dump_consumers_.end(); ++it) { |
| 2705 if (*it == id) { | 2665 if (*it == id) { |
| 2706 aec_dump_consumers_.erase(it); | 2666 aec_dump_consumers_.erase(it); |
| 2707 break; | 2667 break; |
| 2708 } | 2668 } |
| 2709 } | 2669 } |
| 2710 } | 2670 } |
| 2711 | 2671 |
| 2712 void RenderProcessHostImpl::UnregisterEventLogConsumerOnUIThread(int id) { | |
| 2713 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
| 2714 for (std::vector<int>::iterator it = aec_dump_consumers_.begin(); | |
| 2715 it != aec_dump_consumers_.end(); ++it) { | |
| 2716 if (*it == id) { | |
| 2717 aec_dump_consumers_.erase(it); | |
| 2718 break; | |
| 2719 } | |
| 2720 } | |
| 2721 } | |
| 2722 | |
| 2723 void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file, | 2672 void RenderProcessHostImpl::EnableAecDumpForId(const base::FilePath& file, |
| 2724 int id) { | 2673 int id) { |
| 2725 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2674 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2726 BrowserThread::PostTaskAndReplyWithResult( | 2675 BrowserThread::PostTaskAndReplyWithResult( |
| 2727 BrowserThread::FILE, FROM_HERE, | 2676 BrowserThread::FILE, FROM_HERE, |
| 2728 base::Bind(&CreateFileForProcess, file.AddExtension(IntToStringType(id))), | 2677 base::Bind(&CreateFileForProcess, file.AddExtension(IntToStringType(id))), |
| 2729 base::Bind(&RenderProcessHostImpl::SendAecDumpFileToRenderer, | 2678 base::Bind(&RenderProcessHostImpl::SendAecDumpFileToRenderer, |
| 2730 weak_factory_.GetWeakPtr(), id)); | 2679 weak_factory_.GetWeakPtr(), id)); |
| 2731 } | 2680 } |
| 2732 | 2681 |
| 2733 void RenderProcessHostImpl::EnableEventLogForId(const base::FilePath& file, | |
| 2734 int id) { | |
| 2735 DCHECK_CURRENTLY_ON(BrowserThread::UI); | |
| 2736 BrowserThread::PostTaskAndReplyWithResult( | |
| 2737 BrowserThread::FILE, FROM_HERE, | |
| 2738 base::Bind(&CreateFileForProcess, file.AddExtension(IntToStringType(id))), | |
| 2739 base::Bind(&RenderProcessHostImpl::SendEventLogFileToRenderer, | |
| 2740 weak_factory_.GetWeakPtr(), id)); | |
| 2741 } | |
| 2742 | |
| 2743 void RenderProcessHostImpl::SendAecDumpFileToRenderer( | 2682 void RenderProcessHostImpl::SendAecDumpFileToRenderer( |
| 2744 int id, | 2683 int id, |
| 2745 IPC::PlatformFileForTransit file_for_transit) { | 2684 IPC::PlatformFileForTransit file_for_transit) { |
| 2746 if (file_for_transit == IPC::InvalidPlatformFileForTransit()) | 2685 if (file_for_transit == IPC::InvalidPlatformFileForTransit()) |
| 2747 return; | 2686 return; |
| 2748 Send(new AecDumpMsg_EnableAecDump(id, file_for_transit)); | 2687 Send(new AecDumpMsg_EnableAecDump(id, file_for_transit)); |
| 2749 } | 2688 } |
| 2750 | 2689 |
| 2751 void RenderProcessHostImpl::SendEventLogFileToRenderer( | |
| 2752 int id, | |
| 2753 IPC::PlatformFileForTransit file_for_transit) { | |
| 2754 if (file_for_transit == IPC::InvalidPlatformFileForTransit()) | |
| 2755 return; | |
| 2756 Send(new WebRTCEventLogMsg_EnableEventLog(id, file_for_transit)); | |
| 2757 } | |
| 2758 | |
| 2759 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { | 2690 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { |
| 2760 Send(new AecDumpMsg_DisableAecDump()); | 2691 Send(new AecDumpMsg_DisableAecDump()); |
| 2761 } | 2692 } |
| 2762 | 2693 |
| 2763 void RenderProcessHostImpl::SendDisableEventLogToRenderer() { | |
| 2764 Send(new WebRTCEventLogMsg_DisableEventLog()); | |
| 2765 } | |
| 2766 | |
| 2767 base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions( | 2694 base::FilePath RenderProcessHostImpl::GetAecDumpFilePathWithExtensions( |
| 2768 const base::FilePath& file) { | 2695 const base::FilePath& file) { |
| 2769 return file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) | 2696 return file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) |
| 2770 .AddExtension(kAecDumpFileNameAddition); | 2697 .AddExtension(kAecDumpFileNameAddition); |
| 2771 } | 2698 } |
| 2772 | |
| 2773 base::FilePath RenderProcessHostImpl::GetEventLogFilePathWithExtensions( | |
| 2774 const base::FilePath& file) { | |
| 2775 return file.AddExtension(IntToStringType(base::GetProcId(GetHandle()))) | |
| 2776 .AddExtension(kEventLogFileNameAddition); | |
| 2777 } | |
| 2778 #endif // defined(ENABLE_WEBRTC) | 2699 #endif // defined(ENABLE_WEBRTC) |
| 2779 | 2700 |
| 2780 void RenderProcessHostImpl::GetAudioOutputControllers( | 2701 void RenderProcessHostImpl::GetAudioOutputControllers( |
| 2781 const GetAudioOutputControllersCallback& callback) const { | 2702 const GetAudioOutputControllersCallback& callback) const { |
| 2782 audio_renderer_host()->GetOutputControllers(callback); | 2703 audio_renderer_host()->GetOutputControllers(callback); |
| 2783 } | 2704 } |
| 2784 | 2705 |
| 2785 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { | 2706 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { |
| 2786 return bluetooth_dispatcher_host_.get(); | 2707 return bluetooth_dispatcher_host_.get(); |
| 2787 } | 2708 } |
| 2788 | 2709 |
| 2789 void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() { | 2710 void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() { |
| 2790 // We are updating all widgets including swapped out ones. | 2711 // We are updating all widgets including swapped out ones. |
| 2791 std::unique_ptr<RenderWidgetHostIterator> widgets( | 2712 std::unique_ptr<RenderWidgetHostIterator> widgets( |
| 2792 RenderWidgetHostImpl::GetAllRenderWidgetHosts()); | 2713 RenderWidgetHostImpl::GetAllRenderWidgetHosts()); |
| 2793 while (RenderWidgetHost* widget = widgets->GetNextHost()) { | 2714 while (RenderWidgetHost* widget = widgets->GetNextHost()) { |
| 2794 RenderViewHost* rvh = RenderViewHost::From(widget); | 2715 RenderViewHost* rvh = RenderViewHost::From(widget); |
| 2795 if (!rvh) | 2716 if (!rvh) |
| 2796 continue; | 2717 continue; |
| 2797 | 2718 |
| 2798 // Skip widgets in other processes. | 2719 // Skip widgets in other processes. |
| 2799 if (rvh->GetProcess()->GetID() != GetID()) | 2720 if (rvh->GetProcess()->GetID() != GetID()) |
| 2800 continue; | 2721 continue; |
| 2801 | 2722 |
| 2802 rvh->OnWebkitPreferencesChanged(); | 2723 rvh->OnWebkitPreferencesChanged(); |
| 2803 } | 2724 } |
| 2804 } | 2725 } |
| 2805 | 2726 |
| 2806 } // namespace content | 2727 } // namespace content |
| OLD | NEW |