OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 #include "content/browser/image_capture/image_capture_impl.h" | 84 #include "content/browser/image_capture/image_capture_impl.h" |
85 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 85 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
86 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 86 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
87 #include "content/browser/loader/resource_message_filter.h" | 87 #include "content/browser/loader/resource_message_filter.h" |
88 #include "content/browser/loader/resource_scheduler_filter.h" | 88 #include "content/browser/loader/resource_scheduler_filter.h" |
89 #include "content/browser/loader/url_loader_factory_impl.h" | 89 #include "content/browser/loader/url_loader_factory_impl.h" |
90 #include "content/browser/media/capture/audio_mirroring_manager.h" | 90 #include "content/browser/media/capture/audio_mirroring_manager.h" |
91 #include "content/browser/media/media_internals.h" | 91 #include "content/browser/media/media_internals.h" |
92 #include "content/browser/media/midi_host.h" | 92 #include "content/browser/media/midi_host.h" |
93 #include "content/browser/memory/memory_coordinator_impl.h" | 93 #include "content/browser/memory/memory_coordinator_impl.h" |
94 #include "content/browser/memory/memory_message_filter.h" | |
95 #include "content/browser/mime_registry_impl.h" | 94 #include "content/browser/mime_registry_impl.h" |
96 #include "content/browser/notifications/notification_message_filter.h" | 95 #include "content/browser/notifications/notification_message_filter.h" |
97 #include "content/browser/notifications/platform_notification_context_impl.h" | 96 #include "content/browser/notifications/platform_notification_context_impl.h" |
98 #include "content/browser/payments/payment_manager.h" | 97 #include "content/browser/payments/payment_manager.h" |
99 #include "content/browser/permissions/permission_service_context.h" | 98 #include "content/browser/permissions/permission_service_context.h" |
100 #include "content/browser/permissions/permission_service_impl.h" | 99 #include "content/browser/permissions/permission_service_impl.h" |
101 #include "content/browser/profiler_message_filter.h" | 100 #include "content/browser/profiler_message_filter.h" |
102 #include "content/browser/push_messaging/push_messaging_manager.h" | 101 #include "content/browser/push_messaging/push_messaging_manager.h" |
103 #include "content/browser/quota_dispatcher_host.h" | 102 #include "content/browser/quota_dispatcher_host.h" |
104 #include "content/browser/renderer_host/clipboard_message_filter.h" | 103 #include "content/browser/renderer_host/clipboard_message_filter.h" |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( | 1278 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( |
1280 static_cast<ServiceWorkerContextWrapper*>( | 1279 static_cast<ServiceWorkerContextWrapper*>( |
1281 storage_partition_impl_->GetServiceWorkerContext())); | 1280 storage_partition_impl_->GetServiceWorkerContext())); |
1282 notification_message_filter_ = new NotificationMessageFilter( | 1281 notification_message_filter_ = new NotificationMessageFilter( |
1283 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), | 1282 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), |
1284 resource_context, service_worker_context, browser_context); | 1283 resource_context, service_worker_context, browser_context); |
1285 AddFilter(notification_message_filter_.get()); | 1284 AddFilter(notification_message_filter_.get()); |
1286 | 1285 |
1287 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 1286 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
1288 AddFilter(new HistogramMessageFilter()); | 1287 AddFilter(new HistogramMessageFilter()); |
1289 AddFilter(new MemoryMessageFilter(this)); | |
1290 #if defined(OS_ANDROID) | 1288 #if defined(OS_ANDROID) |
1291 synchronous_compositor_filter_ = | 1289 synchronous_compositor_filter_ = |
1292 new SynchronousCompositorBrowserFilter(GetID()); | 1290 new SynchronousCompositorBrowserFilter(GetID()); |
1293 AddFilter(synchronous_compositor_filter_.get()); | 1291 AddFilter(synchronous_compositor_filter_.get()); |
1294 #endif | 1292 #endif |
1295 } | 1293 } |
1296 | 1294 |
1297 void RenderProcessHostImpl::RegisterMojoInterfaces() { | 1295 void RenderProcessHostImpl::RegisterMojoInterfaces() { |
1298 auto registry = base::MakeUnique<service_manager::BinderRegistry>(); | 1296 auto registry = base::MakeUnique<service_manager::BinderRegistry>(); |
1299 | 1297 |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3270 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3268 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3271 | 3269 |
3272 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3270 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3273 // Capture the error message in a crash key value. | 3271 // Capture the error message in a crash key value. |
3274 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3272 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3275 bad_message::ReceivedBadMessage(render_process_id, | 3273 bad_message::ReceivedBadMessage(render_process_id, |
3276 bad_message::RPH_MOJO_PROCESS_ERROR); | 3274 bad_message::RPH_MOJO_PROCESS_ERROR); |
3277 } | 3275 } |
3278 | 3276 |
3279 } // namespace content | 3277 } // namespace content |
OLD | NEW |