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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 75 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
76 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 76 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
77 #include "content/browser/loader/resource_message_filter.h" | 77 #include "content/browser/loader/resource_message_filter.h" |
78 #include "content/browser/loader/resource_scheduler_filter.h" | 78 #include "content/browser/loader/resource_scheduler_filter.h" |
79 #include "content/browser/media/capture/audio_mirroring_manager.h" | 79 #include "content/browser/media/capture/audio_mirroring_manager.h" |
80 #include "content/browser/media/capture/image_capture_impl.h" | 80 #include "content/browser/media/capture/image_capture_impl.h" |
81 #include "content/browser/media/media_internals.h" | 81 #include "content/browser/media/media_internals.h" |
82 #include "content/browser/media/midi_host.h" | 82 #include "content/browser/media/midi_host.h" |
83 #include "content/browser/memory/memory_message_filter.h" | 83 #include "content/browser/memory/memory_message_filter.h" |
84 #include "content/browser/message_port_message_filter.h" | 84 #include "content/browser/message_port_message_filter.h" |
85 #include "content/browser/mime_registry_message_filter.h" | 85 #include "content/browser/mime_registry_impl.h" |
86 #include "content/browser/mojo/constants.h" | 86 #include "content/browser/mojo/constants.h" |
87 #include "content/browser/mojo/mojo_application_host.h" | 87 #include "content/browser/mojo/mojo_application_host.h" |
88 #include "content/browser/mojo/mojo_child_connection.h" | 88 #include "content/browser/mojo/mojo_child_connection.h" |
89 #include "content/browser/notifications/notification_message_filter.h" | 89 #include "content/browser/notifications/notification_message_filter.h" |
90 #include "content/browser/permissions/permission_service_context.h" | 90 #include "content/browser/permissions/permission_service_context.h" |
91 #include "content/browser/permissions/permission_service_impl.h" | 91 #include "content/browser/permissions/permission_service_impl.h" |
92 #include "content/browser/profiler_message_filter.h" | 92 #include "content/browser/profiler_message_filter.h" |
93 #include "content/browser/push_messaging/push_messaging_message_filter.h" | 93 #include "content/browser/push_messaging/push_messaging_message_filter.h" |
94 #include "content/browser/quota_dispatcher_host.h" | 94 #include "content/browser/quota_dispatcher_host.h" |
95 #include "content/browser/renderer_host/clipboard_message_filter.h" | 95 #include "content/browser/renderer_host/clipboard_message_filter.h" |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 AddFilter(new PepperRendererConnection(GetID())); | 924 AddFilter(new PepperRendererConnection(GetID())); |
925 #endif | 925 #endif |
926 AddFilter(new SpeechRecognitionDispatcherHost( | 926 AddFilter(new SpeechRecognitionDispatcherHost( |
927 GetID(), storage_partition_impl_->GetURLRequestContext())); | 927 GetID(), storage_partition_impl_->GetURLRequestContext())); |
928 AddFilter(new FileAPIMessageFilter( | 928 AddFilter(new FileAPIMessageFilter( |
929 GetID(), storage_partition_impl_->GetURLRequestContext(), | 929 GetID(), storage_partition_impl_->GetURLRequestContext(), |
930 storage_partition_impl_->GetFileSystemContext(), | 930 storage_partition_impl_->GetFileSystemContext(), |
931 blob_storage_context.get(), StreamContext::GetFor(browser_context))); | 931 blob_storage_context.get(), StreamContext::GetFor(browser_context))); |
932 AddFilter(new BlobDispatcherHost(blob_storage_context.get())); | 932 AddFilter(new BlobDispatcherHost(blob_storage_context.get())); |
933 AddFilter(new FileUtilitiesMessageFilter(GetID())); | 933 AddFilter(new FileUtilitiesMessageFilter(GetID())); |
934 AddFilter(new MimeRegistryMessageFilter()); | |
935 AddFilter( | 934 AddFilter( |
936 new DatabaseMessageFilter(storage_partition_impl_->GetDatabaseTracker())); | 935 new DatabaseMessageFilter(storage_partition_impl_->GetDatabaseTracker())); |
937 #if defined(OS_MACOSX) | 936 #if defined(OS_MACOSX) |
938 AddFilter(new TextInputClientMessageFilter()); | 937 AddFilter(new TextInputClientMessageFilter()); |
939 #elif defined(OS_WIN) | 938 #elif defined(OS_WIN) |
940 AddFilter(new DWriteFontProxyMessageFilter()); | 939 AddFilter(new DWriteFontProxyMessageFilter()); |
941 | 940 |
942 // The FontCacheDispatcher is required only when we're using GDI rendering. | 941 // The FontCacheDispatcher is required only when we're using GDI rendering. |
943 // TODO(scottmg): pdf/ppapi still require the renderer to be able to precache | 942 // TODO(scottmg): pdf/ppapi still require the renderer to be able to precache |
944 // GDI fonts (http://crbug.com/383227), even when using DirectWrite. This | 943 // GDI fonts (http://crbug.com/383227), even when using DirectWrite. This |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 base::Bind(&ImageCaptureImpl::Create)); | 1072 base::Bind(&ImageCaptureImpl::Create)); |
1074 | 1073 |
1075 mojo_application_host_->service_registry()->AddService(base::Bind( | 1074 mojo_application_host_->service_registry()->AddService(base::Bind( |
1076 &BackgroundSyncContext::CreateService, | 1075 &BackgroundSyncContext::CreateService, |
1077 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); | 1076 base::Unretained(storage_partition_impl_->GetBackgroundSyncContext()))); |
1078 | 1077 |
1079 mojo_application_host_->service_registry()->AddService( | 1078 mojo_application_host_->service_registry()->AddService( |
1080 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1079 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
1081 base::Unretained(this))); | 1080 base::Unretained(this))); |
1082 | 1081 |
| 1082 mojo_application_host_->service_registry()->AddService( |
| 1083 base::Bind(&MimeRegistryImpl::Create), |
| 1084 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| 1085 |
1083 #if defined(OS_ANDROID) | 1086 #if defined(OS_ANDROID) |
1084 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1087 ServiceRegistrarAndroid::RegisterProcessHostServices( |
1085 mojo_application_host_->service_registry_android()); | 1088 mojo_application_host_->service_registry_android()); |
1086 #endif | 1089 #endif |
1087 | 1090 |
1088 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1091 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
1089 mojo_application_host_->service_registry()); | 1092 mojo_application_host_->service_registry()); |
1090 } | 1093 } |
1091 | 1094 |
1092 void RenderProcessHostImpl::CreateStoragePartitionService( | 1095 void RenderProcessHostImpl::CreateStoragePartitionService( |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 | 2783 |
2781 // Skip widgets in other processes. | 2784 // Skip widgets in other processes. |
2782 if (rvh->GetProcess()->GetID() != GetID()) | 2785 if (rvh->GetProcess()->GetID() != GetID()) |
2783 continue; | 2786 continue; |
2784 | 2787 |
2785 rvh->OnWebkitPreferencesChanged(); | 2788 rvh->OnWebkitPreferencesChanged(); |
2786 } | 2789 } |
2787 } | 2790 } |
2788 | 2791 |
2789 } // namespace content | 2792 } // namespace content |
OLD | NEW |