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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 ChildThreadImpl::discardable_shared_memory_manager()); 853 ChildThreadImpl::discardable_shared_memory_manager());
854 854
855 service_registry()->AddService<RenderFrameSetup>( 855 service_registry()->AddService<RenderFrameSetup>(
856 base::Bind(CreateRenderFrameSetup)); 856 base::Bind(CreateRenderFrameSetup));
857 service_registry()->AddService<EmbeddedWorkerSetup>( 857 service_registry()->AddService<EmbeddedWorkerSetup>(
858 base::Bind(CreateEmbeddedWorkerSetup)); 858 base::Bind(CreateEmbeddedWorkerSetup));
859 859
860 #if defined(MOJO_SHELL_CLIENT) 860 #if defined(MOJO_SHELL_CLIENT)
861 // We may not have a MojoShellConnection object in tests that directly 861 // We may not have a MojoShellConnection object in tests that directly
862 // instantiate a RenderThreadImpl. 862 // instantiate a RenderThreadImpl.
863 if (MojoShellConnection::Get()) 863 if (MojoShellConnection::Get() &&
864 base::CommandLine::ForCurrentProcess()->HasSwitch(
865 switches::kUseMusInRenderer))
864 CreateRenderWidgetWindowTreeClientFactory(); 866 CreateRenderWidgetWindowTreeClientFactory();
865 #endif 867 #endif
866 } 868 }
867 869
868 RenderThreadImpl::~RenderThreadImpl() { 870 RenderThreadImpl::~RenderThreadImpl() {
869 } 871 }
870 872
871 void RenderThreadImpl::Shutdown() { 873 void RenderThreadImpl::Shutdown() {
872 FOR_EACH_OBSERVER( 874 FOR_EACH_OBSERVER(
873 RenderProcessObserver, observers_, OnRenderProcessShutdown()); 875 RenderProcessObserver, observers_, OnRenderProcessShutdown());
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 } 2179 }
2178 2180
2179 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() { 2181 void RenderThreadImpl::PendingRenderFrameConnect::OnConnectionError() {
2180 size_t erased = 2182 size_t erased =
2181 RenderThreadImpl::current()->pending_render_frame_connects_.erase( 2183 RenderThreadImpl::current()->pending_render_frame_connects_.erase(
2182 routing_id_); 2184 routing_id_);
2183 DCHECK_EQ(1u, erased); 2185 DCHECK_EQ(1u, erased);
2184 } 2186 }
2185 2187
2186 } // namespace content 2188 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698