| 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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1239 AddUIThreadInterface( | 1238 AddUIThreadInterface( |
| 1240 registry.get(), | 1239 registry.get(), |
| 1241 base::Bind(&BroadcastChannelProvider::Connect, | 1240 base::Bind(&BroadcastChannelProvider::Connect, |
| 1242 base::Unretained( | 1241 base::Unretained( |
| 1243 storage_partition_impl_->GetBroadcastChannelProvider()))); | 1242 storage_partition_impl_->GetBroadcastChannelProvider()))); |
| 1244 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { | 1243 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { |
| 1245 AddUIThreadInterface( | 1244 AddUIThreadInterface( |
| 1246 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); | 1245 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); |
| 1247 } | 1246 } |
| 1248 | 1247 |
| 1249 AddUIThreadInterface( | |
| 1250 registry.get(), | |
| 1251 base::Bind(&device::PowerMonitorMessageBroadcaster::Create)); | |
| 1252 | |
| 1253 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = | 1248 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = |
| 1254 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); | 1249 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); |
| 1255 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), | 1250 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), |
| 1256 file_task_runner); | 1251 file_task_runner); |
| 1257 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) | 1252 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) |
| 1258 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), | 1253 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), |
| 1259 file_task_runner); | 1254 file_task_runner); |
| 1260 #endif | 1255 #endif |
| 1261 | 1256 |
| 1262 #if defined(OS_ANDROID) | 1257 #if defined(OS_ANDROID) |
| (...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3002 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2997 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3003 | 2998 |
| 3004 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 2999 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3005 // Capture the error message in a crash key value. | 3000 // Capture the error message in a crash key value. |
| 3006 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3001 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3007 bad_message::ReceivedBadMessage(render_process_id, | 3002 bad_message::ReceivedBadMessage(render_process_id, |
| 3008 bad_message::RPH_MOJO_PROCESS_ERROR); | 3003 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3009 } | 3004 } |
| 3010 | 3005 |
| 3011 } // namespace content | 3006 } // namespace content |
| OLD | NEW |