| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 #include "content/public/common/content_switches.h" | 159 #include "content/public/common/content_switches.h" |
| 160 #include "content/public/common/mojo_channel_switches.h" | 160 #include "content/public/common/mojo_channel_switches.h" |
| 161 #include "content/public/common/process_type.h" | 161 #include "content/public/common/process_type.h" |
| 162 #include "content/public/common/resource_type.h" | 162 #include "content/public/common/resource_type.h" |
| 163 #include "content/public/common/result_codes.h" | 163 #include "content/public/common/result_codes.h" |
| 164 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 164 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| 165 #include "content/public/common/service_names.mojom.h" | 165 #include "content/public/common/service_names.mojom.h" |
| 166 #include "content/public/common/url_constants.h" | 166 #include "content/public/common/url_constants.h" |
| 167 #include "device/battery/battery_monitor_impl.h" | 167 #include "device/battery/battery_monitor_impl.h" |
| 168 #include "device/gamepad/gamepad_monitor.h" | 168 #include "device/gamepad/gamepad_monitor.h" |
| 169 #include "device/power_monitor/power_monitor_message_broadcaster.h" | |
| 170 #include "gpu/GLES2/gl2extchromium.h" | 169 #include "gpu/GLES2/gl2extchromium.h" |
| 171 #include "gpu/command_buffer/client/gpu_switches.h" | 170 #include "gpu/command_buffer/client/gpu_switches.h" |
| 172 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 173 #include "gpu/command_buffer/service/gpu_switches.h" | 172 #include "gpu/command_buffer/service/gpu_switches.h" |
| 174 #include "gpu/ipc/host/gpu_memory_buffer_support.h" | 173 #include "gpu/ipc/host/gpu_memory_buffer_support.h" |
| 175 #include "ipc/ipc.mojom.h" | 174 #include "ipc/ipc.mojom.h" |
| 176 #include "ipc/ipc_channel.h" | 175 #include "ipc/ipc_channel.h" |
| 177 #include "ipc/ipc_channel_mojo.h" | 176 #include "ipc/ipc_channel_mojo.h" |
| 178 #include "ipc/ipc_logging.h" | 177 #include "ipc/ipc_logging.h" |
| 179 #include "media/base/media_switches.h" | 178 #include "media/base/media_switches.h" |
| (...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 AddUIThreadInterface( | 1245 AddUIThreadInterface( |
| 1247 registry.get(), | 1246 registry.get(), |
| 1248 base::Bind(&BroadcastChannelProvider::Connect, | 1247 base::Bind(&BroadcastChannelProvider::Connect, |
| 1249 base::Unretained( | 1248 base::Unretained( |
| 1250 storage_partition_impl_->GetBroadcastChannelProvider()))); | 1249 storage_partition_impl_->GetBroadcastChannelProvider()))); |
| 1251 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { | 1250 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { |
| 1252 AddUIThreadInterface( | 1251 AddUIThreadInterface( |
| 1253 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); | 1252 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); |
| 1254 } | 1253 } |
| 1255 | 1254 |
| 1256 AddUIThreadInterface( | |
| 1257 registry.get(), | |
| 1258 base::Bind(&device::PowerMonitorMessageBroadcaster::Create)); | |
| 1259 | |
| 1260 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = | 1255 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = |
| 1261 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); | 1256 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); |
| 1262 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), | 1257 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), |
| 1263 file_task_runner); | 1258 file_task_runner); |
| 1264 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) | 1259 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) |
| 1265 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), | 1260 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), |
| 1266 file_task_runner); | 1261 file_task_runner); |
| 1267 #endif | 1262 #endif |
| 1268 | 1263 |
| 1269 #if defined(OS_ANDROID) | 1264 #if defined(OS_ANDROID) |
| (...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3035 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3030 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3036 | 3031 |
| 3037 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3032 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3038 // Capture the error message in a crash key value. | 3033 // Capture the error message in a crash key value. |
| 3039 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3034 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3040 bad_message::ReceivedBadMessage(render_process_id, | 3035 bad_message::ReceivedBadMessage(render_process_id, |
| 3041 bad_message::RPH_MOJO_PROCESS_ERROR); | 3036 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3042 } | 3037 } |
| 3043 | 3038 |
| 3044 } // namespace content | 3039 } // namespace content |
| OLD | NEW |