Index: mojo/services/launcher/launcher.cc |
diff --git a/mojo/services/launcher/launcher.cc b/mojo/services/launcher/launcher.cc |
index b24d232b30328e7a3f6690a5830409e8feec355b..cf5aab112cd7f77dda90e734c1791c8e5128c97e 100644 |
--- a/mojo/services/launcher/launcher.cc |
+++ b/mojo/services/launcher/launcher.cc |
@@ -10,6 +10,7 @@ |
#include "mojo/public/cpp/application/application_connection.h" |
#include "mojo/public/cpp/application/application_delegate.h" |
#include "mojo/public/cpp/application/application_impl.h" |
+#include "mojo/public/cpp/application/application_runner_chromium.h" |
#include "mojo/public/cpp/application/interface_factory_impl.h" |
#include "mojo/services/public/cpp/view_manager/types.h" |
#include "mojo/services/public/interfaces/launcher/launcher.mojom.h" |
@@ -174,9 +175,11 @@ void LaunchInstance::OnReceivedResponse(URLResponsePtr response) { |
ScheduleDestroy(); |
} |
-// static |
-ApplicationDelegate* ApplicationDelegate::Create() { |
- return new LauncherApp; |
-} |
- |
} // namespace mojo |
+ |
+extern "C" APPLICATION_EXPORT MojoResult CDECL MojoMain( |
+ MojoHandle shell_handle) { |
+ mojo::ApplicationRunnerChromium app; |
+ app.take_delegate(make_scoped_delegate(new mojo::LauncherApp)); |
+ return app.Run(shell_handle); |
+} |