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 27 matching lines...) Expand all Loading... |
38 #include "base/trace_event/trace_event.h" | 38 #include "base/trace_event/trace_event.h" |
39 #include "base/tracked_objects.h" | 39 #include "base/tracked_objects.h" |
40 #include "build/build_config.h" | 40 #include "build/build_config.h" |
41 #include "cc/base/switches.h" | 41 #include "cc/base/switches.h" |
42 #include "components/scheduler/common/scheduler_switches.h" | 42 #include "components/scheduler/common/scheduler_switches.h" |
43 #include "components/tracing/tracing_switches.h" | 43 #include "components/tracing/tracing_switches.h" |
44 #include "content/browser/appcache/appcache_dispatcher_host.h" | 44 #include "content/browser/appcache/appcache_dispatcher_host.h" |
45 #include "content/browser/appcache/chrome_appcache_service.h" | 45 #include "content/browser/appcache/chrome_appcache_service.h" |
46 #include "content/browser/background_sync/background_sync_service_impl.h" | 46 #include "content/browser/background_sync/background_sync_service_impl.h" |
47 #include "content/browser/bad_message.h" | 47 #include "content/browser/bad_message.h" |
| 48 #include "content/browser/ballista/ballista_service_impl.h" |
48 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" | 49 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" |
49 #include "content/browser/browser_child_process_host_impl.h" | 50 #include "content/browser/browser_child_process_host_impl.h" |
50 #include "content/browser/browser_main.h" | 51 #include "content/browser/browser_main.h" |
51 #include "content/browser/browser_main_loop.h" | 52 #include "content/browser/browser_main_loop.h" |
52 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 53 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
53 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 54 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
54 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" | 55 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
55 #include "content/browser/child_process_security_policy_impl.h" | 56 #include "content/browser/child_process_security_policy_impl.h" |
56 #include "content/browser/device_sensors/device_light_message_filter.h" | 57 #include "content/browser/device_sensors/device_light_message_filter.h" |
57 #include "content/browser/device_sensors/device_motion_message_filter.h" | 58 #include "content/browser/device_sensors/device_motion_message_filter.h" |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 | 1093 |
1093 mojo_application_host_->service_registry()->AddService(base::Bind( | 1094 mojo_application_host_->service_registry()->AddService(base::Bind( |
1094 &content::ServicePortServiceImpl::Create, | 1095 &content::ServicePortServiceImpl::Create, |
1095 make_scoped_refptr(storage_partition_impl_->GetNavigatorConnectContext()), | 1096 make_scoped_refptr(storage_partition_impl_->GetNavigatorConnectContext()), |
1096 message_port_message_filter_)); | 1097 message_port_message_filter_)); |
1097 | 1098 |
1098 mojo_application_host_->service_registry()->AddService( | 1099 mojo_application_host_->service_registry()->AddService( |
1099 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1100 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
1100 base::Unretained(this))); | 1101 base::Unretained(this))); |
1101 | 1102 |
| 1103 // TODO(mgiuca): Only add this if #experimental-web-platform-features is |
| 1104 // enabled. |
| 1105 mojo_application_host_->service_registry()->AddService( |
| 1106 base::Bind(&BallistaServiceImpl::Create, GetBrowserContext())); |
| 1107 |
1102 #if defined(OS_ANDROID) | 1108 #if defined(OS_ANDROID) |
1103 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1109 ServiceRegistrarAndroid::RegisterProcessHostServices( |
1104 mojo_application_host_->service_registry_android()); | 1110 mojo_application_host_->service_registry_android()); |
1105 #endif | 1111 #endif |
1106 | 1112 |
1107 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1113 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
1108 mojo_application_host_->service_registry()); | 1114 mojo_application_host_->service_registry()); |
1109 } | 1115 } |
1110 | 1116 |
1111 void RenderProcessHostImpl::CreateStoragePartitionService( | 1117 void RenderProcessHostImpl::CreateStoragePartitionService( |
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2819 | 2825 |
2820 // Skip widgets in other processes. | 2826 // Skip widgets in other processes. |
2821 if (rvh->GetProcess()->GetID() != GetID()) | 2827 if (rvh->GetProcess()->GetID() != GetID()) |
2822 continue; | 2828 continue; |
2823 | 2829 |
2824 rvh->OnWebkitPreferencesChanged(); | 2830 rvh->OnWebkitPreferencesChanged(); |
2825 } | 2831 } |
2826 } | 2832 } |
2827 | 2833 |
2828 } // namespace content | 2834 } // namespace content |
OLD | NEW |