| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "shell/android/main.h" | 5 #include "shell/android/main.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "base/android/fifo_utils.h" | 9 #include "base/android/fifo_utils.h" |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 FROM_HERE, base::Bind(&StartApplicationByURL, url)); | 334 FROM_HERE, base::Bind(&StartApplicationByURL, url)); |
| 335 } | 335 } |
| 336 | 336 |
| 337 static void BindShell(JNIEnv* env, jclass clazz, jint shell_handle) { | 337 static void BindShell(JNIEnv* env, jclass clazz, jint shell_handle) { |
| 338 g_internal_data.Get().shell_task_runner->PostTask( | 338 g_internal_data.Get().shell_task_runner->PostTask( |
| 339 FROM_HERE, | 339 FROM_HERE, |
| 340 base::Bind(&BindShellImpl, base::Passed(mojo::ScopedMessagePipeHandle( | 340 base::Bind(&BindShellImpl, base::Passed(mojo::ScopedMessagePipeHandle( |
| 341 mojo::MessagePipeHandle(shell_handle))))); | 341 mojo::MessagePipeHandle(shell_handle))))); |
| 342 } | 342 } |
| 343 | 343 |
| 344 static void QuitShell(JNIEnv* env, jclass jcaller) { |
| 345 g_internal_data.Get().shell_task_runner->PostTask( |
| 346 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 347 } |
| 348 |
| 344 bool RegisterShellService(JNIEnv* env) { | 349 bool RegisterShellService(JNIEnv* env) { |
| 345 return RegisterNativesImpl(env); | 350 return RegisterNativesImpl(env); |
| 346 } | 351 } |
| 347 | 352 |
| 348 } // namespace shell | 353 } // namespace shell |
| OLD | NEW |