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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 382333002: Introduce ChannelMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5f4d4fb280e11282c5d955b23ccaf4a645d84e0d..e652d229f3a8dafb4e6b58e018370886ba4de931 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -295,6 +295,11 @@ void CreateRenderFrameSetup(mojo::InterfaceRequest<RenderFrameSetup> request) {
mojo::BindToRequest(new RenderFrameSetupImpl(), &request);
}
+bool ShouldUseMojoChannel() {
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableRendererMojoChannel);
+}
+
} // namespace
// For measuring memory usage after each task. Behind a command line flag.
@@ -363,12 +368,13 @@ RenderThreadImpl* RenderThreadImpl::current() {
// When we run plugins in process, we actually run them on the render thread,
// which means that we need to make the render thread pump UI events.
-RenderThreadImpl::RenderThreadImpl() {
+RenderThreadImpl::RenderThreadImpl()
+ : ChildThread(Options(ShouldUseMojoChannel())) {
Init();
}
RenderThreadImpl::RenderThreadImpl(const std::string& channel_name)
- : ChildThread(channel_name) {
+ : ChildThread(Options(channel_name, ShouldUseMojoChannel())) {
Init();
}

Powered by Google App Engine
This is Rietveld 408576698