| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/android/base_jni_registrar.h" | 12 #include "base/android/base_jni_registrar.h" |
| 13 #include "base/android/jni_android.h" | 13 #include "base/android/jni_android.h" |
| 14 #include "base/android/jni_registrar.h" | 14 #include "base/android/jni_registrar.h" |
| 15 #include "base/android/library_loader/library_loader_hooks.h" | 15 #include "base/android/library_loader/library_loader_hooks.h" |
| 16 #include "base/android/scoped_java_ref.h" | 16 #include "base/android/scoped_java_ref.h" |
| 17 #include "base/bind.h" | 17 #include "base/bind.h" |
| 18 #include "base/location.h" | 18 #include "base/location.h" |
| 19 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
| 20 #include "base/threading/thread_task_runner_handle.h" | 20 #include "base/threading/thread_task_runner_handle.h" |
| 21 #include "jni/CoreImpl_jni.h" | 21 #include "jni/CoreImpl_jni.h" |
| 22 #include "mojo/message_pump/handle_watcher.h" | 22 #include "mojo/message_pump/handle_watcher.h" |
| 23 #include "mojo/public/c/system/core.h" | 23 #include "mojo/public/c/system/core.h" |
| 24 | 24 |
| 25 using base::android::JavaParamRef; |
| 26 using base::android::ScopedJavaLocalRef; |
| 27 |
| 25 namespace { | 28 namespace { |
| 26 | 29 |
| 27 using MojoAsyncWaitID = uintptr_t; | 30 using MojoAsyncWaitID = uintptr_t; |
| 28 const MojoAsyncWaitID kInvalidHandleCancelID = 0; | 31 const MojoAsyncWaitID kInvalidHandleCancelID = 0; |
| 29 | 32 |
| 30 struct AsyncWaitCallbackData { | 33 struct AsyncWaitCallbackData { |
| 31 base::android::ScopedJavaGlobalRef<jobject> core_impl; | 34 base::android::ScopedJavaGlobalRef<jobject> core_impl; |
| 32 base::android::ScopedJavaGlobalRef<jobject> callback; | 35 base::android::ScopedJavaGlobalRef<jobject> callback; |
| 33 base::android::ScopedJavaGlobalRef<jobject> cancellable; | 36 base::android::ScopedJavaGlobalRef<jobject> cancellable; |
| 34 | 37 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 return 0; | 424 return 0; |
| 422 return alignment - offset; | 425 return alignment - offset; |
| 423 } | 426 } |
| 424 | 427 |
| 425 bool RegisterCoreImpl(JNIEnv* env) { | 428 bool RegisterCoreImpl(JNIEnv* env) { |
| 426 return RegisterNativesImpl(env); | 429 return RegisterNativesImpl(env); |
| 427 } | 430 } |
| 428 | 431 |
| 429 } // namespace android | 432 } // namespace android |
| 430 } // namespace mojo | 433 } // namespace mojo |
| OLD | NEW |