| Index: mojo/runner/android/main.cc
|
| diff --git a/mojo/runner/android/main.cc b/mojo/runner/android/main.cc
|
| index c395dfa0037012cefffcca96cbe1b82cb32f72dd..024405f86dc8825586fff4793a24cccdfe8e0d23 100644
|
| --- a/mojo/runner/android/main.cc
|
| +++ b/mojo/runner/android/main.cc
|
| @@ -28,6 +28,8 @@
|
| #include "mojo/runner/child_process.h"
|
| #include "mojo/runner/context.h"
|
| #include "mojo/runner/init.h"
|
| +#include "mojo/runner/native_application_support.h"
|
| +#include "mojo/runner/switches.h"
|
| #include "mojo/shell/application_loader.h"
|
| #include "ui/gl/gl_surface_egl.h"
|
|
|
| @@ -185,5 +187,15 @@ int main(int argc, char** argv) {
|
| base::CommandLine::Init(argc, argv);
|
|
|
| mojo::runner::InitializeLogging();
|
| - return mojo::runner::ChildProcessMain();
|
| +
|
| + const base::CommandLine& command_line =
|
| + *base::CommandLine::ForCurrentProcess();
|
| + CHECK(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);
|
| }
|
|
|