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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2111353002: Move content's shell connections to the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 304c589e7c69caf194802ab4eaaeb0913aafa6e7..cfb6278ba29b5091ec26eb9e5a6b4f3a7c1df5b9 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -142,6 +142,8 @@
#include "net/base/port_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
+#include "services/shell/public/cpp/interface_provider.h"
+#include "services/shell/public/cpp/interface_registry.h"
#include "skia/ext/event_tracer_impl.h"
#include "skia/ext/skia_memory_dump_provider.h"
#include "third_party/WebKit/public/platform/WebImageGenerator.h"
@@ -840,15 +842,6 @@ void RenderThreadImpl::Init(
GetInterfaceRegistry()->AddInterface(base::Bind(CreateFrameFactory));
GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup));
-#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
- // We may not have a MojoShellConnection object in tests that directly
- // instantiate a RenderThreadImpl.
- if (MojoShellConnection::GetForProcess() &&
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kUseMusInRenderer))
- CreateRenderWidgetWindowTreeClientFactory();
-#endif
-
GetRemoteInterfaces()->GetInterface(
mojo::GetProxy(&storage_partition_service_));
@@ -985,6 +978,15 @@ void RenderThreadImpl::Shutdown() {
lazy_tls.Pointer()->Set(NULL);
}
+void RenderThreadImpl::AddConnectionFilters(MojoShellConnection* connection) {
+#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseMusInRenderer)) {
+ CreateRenderWidgetWindowTreeClientFactory(connection);
+ }
+#endif
+}
+
bool RenderThreadImpl::Send(IPC::Message* msg) {
// There are cases where we want to pump asynchronous messages while waiting
// synchronously for the replies to the message to be sent here. However, this

Powered by Google App Engine
This is Rietveld 408576698