| Index: mojo/runner/desktop/main.cc
|
| diff --git a/mojo/runner/desktop/main.cc b/mojo/runner/desktop/main.cc
|
| index 1764c3f110008845807b793be043b98fdb7c5e87..47e636c7bf722230bb60221e2e18da24750bffc6 100644
|
| --- a/mojo/runner/desktop/main.cc
|
| +++ b/mojo/runner/desktop/main.cc
|
| @@ -4,9 +4,11 @@
|
|
|
| #include "base/at_exit.h"
|
| #include "base/command_line.h"
|
| +#include "base/files/file_path.h"
|
| #include "mojo/runner/child_process.h"
|
| #include "mojo/runner/desktop/launcher_process.h"
|
| #include "mojo/runner/init.h"
|
| +#include "mojo/runner/native_application_support.h"
|
| #include "mojo/runner/switches.h"
|
|
|
| int main(int argc, char** argv) {
|
| @@ -17,8 +19,16 @@ int main(int argc, char** argv) {
|
|
|
| const base::CommandLine& command_line =
|
| *base::CommandLine::ForCurrentProcess();
|
| - if (command_line.HasSwitch(switches::kChildProcess))
|
| - return mojo::runner::ChildProcessMain();
|
| + if (command_line.HasSwitch(switches::kChildProcess)) {
|
| + mojo::shell::NativeApplicationCleanup cleanup =
|
| + command_line.HasSwitch(switches::kDeleteAfterLoad)
|
| + ? mojo::shell::NativeApplicationCleanup::DELETE
|
| + : mojo::shell::NativeApplicationCleanup::DONT_DELETE;
|
| + base::NativeLibrary app_library = mojo::runner::LoadNativeApplication(
|
| + command_line.GetSwitchValuePath(switches::kChildProcess), cleanup);
|
| +
|
| + return mojo::runner::ChildProcessMain(app_library);
|
| + }
|
|
|
| return mojo::runner::LauncherProcessMain(argc, argv);
|
| }
|
|
|