Chromium Code Reviews| Index: shell/android/main.cc |
| diff --git a/shell/android/main.cc b/shell/android/main.cc |
| index f94068422071deb41207106c73a04cd306724d2a..43001075aa4258aa230059ebd925bee59e3f5f13 100644 |
| --- a/shell/android/main.cc |
| +++ b/shell/android/main.cc |
| @@ -142,6 +142,10 @@ void ConfigureAndroidServices(Context* context) { |
| GURL("mojo:authenticated_network_service"), GURL("mojo:authentication")); |
| } |
| +void QuitShellMessageLoopCallback() { |
| + base::MessageLoop::current()->QuitWhenIdle(); |
| +} |
| + |
| void QuitShellThread() { |
| g_internal_data.Get().shell_thread->Join(); |
| g_internal_data.Get().shell_thread.reset(); |
| @@ -341,6 +345,11 @@ static void BindShell(JNIEnv* env, jclass clazz, jint shell_handle) { |
| mojo::MessagePipeHandle(shell_handle))))); |
| } |
| +static void QuitShell(JNIEnv* env, jclass jcaller) { |
| + g_internal_data.Get().shell_task_runner->PostTask( |
| + FROM_HERE, base::Bind(&QuitShellMessageLoopCallback)); |
|
qsr
2015/12/09 12:00:01
Why not use MessageLoop::QuitClosure() instead?
etiennej
2015/12/09 12:09:26
Done.
|
| +} |
| + |
| bool RegisterShellService(JNIEnv* env) { |
| return RegisterNativesImpl(env); |
| } |