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/profiler_message_filter.h" | 75 #include "content/browser/profiler_message_filter.h" |
75 #include "content/browser/push_messaging_message_filter.h" | 76 #include "content/browser/push_messaging_message_filter.h" |
76 #include "content/browser/quota_dispatcher_host.h" | 77 #include "content/browser/quota_dispatcher_host.h" |
77 #include "content/browser/renderer_host/clipboard_message_filter.h" | 78 #include "content/browser/renderer_host/clipboard_message_filter.h" |
78 #include "content/browser/renderer_host/database_message_filter.h" | 79 #include "content/browser/renderer_host/database_message_filter.h" |
79 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 80 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
80 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 81 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
81 #include "content/browser/renderer_host/gpu_message_filter.h" | 82 #include "content/browser/renderer_host/gpu_message_filter.h" |
82 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 83 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
83 #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... |
840 AddFilter(p2p_socket_dispatcher_host_.get()); | 841 AddFilter(p2p_socket_dispatcher_host_.get()); |
841 #endif | 842 #endif |
842 | 843 |
843 AddFilter(new TraceMessageFilter()); | 844 AddFilter(new TraceMessageFilter()); |
844 AddFilter(new ResolveProxyMsgHelper( | 845 AddFilter(new ResolveProxyMsgHelper( |
845 browser_context->GetRequestContextForRenderProcess(GetID()))); | 846 browser_context->GetRequestContextForRenderProcess(GetID()))); |
846 AddFilter(new QuotaDispatcherHost( | 847 AddFilter(new QuotaDispatcherHost( |
847 GetID(), | 848 GetID(), |
848 storage_partition_impl_->GetQuotaManager(), | 849 storage_partition_impl_->GetQuotaManager(), |
849 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 850 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 851 AddFilter(new NotificationMessageFilter( |
| 852 GetID(), |
| 853 resource_context)); |
850 AddFilter(new GamepadBrowserMessageFilter()); | 854 AddFilter(new GamepadBrowserMessageFilter()); |
851 AddFilter(new DeviceLightMessageFilter()); | 855 AddFilter(new DeviceLightMessageFilter()); |
852 AddFilter(new DeviceMotionMessageFilter()); | 856 AddFilter(new DeviceMotionMessageFilter()); |
853 AddFilter(new DeviceOrientationMessageFilter()); | 857 AddFilter(new DeviceOrientationMessageFilter()); |
854 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 858 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
855 AddFilter(new HistogramMessageFilter()); | 859 AddFilter(new HistogramMessageFilter()); |
856 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 860 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
857 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 861 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
858 switches::kEnableMemoryBenchmarking)) | 862 switches::kEnableMemoryBenchmarking)) |
859 AddFilter(new MemoryBenchmarkMessageFilter()); | 863 AddFilter(new MemoryBenchmarkMessageFilter()); |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2228 | 2232 |
2229 void RenderProcessHostImpl::DecrementWorkerRefCount() { | 2233 void RenderProcessHostImpl::DecrementWorkerRefCount() { |
2230 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2234 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2231 DCHECK_GT(worker_ref_count_, 0); | 2235 DCHECK_GT(worker_ref_count_, 0); |
2232 --worker_ref_count_; | 2236 --worker_ref_count_; |
2233 if (worker_ref_count_ == 0) | 2237 if (worker_ref_count_ == 0) |
2234 Cleanup(); | 2238 Cleanup(); |
2235 } | 2239 } |
2236 | 2240 |
2237 } // namespace content | 2241 } // namespace content |
OLD | NEW |