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

Side by Side 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 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 <vector> 10 #include <vector>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 #include "content/renderer/media/peer_connection_tracker.h" 192 #include "content/renderer/media/peer_connection_tracker.h"
193 #include "content/renderer/media/rtc_peer_connection_handler.h" 193 #include "content/renderer/media/rtc_peer_connection_handler.h"
194 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 194 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
195 #include "content/renderer/media/webrtc_identity_service.h" 195 #include "content/renderer/media/webrtc_identity_service.h"
196 #endif 196 #endif
197 197
198 #ifdef ENABLE_VTUNE_JIT_INTERFACE 198 #ifdef ENABLE_VTUNE_JIT_INTERFACE
199 #include "v8/src/third_party/vtune/v8-vtune.h" 199 #include "v8/src/third_party/vtune/v8-vtune.h"
200 #endif 200 #endif
201 201
202 #if defined(MOJO_SHELL_CLIENT)
203 #include "content/public/common/mojo_shell_connection.h"
204 #include "content/renderer/render_widget_window_tree_client_factory.h"
205 #endif
206
202 using base::ThreadRestrictions; 207 using base::ThreadRestrictions;
203 using blink::WebDocument; 208 using blink::WebDocument;
204 using blink::WebFrame; 209 using blink::WebFrame;
205 using blink::WebNetworkStateNotifier; 210 using blink::WebNetworkStateNotifier;
206 using blink::WebRuntimeFeatures; 211 using blink::WebRuntimeFeatures;
207 using blink::WebScriptController; 212 using blink::WebScriptController;
208 using blink::WebSecurityPolicy; 213 using blink::WebSecurityPolicy;
209 using blink::WebString; 214 using blink::WebString;
210 using blink::WebView; 215 using blink::WebView;
211 216
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 raster_worker_pool_->Start(num_raster_threads, thread_options); 766 raster_worker_pool_->Start(num_raster_threads, thread_options);
762 767
763 // TODO(boliu): In single process, browser main loop should set up the 768 // TODO(boliu): In single process, browser main loop should set up the
764 // discardable memory manager, and should skip this if kSingleProcess. 769 // discardable memory manager, and should skip this if kSingleProcess.
765 // See crbug.com/503724. 770 // See crbug.com/503724.
766 base::DiscardableMemoryAllocator::SetInstance( 771 base::DiscardableMemoryAllocator::SetInstance(
767 ChildThreadImpl::discardable_shared_memory_manager()); 772 ChildThreadImpl::discardable_shared_memory_manager());
768 773
769 service_registry()->AddService<EmbeddedWorkerSetup>( 774 service_registry()->AddService<EmbeddedWorkerSetup>(
770 base::Bind(CreateEmbeddedWorkerSetup)); 775 base::Bind(CreateEmbeddedWorkerSetup));
776
777 #if defined(MOJO_SHELL_CLIENT)
778 // We may not have a MojoShellConnection object in tests that directly
779 // instantiate a RenderThreadImpl.
780 if (MojoShellConnection::Get())
781 CreateRenderWidgetWindowTreeClientFactory();
782 #endif
771 } 783 }
772 784
773 RenderThreadImpl::~RenderThreadImpl() { 785 RenderThreadImpl::~RenderThreadImpl() {
774 } 786 }
775 787
776 void RenderThreadImpl::Shutdown() { 788 void RenderThreadImpl::Shutdown() {
777 FOR_EACH_OBSERVER( 789 FOR_EACH_OBSERVER(
778 RenderProcessObserver, observers_, OnRenderProcessShutdown()); 790 RenderProcessObserver, observers_, OnRenderProcessShutdown());
779 791
780 ChildThreadImpl::Shutdown(); 792 ChildThreadImpl::Shutdown();
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1973 1985
1974 void RenderThreadImpl::ReleaseFreeMemory() { 1986 void RenderThreadImpl::ReleaseFreeMemory() {
1975 base::allocator::ReleaseFreeMemory(); 1987 base::allocator::ReleaseFreeMemory();
1976 discardable_shared_memory_manager()->ReleaseFreeMemory(); 1988 discardable_shared_memory_manager()->ReleaseFreeMemory();
1977 1989
1978 if (blink_platform_impl_) 1990 if (blink_platform_impl_)
1979 blink::decommitFreeableMemory(); 1991 blink::decommitFreeableMemory();
1980 } 1992 }
1981 1993
1982 } // namespace content 1994 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698