Add creation of ServiceManager to Content (2nd try)
Original cl: https://codereview.chromium.org/187183002/
BUG=
[email protected]
Review URL: https://codereview.chromium.org/213313004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259779 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index adf27a99..957d604e 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -101,6 +101,10 @@
}
#endif
+#if defined(USE_MOJO)
+#include "content/app/mojo/mojo_init.h"
+#endif
+
namespace content {
extern int GpuMain(const content::MainFunctionParams&);
#if defined(ENABLE_PLUGINS)
@@ -529,7 +533,7 @@
virtual int Initialize(const ContentMainParams& params) OVERRIDE {
ui_task_ = params.ui_task;
-#if defined(OS_WIN)
+#if defined(OS_WIN)
RegisterInvalidParamHandler();
_Module.Init(NULL, static_cast<HINSTANCE>(params.instance));
@@ -661,6 +665,11 @@
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
+#if defined(USE_MOJO)
+ // Initialize mojo here so that services can be registered.
+ InitializeMojo();
+#endif
+
if (!GetContentClient())
SetContentClient(&empty_content_client_);
ContentClientInitializer::Set(process_type, delegate_);