| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/android/system/core_impl.h" | 5 #include "mojo/android/system/core_impl.h" |
| 6 | 6 |
| 7 #include "base/android/base_jni_registrar.h" | 7 #include "base/android/base_jni_registrar.h" |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/jni_registrar.h" | 9 #include "base/android/jni_registrar.h" |
| 10 #include "base/android/library_loader/library_loader_hooks.h" | 10 #include "base/android/library_loader/library_loader_hooks.h" |
| 11 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "jni/CoreImpl_jni.h" | 15 #include "jni/CoreImpl_jni.h" |
| 16 #include "mojo/public/c/environment/async_waiter.h" | 16 #include "mojo/public/c/environment/async_waiter.h" |
| 17 #include "mojo/public/c/system/buffer.h" | 17 #include "mojo/public/c/system/buffer.h" |
| 18 #include "mojo/public/c/system/data_pipe.h" | 18 #include "mojo/public/c/system/data_pipe.h" |
| 19 #include "mojo/public/c/system/functions.h" | |
| 20 #include "mojo/public/c/system/handle.h" | 19 #include "mojo/public/c/system/handle.h" |
| 21 #include "mojo/public/c/system/message_pipe.h" | 20 #include "mojo/public/c/system/message_pipe.h" |
| 22 #include "mojo/public/c/system/result.h" | 21 #include "mojo/public/c/system/result.h" |
| 22 #include "mojo/public/c/system/time.h" |
| 23 #include "mojo/public/c/system/wait.h" |
| 23 #include "mojo/public/cpp/environment/environment.h" | 24 #include "mojo/public/cpp/environment/environment.h" |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| 26 | 27 |
| 27 // |AsyncWait| is guaranteed never to return 0. | 28 // |AsyncWait| is guaranteed never to return 0. |
| 28 const MojoAsyncWaitID kInvalidHandleCancelID = 0; | 29 const MojoAsyncWaitID kInvalidHandleCancelID = 0; |
| 29 | 30 |
| 30 struct AsyncWaitCallbackData { | 31 struct AsyncWaitCallbackData { |
| 31 base::android::ScopedJavaGlobalRef<jobject> core_impl; | 32 base::android::ScopedJavaGlobalRef<jobject> core_impl; |
| 32 base::android::ScopedJavaGlobalRef<jobject> callback; | 33 base::android::ScopedJavaGlobalRef<jobject> callback; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 return 0; | 405 return 0; |
| 405 return alignment - offset; | 406 return alignment - offset; |
| 406 } | 407 } |
| 407 | 408 |
| 408 bool RegisterCoreImpl(JNIEnv* env) { | 409 bool RegisterCoreImpl(JNIEnv* env) { |
| 409 return RegisterNativesImpl(env); | 410 return RegisterNativesImpl(env); |
| 410 } | 411 } |
| 411 | 412 |
| 412 } // namespace android | 413 } // namespace android |
| 413 } // namespace mojo | 414 } // namespace mojo |
| OLD | NEW |