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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 #include "content/public/common/content_constants.h" | 149 #include "content/public/common/content_constants.h" |
150 #include "content/public/common/content_features.h" | 150 #include "content/public/common/content_features.h" |
151 #include "content/public/common/content_switches.h" | 151 #include "content/public/common/content_switches.h" |
152 #include "content/public/common/mojo_channel_switches.h" | 152 #include "content/public/common/mojo_channel_switches.h" |
153 #include "content/public/common/process_type.h" | 153 #include "content/public/common/process_type.h" |
154 #include "content/public/common/resource_type.h" | 154 #include "content/public/common/resource_type.h" |
155 #include "content/public/common/result_codes.h" | 155 #include "content/public/common/result_codes.h" |
156 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 156 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
157 #include "content/public/common/url_constants.h" | 157 #include "content/public/common/url_constants.h" |
158 #include "device/battery/battery_monitor_impl.h" | 158 #include "device/battery/battery_monitor_impl.h" |
| 159 #include "device/sensor/sensor_impl.h" |
159 #include "gpu/GLES2/gl2extchromium.h" | 160 #include "gpu/GLES2/gl2extchromium.h" |
160 #include "gpu/command_buffer/client/gpu_switches.h" | 161 #include "gpu/command_buffer/client/gpu_switches.h" |
161 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 162 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
162 #include "gpu/command_buffer/service/gpu_switches.h" | 163 #include "gpu/command_buffer/service/gpu_switches.h" |
163 #include "ipc/attachment_broker.h" | 164 #include "ipc/attachment_broker.h" |
164 #include "ipc/attachment_broker_privileged.h" | 165 #include "ipc/attachment_broker_privileged.h" |
165 #include "ipc/ipc_channel.h" | 166 #include "ipc/ipc_channel.h" |
166 #include "ipc/ipc_logging.h" | 167 #include "ipc/ipc_logging.h" |
167 #include "ipc/ipc_sender.h" | 168 #include "ipc/ipc_sender.h" |
168 #include "ipc/ipc_switches.h" | 169 #include "ipc/ipc_switches.h" |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 if (send_now) | 1070 if (send_now) |
1070 return channel_->SendNow(std::move(msg)); | 1071 return channel_->SendNow(std::move(msg)); |
1071 | 1072 |
1072 return channel_->SendOnIPCThread(std::move(msg)); | 1073 return channel_->SendOnIPCThread(std::move(msg)); |
1073 } | 1074 } |
1074 | 1075 |
1075 void RenderProcessHostImpl::RegisterMojoServices() { | 1076 void RenderProcessHostImpl::RegisterMojoServices() { |
1076 #if !defined(OS_ANDROID) | 1077 #if !defined(OS_ANDROID) |
1077 mojo_application_host_->service_registry()->AddService( | 1078 mojo_application_host_->service_registry()->AddService( |
1078 base::Bind(&device::BatteryMonitorImpl::Create)); | 1079 base::Bind(&device::BatteryMonitorImpl::Create)); |
| 1080 |
| 1081 mojo_application_host_->service_registry()->AddService( |
| 1082 base::Bind(&device::SensorImpl::Create)); |
| 1083 |
1079 #endif | 1084 #endif |
1080 | 1085 |
1081 mojo_application_host_->service_registry()->AddService( | 1086 mojo_application_host_->service_registry()->AddService( |
1082 base::Bind(&PermissionServiceContext::CreateService, | 1087 base::Bind(&PermissionServiceContext::CreateService, |
1083 base::Unretained(permission_service_context_.get()))); | 1088 base::Unretained(permission_service_context_.get()))); |
1084 | 1089 |
1085 // TODO(mcasas): finalize arguments. | 1090 // TODO(mcasas): finalize arguments. |
1086 mojo_application_host_->service_registry()->AddService( | 1091 mojo_application_host_->service_registry()->AddService( |
1087 base::Bind(&ImageCaptureImpl::Create)); | 1092 base::Bind(&ImageCaptureImpl::Create)); |
1088 | 1093 |
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 | 2797 |
2793 // Skip widgets in other processes. | 2798 // Skip widgets in other processes. |
2794 if (rvh->GetProcess()->GetID() != GetID()) | 2799 if (rvh->GetProcess()->GetID() != GetID()) |
2795 continue; | 2800 continue; |
2796 | 2801 |
2797 rvh->OnWebkitPreferencesChanged(); | 2802 rvh->OnWebkitPreferencesChanged(); |
2798 } | 2803 } |
2799 } | 2804 } |
2800 | 2805 |
2801 } // namespace content | 2806 } // namespace content |
OLD | NEW |