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

Unified Diff: content/app/content_main_runner.cc

Issue 23235002: Set up content in-process main threads via factory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios Created 7 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/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 6554d572adbe6cbf20ee2914e68d4d912c7b44ab..c7421ef754d09aeeea75e7daa889b548dff7f3a4 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -26,17 +26,23 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "content/browser/browser_main.h"
+#include "content/browser/gpu/gpu_process_host.h"
#include "content/common/set_process_title.h"
#include "content/common/url_schemes.h"
+#include "content/gpu/gpu_main_thread.h"
#include "content/public/app/content_main_delegate.h"
#include "content/public/app/startup_helper_win.h"
#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/utility_process_host.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
#include "content/public/common/sandbox_init.h"
+#include "content/renderer/renderer_main_thread.h"
+#include "content/utility/utility_main_thread.h"
#include "crypto/nss_util.h"
#include "ipc/ipc_switches.h"
#include "media/base/media.h"
@@ -424,6 +430,13 @@ int RunNamedProcessTypeMain(
#endif // !CHROME_MULTIPLE_DLL_BROWSER
};
+#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
+ UtilityProcessHost::RegisterUtilityMainThreadFactory(CreateUtilityMainThread);
+ RenderProcessHost::RegisterRendererMainThreadFactory(
+ CreateRendererMainThread);
+ GpuProcessHost::RegisterGpuMainThreadFactory(CreateGpuMainThread);
+#endif
+
for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
if (process_type == kMainFunctions[i].name) {
if (delegate) {

Powered by Google App Engine
This is Rietveld 408576698