| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 64 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 65 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 65 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 66 #include "content/browser/loader/resource_message_filter.h" | 66 #include "content/browser/loader/resource_message_filter.h" |
| 67 #include "content/browser/loader/resource_scheduler_filter.h" | 67 #include "content/browser/loader/resource_scheduler_filter.h" |
| 68 #include "content/browser/media/capture/audio_mirroring_manager.h" | 68 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| 69 #include "content/browser/media/media_internals.h" | 69 #include "content/browser/media/media_internals.h" |
| 70 #include "content/browser/media/midi_host.h" | 70 #include "content/browser/media/midi_host.h" |
| 71 #include "content/browser/message_port_message_filter.h" | 71 #include "content/browser/message_port_message_filter.h" |
| 72 #include "content/browser/mime_registry_message_filter.h" | 72 #include "content/browser/mime_registry_message_filter.h" |
| 73 #include "content/browser/mojo/mojo_application_host.h" | 73 #include "content/browser/mojo/mojo_application_host.h" |
| 74 #include "content/browser/notification_message_filter.h" | 74 #include "content/browser/notifications/notification_message_filter.h" |
| 75 #include "content/browser/profiler_message_filter.h" | 75 #include "content/browser/profiler_message_filter.h" |
| 76 #include "content/browser/push_messaging_message_filter.h" | 76 #include "content/browser/push_messaging_message_filter.h" |
| 77 #include "content/browser/quota_dispatcher_host.h" | 77 #include "content/browser/quota_dispatcher_host.h" |
| 78 #include "content/browser/renderer_host/clipboard_message_filter.h" | 78 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 79 #include "content/browser/renderer_host/database_message_filter.h" | 79 #include "content/browser/renderer_host/database_message_filter.h" |
| 80 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 80 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
| 81 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 81 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
| 82 #include "content/browser/renderer_host/gpu_message_filter.h" | 82 #include "content/browser/renderer_host/gpu_message_filter.h" |
| 83 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 83 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
| 84 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 84 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 AddFilter(p2p_socket_dispatcher_host_.get()); | 841 AddFilter(p2p_socket_dispatcher_host_.get()); |
| 842 #endif | 842 #endif |
| 843 | 843 |
| 844 AddFilter(new TraceMessageFilter()); | 844 AddFilter(new TraceMessageFilter()); |
| 845 AddFilter(new ResolveProxyMsgHelper( | 845 AddFilter(new ResolveProxyMsgHelper( |
| 846 browser_context->GetRequestContextForRenderProcess(GetID()))); | 846 browser_context->GetRequestContextForRenderProcess(GetID()))); |
| 847 AddFilter(new QuotaDispatcherHost( | 847 AddFilter(new QuotaDispatcherHost( |
| 848 GetID(), | 848 GetID(), |
| 849 storage_partition_impl_->GetQuotaManager(), | 849 storage_partition_impl_->GetQuotaManager(), |
| 850 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 850 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 851 AddFilter(new NotificationMessageFilter( | 851 |
| 852 notification_message_filter_ = new NotificationMessageFilter( |
| 852 GetID(), | 853 GetID(), |
| 853 resource_context)); | 854 resource_context, |
| 855 browser_context); |
| 856 AddFilter(notification_message_filter_.get()); |
| 857 |
| 854 AddFilter(new GamepadBrowserMessageFilter()); | 858 AddFilter(new GamepadBrowserMessageFilter()); |
| 855 AddFilter(new DeviceLightMessageFilter()); | 859 AddFilter(new DeviceLightMessageFilter()); |
| 856 AddFilter(new DeviceMotionMessageFilter()); | 860 AddFilter(new DeviceMotionMessageFilter()); |
| 857 AddFilter(new DeviceOrientationMessageFilter()); | 861 AddFilter(new DeviceOrientationMessageFilter()); |
| 858 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 862 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 859 AddFilter(new HistogramMessageFilter()); | 863 AddFilter(new HistogramMessageFilter()); |
| 860 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 864 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 861 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 865 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 862 switches::kEnableMemoryBenchmarking)) | 866 switches::kEnableMemoryBenchmarking)) |
| 863 AddFilter(new MemoryBenchmarkMessageFilter()); | 867 AddFilter(new MemoryBenchmarkMessageFilter()); |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 | 2236 |
| 2233 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2237 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
| 2234 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2238 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2235 DCHECK_GT(worker_ref_count_, 0); | 2239 DCHECK_GT(worker_ref_count_, 0); |
| 2236 --worker_ref_count_; | 2240 --worker_ref_count_; |
| 2237 if (worker_ref_count_ == 0) | 2241 if (worker_ref_count_ == 0) |
| 2238 Cleanup(); | 2242 Cleanup(); |
| 2239 } | 2243 } |
| 2240 | 2244 |
| 2241 } // namespace content | 2245 } // namespace content |
| OLD | NEW |