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 28 matching lines...) Expand all Loading... |
39 #include "base/sys_info.h" | 39 #include "base/sys_info.h" |
40 #include "base/threading/thread.h" | 40 #include "base/threading/thread.h" |
41 #include "base/threading/thread_restrictions.h" | 41 #include "base/threading/thread_restrictions.h" |
42 #include "base/threading/thread_task_runner_handle.h" | 42 #include "base/threading/thread_task_runner_handle.h" |
43 #include "base/trace_event/trace_event.h" | 43 #include "base/trace_event/trace_event.h" |
44 #include "base/tracked_objects.h" | 44 #include "base/tracked_objects.h" |
45 #include "build/build_config.h" | 45 #include "build/build_config.h" |
46 #include "cc/base/switches.h" | 46 #include "cc/base/switches.h" |
47 #include "components/scheduler/common/scheduler_switches.h" | 47 #include "components/scheduler/common/scheduler_switches.h" |
48 #include "components/tracing/common/tracing_switches.h" | 48 #include "components/tracing/common/tracing_switches.h" |
| 49 #include "components/webmessaging/broadcast_channel_service.h" |
49 #include "content/browser/appcache/appcache_dispatcher_host.h" | 50 #include "content/browser/appcache/appcache_dispatcher_host.h" |
50 #include "content/browser/appcache/chrome_appcache_service.h" | 51 #include "content/browser/appcache/chrome_appcache_service.h" |
51 #include "content/browser/background_sync/background_sync_service_impl.h" | 52 #include "content/browser/background_sync/background_sync_service_impl.h" |
52 #include "content/browser/bad_message.h" | 53 #include "content/browser/bad_message.h" |
53 #include "content/browser/blob_storage/blob_dispatcher_host.h" | 54 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
54 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 55 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
55 #include "content/browser/browser_child_process_host_impl.h" | 56 #include "content/browser/browser_child_process_host_impl.h" |
56 #include "content/browser/browser_main.h" | 57 #include "content/browser/browser_main.h" |
57 #include "content/browser/browser_main_loop.h" | 58 #include "content/browser/browser_main_loop.h" |
58 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 59 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 | 1047 |
1047 mojo_application_host_->service_registry()->AddService(base::Bind( | 1048 mojo_application_host_->service_registry()->AddService(base::Bind( |
1048 &PlatformNotificationContextImpl::CreateService, | 1049 &PlatformNotificationContextImpl::CreateService, |
1049 base::Unretained( | 1050 base::Unretained( |
1050 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); | 1051 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); |
1051 | 1052 |
1052 mojo_application_host_->service_registry()->AddService( | 1053 mojo_application_host_->service_registry()->AddService( |
1053 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1054 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
1054 base::Unretained(this))); | 1055 base::Unretained(this))); |
1055 | 1056 |
| 1057 mojo_application_host_->service_registry()->AddService(base::Bind( |
| 1058 &webmessaging::BroadcastChannelService::Connect, |
| 1059 base::Unretained(storage_partition_impl_->GetBroadcastChannelService()))); |
| 1060 |
1056 mojo_application_host_->service_registry()->AddService( | 1061 mojo_application_host_->service_registry()->AddService( |
1057 base::Bind(&MimeRegistryImpl::Create), | 1062 base::Bind(&MimeRegistryImpl::Create), |
1058 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); | 1063 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
1059 | 1064 |
1060 #if defined(OS_ANDROID) | 1065 #if defined(OS_ANDROID) |
1061 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1066 ServiceRegistrarAndroid::RegisterProcessHostServices( |
1062 mojo_application_host_->service_registry_android()); | 1067 mojo_application_host_->service_registry_android()); |
1063 #endif | 1068 #endif |
1064 | 1069 |
1065 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1070 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2814 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2819 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2815 | 2820 |
2816 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2821 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2817 // enough information here so that we can determine what the bad message was. | 2822 // enough information here so that we can determine what the bad message was. |
2818 base::debug::Alias(&error); | 2823 base::debug::Alias(&error); |
2819 bad_message::ReceivedBadMessage(process.get(), | 2824 bad_message::ReceivedBadMessage(process.get(), |
2820 bad_message::RPH_MOJO_PROCESS_ERROR); | 2825 bad_message::RPH_MOJO_PROCESS_ERROR); |
2821 } | 2826 } |
2822 | 2827 |
2823 } // namespace content | 2828 } // namespace content |
OLD | NEW |