| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 88 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 89 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 89 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
| 90 #include "content/browser/loader/resource_message_filter.h" | 90 #include "content/browser/loader/resource_message_filter.h" |
| 91 #include "content/browser/loader/resource_scheduler_filter.h" | 91 #include "content/browser/loader/resource_scheduler_filter.h" |
| 92 #include "content/browser/loader/url_loader_factory_impl.h" | 92 #include "content/browser/loader/url_loader_factory_impl.h" |
| 93 #include "content/browser/media/capture/audio_mirroring_manager.h" | 93 #include "content/browser/media/capture/audio_mirroring_manager.h" |
| 94 #include "content/browser/media/media_internals.h" | 94 #include "content/browser/media/media_internals.h" |
| 95 #include "content/browser/media/midi_host.h" | 95 #include "content/browser/media/midi_host.h" |
| 96 #include "content/browser/memory/memory_coordinator_impl.h" | 96 #include "content/browser/memory/memory_coordinator_impl.h" |
| 97 #include "content/browser/mime_registry_impl.h" | 97 #include "content/browser/mime_registry_impl.h" |
| 98 #include "content/browser/net/reporting_service_proxy.h" |
| 98 #include "content/browser/notifications/notification_message_filter.h" | 99 #include "content/browser/notifications/notification_message_filter.h" |
| 99 #include "content/browser/notifications/platform_notification_context_impl.h" | 100 #include "content/browser/notifications/platform_notification_context_impl.h" |
| 100 #include "content/browser/payments/payment_manager.h" | 101 #include "content/browser/payments/payment_manager.h" |
| 101 #include "content/browser/permissions/permission_service_context.h" | 102 #include "content/browser/permissions/permission_service_context.h" |
| 102 #include "content/browser/permissions/permission_service_impl.h" | 103 #include "content/browser/permissions/permission_service_impl.h" |
| 103 #include "content/browser/profiler_message_filter.h" | 104 #include "content/browser/profiler_message_filter.h" |
| 104 #include "content/browser/push_messaging/push_messaging_manager.h" | 105 #include "content/browser/push_messaging/push_messaging_manager.h" |
| 105 #include "content/browser/quota_dispatcher_host.h" | 106 #include "content/browser/quota_dispatcher_host.h" |
| 106 #include "content/browser/renderer_host/clipboard_message_filter.h" | 107 #include "content/browser/renderer_host/clipboard_message_filter.h" |
| 107 #include "content/browser/renderer_host/database_message_filter.h" | 108 #include "content/browser/renderer_host/database_message_filter.h" |
| (...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 | 1552 |
| 1552 if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { | 1553 if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { |
| 1553 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( | 1554 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( |
| 1554 static_cast<ServiceWorkerContextWrapper*>( | 1555 static_cast<ServiceWorkerContextWrapper*>( |
| 1555 storage_partition_impl_->GetServiceWorkerContext())); | 1556 storage_partition_impl_->GetServiceWorkerContext())); |
| 1556 registry->AddInterface( | 1557 registry->AddInterface( |
| 1557 base::Bind(&WorkerURLLoaderFactoryProviderImpl::Create, GetID(), | 1558 base::Bind(&WorkerURLLoaderFactoryProviderImpl::Create, GetID(), |
| 1558 resource_message_filter_, service_worker_context)); | 1559 resource_message_filter_, service_worker_context)); |
| 1559 } | 1560 } |
| 1560 | 1561 |
| 1562 registry->AddInterface( |
| 1563 base::Bind(&CreateReportingServiceProxy, storage_partition_impl_)); |
| 1564 |
| 1561 // This is to support usage of WebSockets in cases in which there is no | 1565 // This is to support usage of WebSockets in cases in which there is no |
| 1562 // associated RenderFrame (e.g., Shared Workers). | 1566 // associated RenderFrame (e.g., Shared Workers). |
| 1563 AddUIThreadInterface(registry.get(), | 1567 AddUIThreadInterface(registry.get(), |
| 1564 base::Bind(&WebSocketManager::CreateWebSocket, GetID(), | 1568 base::Bind(&WebSocketManager::CreateWebSocket, GetID(), |
| 1565 MSG_ROUTING_NONE)); | 1569 MSG_ROUTING_NONE)); |
| 1566 | 1570 |
| 1567 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); | 1571 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); |
| 1568 | 1572 |
| 1569 associated_interfaces_.reset(new AssociatedInterfaceRegistryImpl()); | 1573 associated_interfaces_.reset(new AssociatedInterfaceRegistryImpl()); |
| 1570 GetContentClient()->browser()->ExposeInterfacesToRenderer( | 1574 GetContentClient()->browser()->ExposeInterfacesToRenderer( |
| (...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3635 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3639 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3636 | 3640 |
| 3637 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3641 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3638 // Capture the error message in a crash key value. | 3642 // Capture the error message in a crash key value. |
| 3639 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3643 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3640 bad_message::ReceivedBadMessage(render_process_id, | 3644 bad_message::ReceivedBadMessage(render_process_id, |
| 3641 bad_message::RPH_MOJO_PROCESS_ERROR); | 3645 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3642 } | 3646 } |
| 3643 | 3647 |
| 3644 } // namespace content | 3648 } // namespace content |
| OLD | NEW |