OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/message_loop/message_pump_android.h" | 5 #include "base/message_loop/message_pump_android.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "jni/SystemMessageHandler_jni.h" | 15 #include "jni/SystemMessageHandler_jni.h" |
16 | 16 |
| 17 using base::android::JavaParamRef; |
17 using base::android::ScopedJavaLocalRef; | 18 using base::android::ScopedJavaLocalRef; |
18 | 19 |
19 // ---------------------------------------------------------------------------- | 20 // ---------------------------------------------------------------------------- |
20 // Native JNI methods called by Java. | 21 // Native JNI methods called by Java. |
21 // ---------------------------------------------------------------------------- | 22 // ---------------------------------------------------------------------------- |
22 // This method can not move to anonymous namespace as it has been declared as | 23 // This method can not move to anonymous namespace as it has been declared as |
23 // 'static' in system_message_handler_jni.h. | 24 // 'static' in system_message_handler_jni.h. |
24 static void DoRunLoopOnce(JNIEnv* env, | 25 static void DoRunLoopOnce(JNIEnv* env, |
25 const JavaParamRef<jobject>& obj, | 26 const JavaParamRef<jobject>& obj, |
26 jlong native_delegate, | 27 jlong native_delegate, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 system_message_handler_obj_.obj(), | 156 system_message_handler_obj_.obj(), |
156 delayed_work_time.ToInternalValue(), millis); | 157 delayed_work_time.ToInternalValue(), millis); |
157 } | 158 } |
158 | 159 |
159 // static | 160 // static |
160 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) { | 161 bool MessagePumpForUI::RegisterBindings(JNIEnv* env) { |
161 return RegisterNativesImpl(env); | 162 return RegisterNativesImpl(env); |
162 } | 163 } |
163 | 164 |
164 } // namespace base | 165 } // namespace base |
OLD | NEW |