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 "third_party/mojo/src/mojo/public/c/environment/async_waiter.h" |
17 #include "mojo/public/c/system/core.h" | 17 #include "third_party/mojo/src/mojo/public/c/system/core.h" |
18 #include "mojo/public/cpp/environment/environment.h" | 18 #include "third_party/mojo/src/mojo/public/cpp/environment/environment.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // |AsyncWait| is guaranteed never to return 0. | 22 // |AsyncWait| is guaranteed never to return 0. |
23 const MojoAsyncWaitID kInvalidHandleCancelID = 0; | 23 const MojoAsyncWaitID kInvalidHandleCancelID = 0; |
24 | 24 |
25 struct AsyncWaitCallbackData { | 25 struct AsyncWaitCallbackData { |
26 base::android::ScopedJavaGlobalRef<jobject> core_impl; | 26 base::android::ScopedJavaGlobalRef<jobject> core_impl; |
27 base::android::ScopedJavaGlobalRef<jobject> callback; | 27 base::android::ScopedJavaGlobalRef<jobject> callback; |
28 base::android::ScopedJavaGlobalRef<jobject> cancellable; | 28 base::android::ScopedJavaGlobalRef<jobject> cancellable; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 return 0; | 410 return 0; |
411 return alignment - offset; | 411 return alignment - offset; |
412 } | 412 } |
413 | 413 |
414 bool RegisterCoreImpl(JNIEnv* env) { | 414 bool RegisterCoreImpl(JNIEnv* env) { |
415 return RegisterNativesImpl(env); | 415 return RegisterNativesImpl(env); |
416 } | 416 } |
417 | 417 |
418 } // namespace android | 418 } // namespace android |
419 } // namespace mojo | 419 } // namespace mojo |
OLD | NEW |