Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2589493006: Revert of Enable connection to Mojo services from Blink (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/child/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
159 #include "content/public/common/mojo_channel_switches.h" 159 #include "content/public/common/mojo_channel_switches.h"
160 #include "content/public/common/process_type.h" 160 #include "content/public/common/process_type.h"
161 #include "content/public/common/resource_type.h" 161 #include "content/public/common/resource_type.h"
162 #include "content/public/common/result_codes.h" 162 #include "content/public/common/result_codes.h"
163 #include "content/public/common/sandboxed_process_launcher_delegate.h" 163 #include "content/public/common/sandboxed_process_launcher_delegate.h"
164 #include "content/public/common/service_names.mojom.h" 164 #include "content/public/common/service_names.mojom.h"
165 #include "content/public/common/url_constants.h" 165 #include "content/public/common/url_constants.h"
166 #include "device/battery/battery_monitor_impl.h" 166 #include "device/battery/battery_monitor_impl.h"
167 #include "device/gamepad/gamepad_monitor.h" 167 #include "device/gamepad/gamepad_monitor.h"
168 #include "device/power_monitor/power_monitor_message_broadcaster.h" 168 #include "device/power_monitor/power_monitor_message_broadcaster.h"
169 #include "device/time_zone_monitor/time_zone_monitor.h"
169 #include "gpu/GLES2/gl2extchromium.h" 170 #include "gpu/GLES2/gl2extchromium.h"
170 #include "gpu/command_buffer/client/gpu_switches.h" 171 #include "gpu/command_buffer/client/gpu_switches.h"
171 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 172 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
172 #include "gpu/command_buffer/service/gpu_switches.h" 173 #include "gpu/command_buffer/service/gpu_switches.h"
173 #include "ipc/ipc.mojom.h" 174 #include "ipc/ipc.mojom.h"
174 #include "ipc/ipc_channel.h" 175 #include "ipc/ipc_channel.h"
175 #include "ipc/ipc_channel_mojo.h" 176 #include "ipc/ipc_channel_mojo.h"
176 #include "ipc/ipc_logging.h" 177 #include "ipc/ipc_logging.h"
177 #include "media/base/media_switches.h" 178 #include "media/base/media_switches.h"
178 #include "media/media_features.h" 179 #include "media/media_features.h"
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 AddUIThreadInterface( 1238 AddUIThreadInterface(
1238 registry.get(), 1239 registry.get(),
1239 base::Bind(&BroadcastChannelProvider::Connect, 1240 base::Bind(&BroadcastChannelProvider::Connect,
1240 base::Unretained( 1241 base::Unretained(
1241 storage_partition_impl_->GetBroadcastChannelProvider()))); 1242 storage_partition_impl_->GetBroadcastChannelProvider())));
1242 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) { 1243 if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
1243 AddUIThreadInterface( 1244 AddUIThreadInterface(
1244 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID())); 1245 registry.get(), base::Bind(&CreateMemoryCoordinatorHandle, GetID()));
1245 } 1246 }
1246 1247
1248 // BrowserMainLoop, which owns TimeZoneMonitor, is alive for the lifetime of
1249 // Mojo communication (see BrowserMainLoop::ShutdownThreadsAndCleanUp(),
1250 // which shuts down Mojo). Hence, passing that TimeZoneMonitor instance as
1251 // a raw pointer here is safe.
1247 AddUIThreadInterface( 1252 AddUIThreadInterface(
1248 registry.get(), 1253 registry.get(),
1254 base::Bind(&device::TimeZoneMonitor::Bind,
1255 base::Unretained(
1256 BrowserMainLoop::GetInstance()->time_zone_monitor())));
1257
1258 AddUIThreadInterface(
1259 registry.get(),
1249 base::Bind(&device::PowerMonitorMessageBroadcaster::Create)); 1260 base::Bind(&device::PowerMonitorMessageBroadcaster::Create));
1250 1261
1251 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner = 1262 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner =
1252 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE); 1263 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE);
1253 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create), 1264 registry->AddInterface(base::Bind(&MimeRegistryImpl::Create),
1254 file_task_runner); 1265 file_task_runner);
1255 #if BUILDFLAG(USE_MINIKIN_HYPHENATION) 1266 #if BUILDFLAG(USE_MINIKIN_HYPHENATION)
1256 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create), 1267 registry->AddInterface(base::Bind(&hyphenation::HyphenationImpl::Create),
1257 file_task_runner); 1268 file_task_runner);
1258 #endif 1269 #endif
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
3013 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3024 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3014 3025
3015 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3026 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3016 // Capture the error message in a crash key value. 3027 // Capture the error message in a crash key value.
3017 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3028 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3018 bad_message::ReceivedBadMessage(render_process_id, 3029 bad_message::ReceivedBadMessage(render_process_id,
3019 bad_message::RPH_MOJO_PROCESS_ERROR); 3030 bad_message::RPH_MOJO_PROCESS_ERROR);
3020 } 3031 }
3021 3032
3022 } // namespace content 3033 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/child/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698