| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" | 85 #include "content/browser/renderer_host/media/peer_connection_tracker_host.h" |
| 86 #include "content/browser/renderer_host/media/video_capture_host.h" | 86 #include "content/browser/renderer_host/media/video_capture_host.h" |
| 87 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" | 87 #include "content/browser/renderer_host/memory_benchmark_message_filter.h" |
| 88 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 88 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
| 89 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" | 89 #include "content/browser/renderer_host/pepper/pepper_renderer_connection.h" |
| 90 #include "content/browser/renderer_host/render_message_filter.h" | 90 #include "content/browser/renderer_host/render_message_filter.h" |
| 91 #include "content/browser/renderer_host/render_view_host_delegate.h" | 91 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 92 #include "content/browser/renderer_host/render_view_host_impl.h" | 92 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 93 #include "content/browser/renderer_host/render_widget_helper.h" | 93 #include "content/browser/renderer_host/render_widget_helper.h" |
| 94 #include "content/browser/renderer_host/render_widget_host_impl.h" | 94 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 95 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | |
| 96 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 95 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| 97 #include "content/browser/renderer_host/websocket_dispatcher_host.h" | 96 #include "content/browser/renderer_host/websocket_dispatcher_host.h" |
| 98 #include "content/browser/resolve_proxy_msg_helper.h" | 97 #include "content/browser/resolve_proxy_msg_helper.h" |
| 99 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 98 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 100 #include "content/browser/service_worker/service_worker_dispatcher_host.h" | 99 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
| 101 #include "content/browser/shared_worker/shared_worker_message_filter.h" | 100 #include "content/browser/shared_worker/shared_worker_message_filter.h" |
| 102 #include "content/browser/shared_worker/worker_storage_partition.h" | 101 #include "content/browser/shared_worker/worker_storage_partition.h" |
| 103 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 102 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 104 #include "content/browser/storage_partition_impl.h" | 103 #include "content/browser/storage_partition_impl.h" |
| 105 #include "content/browser/streams/stream_context.h" | 104 #include "content/browser/streams/stream_context.h" |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 channel_->AddFilter(new FontCacheDispatcher()); | 791 channel_->AddFilter(new FontCacheDispatcher()); |
| 793 #elif defined(OS_ANDROID) | 792 #elif defined(OS_ANDROID) |
| 794 browser_demuxer_android_ = new BrowserDemuxerAndroid(); | 793 browser_demuxer_android_ = new BrowserDemuxerAndroid(); |
| 795 AddFilter(browser_demuxer_android_.get()); | 794 AddFilter(browser_demuxer_android_.get()); |
| 796 #endif | 795 #endif |
| 797 #if defined(ENABLE_BROWSER_CDMS) | 796 #if defined(ENABLE_BROWSER_CDMS) |
| 798 browser_cdm_manager_ = new BrowserCdmManager(GetID(), NULL); | 797 browser_cdm_manager_ = new BrowserCdmManager(GetID(), NULL); |
| 799 AddFilter(browser_cdm_manager_.get()); | 798 AddFilter(browser_cdm_manager_.get()); |
| 800 #endif | 799 #endif |
| 801 | 800 |
| 802 SocketStreamDispatcherHost::GetRequestContextCallback | |
| 803 request_context_callback( | |
| 804 base::Bind(&GetRequestContext, request_context, | |
| 805 media_request_context)); | |
| 806 | |
| 807 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | |
| 808 new SocketStreamDispatcherHost( | |
| 809 GetID(), request_context_callback, resource_context); | |
| 810 AddFilter(socket_stream_dispatcher_host); | |
| 811 | |
| 812 WebSocketDispatcherHost::GetRequestContextCallback | 801 WebSocketDispatcherHost::GetRequestContextCallback |
| 813 websocket_request_context_callback( | 802 websocket_request_context_callback( |
| 814 base::Bind(&GetRequestContext, request_context, | 803 base::Bind(&GetRequestContext, request_context, |
| 815 media_request_context, RESOURCE_TYPE_SUB_RESOURCE)); | 804 media_request_context, RESOURCE_TYPE_SUB_RESOURCE)); |
| 816 | 805 |
| 817 AddFilter( | 806 AddFilter( |
| 818 new WebSocketDispatcherHost(GetID(), websocket_request_context_callback)); | 807 new WebSocketDispatcherHost(GetID(), websocket_request_context_callback)); |
| 819 | 808 |
| 820 message_port_message_filter_ = new MessagePortMessageFilter( | 809 message_port_message_filter_ = new MessagePortMessageFilter( |
| 821 base::Bind(&RenderWidgetHelper::GetNextRoutingID, | 810 base::Bind(&RenderWidgetHelper::GetNextRoutingID, |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 | 2222 |
| 2234 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2223 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2235 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2224 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2236 DCHECK_GT(worker_ref_count_, 0); | 2225 DCHECK_GT(worker_ref_count_, 0); |
| 2237 --worker_ref_count_; | 2226 --worker_ref_count_; |
| 2238 if (worker_ref_count_ == 0) | 2227 if (worker_ref_count_ == 0) |
| 2239 Cleanup(); | 2228 Cleanup(); |
| 2240 } | 2229 } |
| 2241 | 2230 |
| 2242 } // namespace content | 2231 } // namespace content |
| OLD | NEW |