Index: mojo/services/view_manager/main.cc |
diff --git a/mojo/services/view_manager/view_manager.cc b/mojo/services/view_manager/main.cc |
similarity index 89% |
rename from mojo/services/view_manager/view_manager.cc |
rename to mojo/services/view_manager/main.cc |
index e2e09f5cb2fa5468dad4f25b9ddfd592dd707e5b..1fd452857d84fcd266148b9bb7fead78defe5d34 100644 |
--- a/mojo/services/view_manager/view_manager.cc |
+++ b/mojo/services/view_manager/main.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/at_exit.h" |
+#include "base/command_line.h" |
#include "base/message_loop/message_loop.h" |
#include "mojo/public/cpp/shell/application.h" |
#include "mojo/services/view_manager/root_node_manager.h" |
@@ -19,9 +21,11 @@ |
extern "C" VIEW_MANAGER_EXPORT MojoResult CDECL MojoMain( |
MojoHandle shell_handle) { |
+ CommandLine::Init(0, NULL); |
+ base::AtExitManager at_exit; |
base::MessageLoop loop; |
mojo::Application app(shell_handle); |
- mojo::services::view_manager::RootNodeManager root_node_manager; |
+ mojo::services::view_manager::RootNodeManager root_node_manager(app.shell()); |
app.AddServiceConnector(new mojo::ServiceConnector |
<mojo::services::view_manager::ViewManagerConnection, |
mojo::services::view_manager::RootNodeManager>( |