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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #include "content/browser/renderer_host/quota_dispatcher_host.h" | 80 #include "content/browser/renderer_host/quota_dispatcher_host.h" |
81 #include "content/browser/renderer_host/render_message_filter.h" | 81 #include "content/browser/renderer_host/render_message_filter.h" |
82 #include "content/browser/renderer_host/render_view_host_delegate.h" | 82 #include "content/browser/renderer_host/render_view_host_delegate.h" |
83 #include "content/browser/renderer_host/render_view_host_impl.h" | 83 #include "content/browser/renderer_host/render_view_host_impl.h" |
84 #include "content/browser/renderer_host/render_widget_helper.h" | 84 #include "content/browser/renderer_host/render_widget_helper.h" |
85 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | 85 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" |
86 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 86 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
87 #include "content/browser/resolve_proxy_msg_helper.h" | 87 #include "content/browser/resolve_proxy_msg_helper.h" |
88 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 88 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
89 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 89 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 90 #include "content/browser/stats_collection_message_filter.h" |
90 #include "content/browser/storage_partition_impl.h" | 91 #include "content/browser/storage_partition_impl.h" |
91 #include "content/browser/tracing/trace_message_filter.h" | 92 #include "content/browser/tracing/trace_message_filter.h" |
92 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 93 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
93 #include "content/browser/worker_host/worker_message_filter.h" | 94 #include "content/browser/worker_host/worker_message_filter.h" |
94 #include "content/browser/worker_host/worker_storage_partition.h" | 95 #include "content/browser/worker_host/worker_storage_partition.h" |
95 #include "content/common/child_process_host_impl.h" | 96 #include "content/common/child_process_host_impl.h" |
96 #include "content/common/child_process_messages.h" | 97 #include "content/common/child_process_messages.h" |
97 #include "content/common/gpu/gpu_messages.h" | 98 #include "content/common/gpu/gpu_messages.h" |
98 #include "content/common/resource_messages.h" | 99 #include "content/common/resource_messages.h" |
99 #include "content/common/view_messages.h" | 100 #include "content/common/view_messages.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 channel_->AddFilter(new ResolveProxyMsgHelper( | 664 channel_->AddFilter(new ResolveProxyMsgHelper( |
664 browser_context->GetRequestContextForRenderProcess(GetID()))); | 665 browser_context->GetRequestContextForRenderProcess(GetID()))); |
665 channel_->AddFilter(new QuotaDispatcherHost( | 666 channel_->AddFilter(new QuotaDispatcherHost( |
666 GetID(), | 667 GetID(), |
667 storage_partition_impl_->GetQuotaManager(), | 668 storage_partition_impl_->GetQuotaManager(), |
668 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 669 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
669 channel_->AddFilter(new GamepadBrowserMessageFilter()); | 670 channel_->AddFilter(new GamepadBrowserMessageFilter()); |
670 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 671 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
671 channel_->AddFilter(new HistogramMessageFilter()); | 672 channel_->AddFilter(new HistogramMessageFilter()); |
672 channel_->AddFilter(new HyphenatorMessageFilter(this)); | 673 channel_->AddFilter(new HyphenatorMessageFilter(this)); |
| 674 |
| 675 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 676 switches::kStatsCollectionExtension)) { |
| 677 channel_->AddFilter(new StatsCollectionMessageFilter()); |
| 678 } |
673 } | 679 } |
674 | 680 |
675 int RenderProcessHostImpl::GetNextRoutingID() { | 681 int RenderProcessHostImpl::GetNextRoutingID() { |
676 return widget_helper_->GetNextRoutingID(); | 682 return widget_helper_->GetNextRoutingID(); |
677 } | 683 } |
678 | 684 |
679 void RenderProcessHostImpl::SimulateSwapOutACK( | 685 void RenderProcessHostImpl::SimulateSwapOutACK( |
680 const ViewMsg_SwapOut_Params& params) { | 686 const ViewMsg_SwapOut_Params& params) { |
681 widget_helper_->SimulateSwapOutACK(params); | 687 widget_helper_->SimulateSwapOutACK(params); |
682 } | 688 } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 switches::kDisableSharedWorkers, | 812 switches::kDisableSharedWorkers, |
807 switches::kDisableSpeechInput, | 813 switches::kDisableSpeechInput, |
808 #if defined(OS_ANDROID) | 814 #if defined(OS_ANDROID) |
809 switches::kEnableWebAudio, | 815 switches::kEnableWebAudio, |
810 switches::kDisableWebRTC, | 816 switches::kDisableWebRTC, |
811 #else | 817 #else |
812 switches::kDisableWebAudio, | 818 switches::kDisableWebAudio, |
813 #endif | 819 #endif |
814 switches::kDisableWebSockets, | 820 switches::kDisableWebSockets, |
815 switches::kDomAutomationController, | 821 switches::kDomAutomationController, |
| 822 switches::kStatsCollectionExtension, |
816 switches::kEnableAccessibilityLogging, | 823 switches::kEnableAccessibilityLogging, |
817 switches::kEnableBrowserPluginForAllViewTypes, | 824 switches::kEnableBrowserPluginForAllViewTypes, |
818 switches::kEnableDCHECK, | 825 switches::kEnableDCHECK, |
819 switches::kEnableDelegatedRenderer, | 826 switches::kEnableDelegatedRenderer, |
820 switches::kDisableEncryptedMedia, | 827 switches::kDisableEncryptedMedia, |
821 switches::kEnableExperimentalWebKitFeatures, | 828 switches::kEnableExperimentalWebKitFeatures, |
822 switches::kEnableFixedLayout, | 829 switches::kEnableFixedLayout, |
823 switches::kEnableDeferredImageDecoding, | 830 switches::kEnableDeferredImageDecoding, |
824 switches::kEnableGPUServiceLogging, | 831 switches::kEnableGPUServiceLogging, |
825 switches::kEnableGPUClientLogging, | 832 switches::kEnableGPUClientLogging, |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1712 TRACE_EVENT0("renderer_host", | 1719 TRACE_EVENT0("renderer_host", |
1713 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1720 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
1714 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 1721 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
1715 ack_params.sync_point = 0; | 1722 ack_params.sync_point = 0; |
1716 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1723 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
1717 gpu_process_host_id, | 1724 gpu_process_host_id, |
1718 ack_params); | 1725 ack_params); |
1719 } | 1726 } |
1720 | 1727 |
1721 } // namespace content | 1728 } // namespace content |
OLD | NEW |