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_provider.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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 GetInterfaceRegistry()->AddInterface(base::Bind( | 1058 GetInterfaceRegistry()->AddInterface(base::Bind( |
1058 &PlatformNotificationContextImpl::CreateService, | 1059 &PlatformNotificationContextImpl::CreateService, |
1059 base::Unretained( | 1060 base::Unretained( |
1060 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); | 1061 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); |
1061 | 1062 |
1062 GetInterfaceRegistry()->AddInterface( | 1063 GetInterfaceRegistry()->AddInterface( |
1063 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1064 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
1064 base::Unretained(this))); | 1065 base::Unretained(this))); |
1065 | 1066 |
1066 GetInterfaceRegistry()->AddInterface( | 1067 GetInterfaceRegistry()->AddInterface( |
| 1068 base::Bind(&webmessaging::BroadcastChannelProvider::Connect, |
| 1069 base::Unretained( |
| 1070 storage_partition_impl_->GetBroadcastChannelProvider()))); |
| 1071 |
| 1072 GetInterfaceRegistry()->AddInterface( |
1067 base::Bind(&MimeRegistryImpl::Create), | 1073 base::Bind(&MimeRegistryImpl::Create), |
1068 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); | 1074 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
1069 | 1075 |
1070 #if defined(OS_ANDROID) | 1076 #if defined(OS_ANDROID) |
1071 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1077 ServiceRegistrarAndroid::RegisterProcessHostServices( |
1072 mojo_child_connection_->service_registry_android()); | 1078 mojo_child_connection_->service_registry_android()); |
1073 #endif | 1079 #endif |
1074 | 1080 |
1075 GetContentClient()->browser()->ExposeInterfacesToRenderer( | 1081 GetContentClient()->browser()->ExposeInterfacesToRenderer( |
1076 GetInterfaceRegistry(), this); | 1082 GetInterfaceRegistry(), this); |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2821 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2827 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
2822 | 2828 |
2823 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2829 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
2824 // enough information here so that we can determine what the bad message was. | 2830 // enough information here so that we can determine what the bad message was. |
2825 base::debug::Alias(&error); | 2831 base::debug::Alias(&error); |
2826 bad_message::ReceivedBadMessage(process.get(), | 2832 bad_message::ReceivedBadMessage(process.get(), |
2827 bad_message::RPH_MOJO_PROCESS_ERROR); | 2833 bad_message::RPH_MOJO_PROCESS_ERROR); |
2828 } | 2834 } |
2829 | 2835 |
2830 } // namespace content | 2836 } // namespace content |
OLD | NEW |