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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1476643002: mustash: Enable connections to mus from the Chrome renderer [take 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create a RenderWidgetWindowTreeeClientFactory in tests Created 5 years, 1 month 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 3b17ea0d15a56e5544b8bd2492366bfa42f917d4..bf5b570c840af3fed38a5e152db7a250475ababd 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -199,6 +199,11 @@
#include "v8/src/third_party/vtune/v8-vtune.h"
#endif
+#if defined(MOJO_SHELL_CLIENT)
+#include "content/public/common/mojo_shell_connection.h"
+#include "content/renderer/render_widget_window_tree_client_factory.h"
+#endif
+
using base::ThreadRestrictions;
using blink::WebDocument;
using blink::WebFrame;
@@ -768,6 +773,13 @@ void RenderThreadImpl::Init() {
service_registry()->AddService<EmbeddedWorkerSetup>(
base::Bind(CreateEmbeddedWorkerSetup));
+
+#if defined(MOJO_SHELL_CLIENT)
+ // We may not have a MojoShellConnection object in tests that directly
+ // instantiate a RenderThreadImpl.
+ if (MojoShellConnection::Get())
+ CreateRenderWidgetWindowTreeClientFactory();
+#endif
}
RenderThreadImpl::~RenderThreadImpl() {

Powered by Google App Engine
This is Rietveld 408576698