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/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/bluetooth/bluetooth_dispatcher_host.h" | 48 #include "content/browser/bluetooth/bluetooth_dispatcher_host.h" |
49 #include "content/browser/bluetooth/bluetooth_service_impl.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" |
58 #include "content/browser/device_sensors/device_orientation_absolute_message_fil ter.h" | 59 #include "content/browser/device_sensors/device_orientation_absolute_message_fil ter.h" |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1089 | 1090 |
1090 mojo_application_host_->service_registry()->AddService( | 1091 mojo_application_host_->service_registry()->AddService( |
1091 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1092 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
1092 base::Unretained(this))); | 1093 base::Unretained(this))); |
1093 | 1094 |
1094 #if defined(OS_ANDROID) | 1095 #if defined(OS_ANDROID) |
1095 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1096 ServiceRegistrarAndroid::RegisterProcessHostServices( |
1096 mojo_application_host_->service_registry_android()); | 1097 mojo_application_host_->service_registry_android()); |
1097 #endif | 1098 #endif |
1098 | 1099 |
1100 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( | |
1101 switches::kEnableWebBluetooth); | |
1102 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | |
1103 enable_web_bluetooth = true; | |
1104 #endif | |
1105 | |
1106 if (enable_web_bluetooth) { | |
1107 mojo_application_host_->service_registry()->AddService( | |
Ken Rockot(use gerrit already)
2016/03/09 19:31:26
Use GetServiceRegistry() instead of mojo_applicati
ortuno
2016/03/16 16:29:45
Done.
| |
1108 base::Bind(&BluetoothServiceImpl::Create, GetID())); | |
1109 } | |
1110 | |
1099 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1111 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
1100 mojo_application_host_->service_registry()); | 1112 mojo_application_host_->service_registry()); |
1101 } | 1113 } |
1102 | 1114 |
1103 void RenderProcessHostImpl::CreateStoragePartitionService( | 1115 void RenderProcessHostImpl::CreateStoragePartitionService( |
1104 mojo::InterfaceRequest<StoragePartitionService> request) { | 1116 mojo::InterfaceRequest<StoragePartitionService> request) { |
1105 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! | 1117 // DO NOT REMOVE THIS COMMAND LINE CHECK WITHOUT SECURITY REVIEW! |
1106 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1118 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
1107 switches::kMojoLocalStorage)) { | 1119 switches::kMojoLocalStorage)) { |
1108 storage_partition_impl_->Bind(std::move(request)); | 1120 storage_partition_impl_->Bind(std::move(request)); |
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2809 | 2821 |
2810 // Skip widgets in other processes. | 2822 // Skip widgets in other processes. |
2811 if (rvh->GetProcess()->GetID() != GetID()) | 2823 if (rvh->GetProcess()->GetID() != GetID()) |
2812 continue; | 2824 continue; |
2813 | 2825 |
2814 rvh->OnWebkitPreferencesChanged(); | 2826 rvh->OnWebkitPreferencesChanged(); |
2815 } | 2827 } |
2816 } | 2828 } |
2817 | 2829 |
2818 } // namespace content | 2830 } // namespace content |
OLD | NEW |