| 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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1664 | 1665 |
| 1665 if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { | 1666 if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) { |
| 1666 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( | 1667 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context( |
| 1667 static_cast<ServiceWorkerContextWrapper*>( | 1668 static_cast<ServiceWorkerContextWrapper*>( |
| 1668 storage_partition_impl_->GetServiceWorkerContext())); | 1669 storage_partition_impl_->GetServiceWorkerContext())); |
| 1669 registry->AddInterface( | 1670 registry->AddInterface( |
| 1670 base::Bind(&WorkerURLLoaderFactoryProviderImpl::Create, GetID(), | 1671 base::Bind(&WorkerURLLoaderFactoryProviderImpl::Create, GetID(), |
| 1671 resource_message_filter_, service_worker_context)); | 1672 resource_message_filter_, service_worker_context)); |
| 1672 } | 1673 } |
| 1673 | 1674 |
| 1675 registry->AddInterface( |
| 1676 base::Bind(&CreateReportingServiceProxy, storage_partition_impl_)); |
| 1677 |
| 1674 // This is to support usage of WebSockets in cases in which there is no | 1678 // This is to support usage of WebSockets in cases in which there is no |
| 1675 // associated RenderFrame (e.g., Shared Workers). | 1679 // associated RenderFrame (e.g., Shared Workers). |
| 1676 AddUIThreadInterface(registry.get(), | 1680 AddUIThreadInterface(registry.get(), |
| 1677 base::Bind(&WebSocketManager::CreateWebSocket, GetID(), | 1681 base::Bind(&WebSocketManager::CreateWebSocket, GetID(), |
| 1678 MSG_ROUTING_NONE)); | 1682 MSG_ROUTING_NONE)); |
| 1679 | 1683 |
| 1680 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); | 1684 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); |
| 1681 | 1685 |
| 1682 associated_interfaces_.reset(new AssociatedInterfaceRegistryImpl()); | 1686 associated_interfaces_.reset(new AssociatedInterfaceRegistryImpl()); |
| 1683 GetContentClient()->browser()->ExposeInterfacesToRenderer( | 1687 GetContentClient()->browser()->ExposeInterfacesToRenderer( |
| (...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3787 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3791 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3788 | 3792 |
| 3789 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3793 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3790 // Capture the error message in a crash key value. | 3794 // Capture the error message in a crash key value. |
| 3791 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3795 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3792 bad_message::ReceivedBadMessage(render_process_id, | 3796 bad_message::ReceivedBadMessage(render_process_id, |
| 3793 bad_message::RPH_MOJO_PROCESS_ERROR); | 3797 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3794 } | 3798 } |
| 3795 | 3799 |
| 3796 } // namespace content | 3800 } // namespace content |
| OLD | NEW |