| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 #include "content/browser/renderer_host/render_message_filter.h" | 79 #include "content/browser/renderer_host/render_message_filter.h" |
| 80 #include "content/browser/renderer_host/render_view_host_delegate.h" | 80 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 81 #include "content/browser/renderer_host/render_view_host_impl.h" | 81 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 82 #include "content/browser/renderer_host/render_widget_helper.h" | 82 #include "content/browser/renderer_host/render_widget_helper.h" |
| 83 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | 83 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" |
| 84 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 84 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| 85 #include "content/browser/resolve_proxy_msg_helper.h" | 85 #include "content/browser/resolve_proxy_msg_helper.h" |
| 86 #include "content/browser/storage_partition_impl.h" | 86 #include "content/browser/storage_partition_impl.h" |
| 87 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 87 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
| 88 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 88 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 89 #include "content/browser/stats_collection_message_filter.h" |
| 89 #include "content/browser/tracing/trace_message_filter.h" | 90 #include "content/browser/tracing/trace_message_filter.h" |
| 90 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 91 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 91 #include "content/browser/worker_host/worker_storage_partition.h" | 92 #include "content/browser/worker_host/worker_storage_partition.h" |
| 92 #include "content/browser/worker_host/worker_message_filter.h" | 93 #include "content/browser/worker_host/worker_message_filter.h" |
| 93 #include "content/common/child_process_host_impl.h" | 94 #include "content/common/child_process_host_impl.h" |
| 94 #include "content/common/child_process_messages.h" | 95 #include "content/common/child_process_messages.h" |
| 95 #include "content/common/gpu/gpu_messages.h" | 96 #include "content/common/gpu/gpu_messages.h" |
| 96 #include "content/common/resource_messages.h" | 97 #include "content/common/resource_messages.h" |
| 97 #include "content/common/view_messages.h" | 98 #include "content/common/view_messages.h" |
| 98 #include "content/public/browser/browser_context.h" | 99 #include "content/public/browser/browser_context.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 channel_->AddFilter(new ResolveProxyMsgHelper( | 603 channel_->AddFilter(new ResolveProxyMsgHelper( |
| 603 browser_context->GetRequestContextForRenderProcess(GetID()))); | 604 browser_context->GetRequestContextForRenderProcess(GetID()))); |
| 604 channel_->AddFilter(new QuotaDispatcherHost( | 605 channel_->AddFilter(new QuotaDispatcherHost( |
| 605 GetID(), | 606 GetID(), |
| 606 storage_partition_impl_->GetQuotaManager(), | 607 storage_partition_impl_->GetQuotaManager(), |
| 607 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 608 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 608 channel_->AddFilter(new GamepadBrowserMessageFilter()); | 609 channel_->AddFilter(new GamepadBrowserMessageFilter()); |
| 609 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 610 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 610 channel_->AddFilter(new HistogramMessageFilter()); | 611 channel_->AddFilter(new HistogramMessageFilter()); |
| 611 channel_->AddFilter(new HyphenatorMessageFilter(this)); | 612 channel_->AddFilter(new HyphenatorMessageFilter(this)); |
| 613 |
| 614 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 615 switches::kDomAutomationController)) { |
| 616 channel_->AddFilter(new StatsCollectionMessageFilter()); |
| 617 } |
| 612 } | 618 } |
| 613 | 619 |
| 614 int RenderProcessHostImpl::GetNextRoutingID() { | 620 int RenderProcessHostImpl::GetNextRoutingID() { |
| 615 return widget_helper_->GetNextRoutingID(); | 621 return widget_helper_->GetNextRoutingID(); |
| 616 } | 622 } |
| 617 | 623 |
| 618 void RenderProcessHostImpl::CancelResourceRequests(int render_widget_id) { | 624 void RenderProcessHostImpl::CancelResourceRequests(int render_widget_id) { |
| 619 widget_helper_->CancelResourceRequests(render_widget_id); | 625 widget_helper_->CancelResourceRequests(render_widget_id); |
| 620 } | 626 } |
| 621 | 627 |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 TRACE_EVENT0("renderer_host", | 1644 TRACE_EVENT0("renderer_host", |
| 1639 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); | 1645 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); |
| 1640 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 1646 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
| 1641 ack_params.sync_point = 0; | 1647 ack_params.sync_point = 0; |
| 1642 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, | 1648 RenderWidgetHostImpl::AcknowledgeBufferPresent(route_id, |
| 1643 gpu_process_host_id, | 1649 gpu_process_host_id, |
| 1644 ack_params); | 1650 ack_params); |
| 1645 } | 1651 } |
| 1646 | 1652 |
| 1647 } // namespace content | 1653 } // namespace content |
| OLD | NEW |