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 // This file is autogenerated by | 5 // This file is autogenerated by |
6 // base/android/jni_generator/jni_generator.py | 6 // base/android/jni_generator/jni_generator.py |
7 // For | 7 // For |
8 // org/chromium/TestJni | 8 // org/chromium/TestJni |
9 | 9 |
10 #ifndef org_chromium_TestJni_JNI | 10 #ifndef org_chromium_TestJni_JNI |
(...skipping 14 matching lines...) Expand all Loading... |
25 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) | 25 #define TestJni_clazz(env) base::android::LazyGetClass(env, kTestJniClassPath, &
g_TestJni_clazz) |
26 // Leaking this jclass as we cannot use LazyInstance from some threads. | 26 // Leaking this jclass as we cannot use LazyInstance from some threads. |
27 base::subtle::AtomicWord g_InfoBar_clazz __attribute__((unused)) = 0; | 27 base::subtle::AtomicWord g_InfoBar_clazz __attribute__((unused)) = 0; |
28 #define InfoBar_clazz(env) base::android::LazyGetClass(env, kInfoBarClassPath, &
g_InfoBar_clazz) | 28 #define InfoBar_clazz(env) base::android::LazyGetClass(env, kInfoBarClassPath, &
g_InfoBar_clazz) |
29 | 29 |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 // Step 2: method stubs. | 32 // Step 2: method stubs. |
33 | 33 |
34 static base::subtle::AtomicWord g_TestJni_showConfirmInfoBar = 0; | 34 static base::subtle::AtomicWord g_TestJni_showConfirmInfoBar = 0; |
35 static ScopedJavaLocalRef<jobject> Java_TestJni_showConfirmInfoBar(JNIEnv* env, | 35 static base::android::ScopedJavaLocalRef<jobject> |
36 jobject obj, JniIntWrapper nativeInfoBar, | 36 Java_TestJni_showConfirmInfoBar(JNIEnv* env, jobject obj, JniIntWrapper |
| 37 nativeInfoBar, |
37 jstring buttonOk, | 38 jstring buttonOk, |
38 jstring buttonCancel, | 39 jstring buttonCancel, |
39 jstring title, | 40 jstring title, |
40 jobject icon) { | 41 jobject icon) { |
41 CHECK_CLAZZ(env, obj, | 42 CHECK_CLAZZ(env, obj, |
42 TestJni_clazz(env), NULL); | 43 TestJni_clazz(env), NULL); |
43 jmethodID method_id = | 44 jmethodID method_id = |
44 base::android::MethodID::LazyGet< | 45 base::android::MethodID::LazyGet< |
45 base::android::MethodID::TYPE_INSTANCE>( | 46 base::android::MethodID::TYPE_INSTANCE>( |
46 env, TestJni_clazz(env), | 47 env, TestJni_clazz(env), |
47 "showConfirmInfoBar", | 48 "showConfirmInfoBar", |
48 | 49 |
49 "(" | 50 "(" |
50 "I" | 51 "I" |
51 "Ljava/lang/String;" | 52 "Ljava/lang/String;" |
52 "Ljava/lang/String;" | 53 "Ljava/lang/String;" |
53 "Ljava/lang/String;" | 54 "Ljava/lang/String;" |
54 "Landroid/graphics/Bitmap;" | 55 "Landroid/graphics/Bitmap;" |
55 ")" | 56 ")" |
56 "Lorg/chromium/Foo$InnerClass;", | 57 "Lorg/chromium/Foo$InnerClass;", |
57 &g_TestJni_showConfirmInfoBar); | 58 &g_TestJni_showConfirmInfoBar); |
58 | 59 |
59 jobject ret = | 60 jobject ret = |
60 env->CallObjectMethod(obj, | 61 env->CallObjectMethod(obj, |
61 method_id, as_jint(nativeInfoBar), buttonOk, buttonCancel, title, | 62 method_id, as_jint(nativeInfoBar), buttonOk, buttonCancel, title, |
62 icon); | 63 icon); |
63 jni_generator::CheckException(env); | 64 jni_generator::CheckException(env); |
64 return ScopedJavaLocalRef<jobject>(env, ret); | 65 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
65 } | 66 } |
66 | 67 |
67 static base::subtle::AtomicWord g_TestJni_showAutoLoginInfoBar = 0; | 68 static base::subtle::AtomicWord g_TestJni_showAutoLoginInfoBar = 0; |
68 static ScopedJavaLocalRef<jobject> Java_TestJni_showAutoLoginInfoBar(JNIEnv* | 69 static base::android::ScopedJavaLocalRef<jobject> |
69 env, jobject obj, JniIntWrapper nativeInfoBar, | 70 Java_TestJni_showAutoLoginInfoBar(JNIEnv* env, jobject obj, JniIntWrapper |
| 71 nativeInfoBar, |
70 jstring realm, | 72 jstring realm, |
71 jstring account, | 73 jstring account, |
72 jstring args) { | 74 jstring args) { |
73 CHECK_CLAZZ(env, obj, | 75 CHECK_CLAZZ(env, obj, |
74 TestJni_clazz(env), NULL); | 76 TestJni_clazz(env), NULL); |
75 jmethodID method_id = | 77 jmethodID method_id = |
76 base::android::MethodID::LazyGet< | 78 base::android::MethodID::LazyGet< |
77 base::android::MethodID::TYPE_INSTANCE>( | 79 base::android::MethodID::TYPE_INSTANCE>( |
78 env, TestJni_clazz(env), | 80 env, TestJni_clazz(env), |
79 "showAutoLoginInfoBar", | 81 "showAutoLoginInfoBar", |
80 | 82 |
81 "(" | 83 "(" |
82 "I" | 84 "I" |
83 "Ljava/lang/String;" | 85 "Ljava/lang/String;" |
84 "Ljava/lang/String;" | 86 "Ljava/lang/String;" |
85 "Ljava/lang/String;" | 87 "Ljava/lang/String;" |
86 ")" | 88 ")" |
87 "Lorg/chromium/Foo$InnerClass;", | 89 "Lorg/chromium/Foo$InnerClass;", |
88 &g_TestJni_showAutoLoginInfoBar); | 90 &g_TestJni_showAutoLoginInfoBar); |
89 | 91 |
90 jobject ret = | 92 jobject ret = |
91 env->CallObjectMethod(obj, | 93 env->CallObjectMethod(obj, |
92 method_id, as_jint(nativeInfoBar), realm, account, args); | 94 method_id, as_jint(nativeInfoBar), realm, account, args); |
93 jni_generator::CheckException(env); | 95 jni_generator::CheckException(env); |
94 return ScopedJavaLocalRef<jobject>(env, ret); | 96 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
95 } | 97 } |
96 | 98 |
97 static base::subtle::AtomicWord g_InfoBar_dismiss = 0; | 99 static base::subtle::AtomicWord g_InfoBar_dismiss = 0; |
98 static void Java_InfoBar_dismiss(JNIEnv* env, jobject obj) { | 100 static void Java_InfoBar_dismiss(JNIEnv* env, jobject obj) { |
99 CHECK_CLAZZ(env, obj, | 101 CHECK_CLAZZ(env, obj, |
100 InfoBar_clazz(env)); | 102 InfoBar_clazz(env)); |
101 jmethodID method_id = | 103 jmethodID method_id = |
102 base::android::MethodID::LazyGet< | 104 base::android::MethodID::LazyGet< |
103 base::android::MethodID::TYPE_INSTANCE>( | 105 base::android::MethodID::TYPE_INSTANCE>( |
104 env, InfoBar_clazz(env), | 106 env, InfoBar_clazz(env), |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 &g_TestJni_shouldShowAutoLogin); | 140 &g_TestJni_shouldShowAutoLogin); |
139 | 141 |
140 jboolean ret = | 142 jboolean ret = |
141 env->CallStaticBooleanMethod(TestJni_clazz(env), | 143 env->CallStaticBooleanMethod(TestJni_clazz(env), |
142 method_id, view, realm, account, args); | 144 method_id, view, realm, account, args); |
143 jni_generator::CheckException(env); | 145 jni_generator::CheckException(env); |
144 return ret; | 146 return ret; |
145 } | 147 } |
146 | 148 |
147 static base::subtle::AtomicWord g_TestJni_openUrl = 0; | 149 static base::subtle::AtomicWord g_TestJni_openUrl = 0; |
148 static ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* env, jstring | 150 static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* |
149 url) { | 151 env, jstring url) { |
150 CHECK_CLAZZ(env, TestJni_clazz(env), | 152 CHECK_CLAZZ(env, TestJni_clazz(env), |
151 TestJni_clazz(env), NULL); | 153 TestJni_clazz(env), NULL); |
152 jmethodID method_id = | 154 jmethodID method_id = |
153 base::android::MethodID::LazyGet< | 155 base::android::MethodID::LazyGet< |
154 base::android::MethodID::TYPE_STATIC>( | 156 base::android::MethodID::TYPE_STATIC>( |
155 env, TestJni_clazz(env), | 157 env, TestJni_clazz(env), |
156 "openUrl", | 158 "openUrl", |
157 | 159 |
158 "(" | 160 "(" |
159 "Ljava/lang/String;" | 161 "Ljava/lang/String;" |
160 ")" | 162 ")" |
161 "Ljava/io/InputStream;", | 163 "Ljava/io/InputStream;", |
162 &g_TestJni_openUrl); | 164 &g_TestJni_openUrl); |
163 | 165 |
164 jobject ret = | 166 jobject ret = |
165 env->CallStaticObjectMethod(TestJni_clazz(env), | 167 env->CallStaticObjectMethod(TestJni_clazz(env), |
166 method_id, url); | 168 method_id, url); |
167 jni_generator::CheckException(env); | 169 jni_generator::CheckException(env); |
168 return ScopedJavaLocalRef<jobject>(env, ret); | 170 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
169 } | 171 } |
170 | 172 |
171 static base::subtle::AtomicWord g_TestJni_activateHardwareAcceleration = 0; | 173 static base::subtle::AtomicWord g_TestJni_activateHardwareAcceleration = 0; |
172 static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, jobject obj, | 174 static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, jobject obj, |
173 jboolean activated, | 175 jboolean activated, |
174 JniIntWrapper iPid, | 176 JniIntWrapper iPid, |
175 JniIntWrapper iType, | 177 JniIntWrapper iType, |
176 JniIntWrapper iPrimaryID, | 178 JniIntWrapper iPrimaryID, |
177 JniIntWrapper iSecondaryID) { | 179 JniIntWrapper iSecondaryID) { |
178 CHECK_CLAZZ(env, obj, | 180 CHECK_CLAZZ(env, obj, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ")" | 218 ")" |
217 "V", | 219 "V", |
218 &g_TestJni_uncheckedCall); | 220 &g_TestJni_uncheckedCall); |
219 | 221 |
220 env->CallVoidMethod(obj, | 222 env->CallVoidMethod(obj, |
221 method_id, as_jint(iParam)); | 223 method_id, as_jint(iParam)); |
222 | 224 |
223 } | 225 } |
224 | 226 |
225 static base::subtle::AtomicWord g_TestJni_returnByteArray = 0; | 227 static base::subtle::AtomicWord g_TestJni_returnByteArray = 0; |
226 static ScopedJavaLocalRef<jbyteArray> Java_TestJni_returnByteArray(JNIEnv* env, | 228 static base::android::ScopedJavaLocalRef<jbyteArray> |
227 jobject obj) { | 229 Java_TestJni_returnByteArray(JNIEnv* env, jobject obj) { |
228 CHECK_CLAZZ(env, obj, | 230 CHECK_CLAZZ(env, obj, |
229 TestJni_clazz(env), NULL); | 231 TestJni_clazz(env), NULL); |
230 jmethodID method_id = | 232 jmethodID method_id = |
231 base::android::MethodID::LazyGet< | 233 base::android::MethodID::LazyGet< |
232 base::android::MethodID::TYPE_INSTANCE>( | 234 base::android::MethodID::TYPE_INSTANCE>( |
233 env, TestJni_clazz(env), | 235 env, TestJni_clazz(env), |
234 "returnByteArray", | 236 "returnByteArray", |
235 | 237 |
236 "(" | 238 "(" |
237 ")" | 239 ")" |
238 "[B", | 240 "[B", |
239 &g_TestJni_returnByteArray); | 241 &g_TestJni_returnByteArray); |
240 | 242 |
241 jbyteArray ret = | 243 jbyteArray ret = |
242 static_cast<jbyteArray>(env->CallObjectMethod(obj, | 244 static_cast<jbyteArray>(env->CallObjectMethod(obj, |
243 method_id)); | 245 method_id)); |
244 jni_generator::CheckException(env); | 246 jni_generator::CheckException(env); |
245 return ScopedJavaLocalRef<jbyteArray>(env, ret); | 247 return base::android::ScopedJavaLocalRef<jbyteArray>(env, ret); |
246 } | 248 } |
247 | 249 |
248 static base::subtle::AtomicWord g_TestJni_returnBooleanArray = 0; | 250 static base::subtle::AtomicWord g_TestJni_returnBooleanArray = 0; |
249 static ScopedJavaLocalRef<jbooleanArray> Java_TestJni_returnBooleanArray(JNIEnv* | 251 static base::android::ScopedJavaLocalRef<jbooleanArray> |
250 env, jobject obj) { | 252 Java_TestJni_returnBooleanArray(JNIEnv* env, jobject obj) { |
251 CHECK_CLAZZ(env, obj, | 253 CHECK_CLAZZ(env, obj, |
252 TestJni_clazz(env), NULL); | 254 TestJni_clazz(env), NULL); |
253 jmethodID method_id = | 255 jmethodID method_id = |
254 base::android::MethodID::LazyGet< | 256 base::android::MethodID::LazyGet< |
255 base::android::MethodID::TYPE_INSTANCE>( | 257 base::android::MethodID::TYPE_INSTANCE>( |
256 env, TestJni_clazz(env), | 258 env, TestJni_clazz(env), |
257 "returnBooleanArray", | 259 "returnBooleanArray", |
258 | 260 |
259 "(" | 261 "(" |
260 ")" | 262 ")" |
261 "[Z", | 263 "[Z", |
262 &g_TestJni_returnBooleanArray); | 264 &g_TestJni_returnBooleanArray); |
263 | 265 |
264 jbooleanArray ret = | 266 jbooleanArray ret = |
265 static_cast<jbooleanArray>(env->CallObjectMethod(obj, | 267 static_cast<jbooleanArray>(env->CallObjectMethod(obj, |
266 method_id)); | 268 method_id)); |
267 jni_generator::CheckException(env); | 269 jni_generator::CheckException(env); |
268 return ScopedJavaLocalRef<jbooleanArray>(env, ret); | 270 return base::android::ScopedJavaLocalRef<jbooleanArray>(env, ret); |
269 } | 271 } |
270 | 272 |
271 static base::subtle::AtomicWord g_TestJni_returnCharArray = 0; | 273 static base::subtle::AtomicWord g_TestJni_returnCharArray = 0; |
272 static ScopedJavaLocalRef<jcharArray> Java_TestJni_returnCharArray(JNIEnv* env, | 274 static base::android::ScopedJavaLocalRef<jcharArray> |
273 jobject obj) { | 275 Java_TestJni_returnCharArray(JNIEnv* env, jobject obj) { |
274 CHECK_CLAZZ(env, obj, | 276 CHECK_CLAZZ(env, obj, |
275 TestJni_clazz(env), NULL); | 277 TestJni_clazz(env), NULL); |
276 jmethodID method_id = | 278 jmethodID method_id = |
277 base::android::MethodID::LazyGet< | 279 base::android::MethodID::LazyGet< |
278 base::android::MethodID::TYPE_INSTANCE>( | 280 base::android::MethodID::TYPE_INSTANCE>( |
279 env, TestJni_clazz(env), | 281 env, TestJni_clazz(env), |
280 "returnCharArray", | 282 "returnCharArray", |
281 | 283 |
282 "(" | 284 "(" |
283 ")" | 285 ")" |
284 "[C", | 286 "[C", |
285 &g_TestJni_returnCharArray); | 287 &g_TestJni_returnCharArray); |
286 | 288 |
287 jcharArray ret = | 289 jcharArray ret = |
288 static_cast<jcharArray>(env->CallObjectMethod(obj, | 290 static_cast<jcharArray>(env->CallObjectMethod(obj, |
289 method_id)); | 291 method_id)); |
290 jni_generator::CheckException(env); | 292 jni_generator::CheckException(env); |
291 return ScopedJavaLocalRef<jcharArray>(env, ret); | 293 return base::android::ScopedJavaLocalRef<jcharArray>(env, ret); |
292 } | 294 } |
293 | 295 |
294 static base::subtle::AtomicWord g_TestJni_returnShortArray = 0; | 296 static base::subtle::AtomicWord g_TestJni_returnShortArray = 0; |
295 static ScopedJavaLocalRef<jshortArray> Java_TestJni_returnShortArray(JNIEnv* | 297 static base::android::ScopedJavaLocalRef<jshortArray> |
296 env, jobject obj) { | 298 Java_TestJni_returnShortArray(JNIEnv* env, jobject obj) { |
297 CHECK_CLAZZ(env, obj, | 299 CHECK_CLAZZ(env, obj, |
298 TestJni_clazz(env), NULL); | 300 TestJni_clazz(env), NULL); |
299 jmethodID method_id = | 301 jmethodID method_id = |
300 base::android::MethodID::LazyGet< | 302 base::android::MethodID::LazyGet< |
301 base::android::MethodID::TYPE_INSTANCE>( | 303 base::android::MethodID::TYPE_INSTANCE>( |
302 env, TestJni_clazz(env), | 304 env, TestJni_clazz(env), |
303 "returnShortArray", | 305 "returnShortArray", |
304 | 306 |
305 "(" | 307 "(" |
306 ")" | 308 ")" |
307 "[S", | 309 "[S", |
308 &g_TestJni_returnShortArray); | 310 &g_TestJni_returnShortArray); |
309 | 311 |
310 jshortArray ret = | 312 jshortArray ret = |
311 static_cast<jshortArray>(env->CallObjectMethod(obj, | 313 static_cast<jshortArray>(env->CallObjectMethod(obj, |
312 method_id)); | 314 method_id)); |
313 jni_generator::CheckException(env); | 315 jni_generator::CheckException(env); |
314 return ScopedJavaLocalRef<jshortArray>(env, ret); | 316 return base::android::ScopedJavaLocalRef<jshortArray>(env, ret); |
315 } | 317 } |
316 | 318 |
317 static base::subtle::AtomicWord g_TestJni_returnIntArray = 0; | 319 static base::subtle::AtomicWord g_TestJni_returnIntArray = 0; |
318 static ScopedJavaLocalRef<jintArray> Java_TestJni_returnIntArray(JNIEnv* env, | 320 static base::android::ScopedJavaLocalRef<jintArray> |
319 jobject obj) { | 321 Java_TestJni_returnIntArray(JNIEnv* env, jobject obj) { |
320 CHECK_CLAZZ(env, obj, | 322 CHECK_CLAZZ(env, obj, |
321 TestJni_clazz(env), NULL); | 323 TestJni_clazz(env), NULL); |
322 jmethodID method_id = | 324 jmethodID method_id = |
323 base::android::MethodID::LazyGet< | 325 base::android::MethodID::LazyGet< |
324 base::android::MethodID::TYPE_INSTANCE>( | 326 base::android::MethodID::TYPE_INSTANCE>( |
325 env, TestJni_clazz(env), | 327 env, TestJni_clazz(env), |
326 "returnIntArray", | 328 "returnIntArray", |
327 | 329 |
328 "(" | 330 "(" |
329 ")" | 331 ")" |
330 "[I", | 332 "[I", |
331 &g_TestJni_returnIntArray); | 333 &g_TestJni_returnIntArray); |
332 | 334 |
333 jintArray ret = | 335 jintArray ret = |
334 static_cast<jintArray>(env->CallObjectMethod(obj, | 336 static_cast<jintArray>(env->CallObjectMethod(obj, |
335 method_id)); | 337 method_id)); |
336 jni_generator::CheckException(env); | 338 jni_generator::CheckException(env); |
337 return ScopedJavaLocalRef<jintArray>(env, ret); | 339 return base::android::ScopedJavaLocalRef<jintArray>(env, ret); |
338 } | 340 } |
339 | 341 |
340 static base::subtle::AtomicWord g_TestJni_returnLongArray = 0; | 342 static base::subtle::AtomicWord g_TestJni_returnLongArray = 0; |
341 static ScopedJavaLocalRef<jlongArray> Java_TestJni_returnLongArray(JNIEnv* env, | 343 static base::android::ScopedJavaLocalRef<jlongArray> |
342 jobject obj) { | 344 Java_TestJni_returnLongArray(JNIEnv* env, jobject obj) { |
343 CHECK_CLAZZ(env, obj, | 345 CHECK_CLAZZ(env, obj, |
344 TestJni_clazz(env), NULL); | 346 TestJni_clazz(env), NULL); |
345 jmethodID method_id = | 347 jmethodID method_id = |
346 base::android::MethodID::LazyGet< | 348 base::android::MethodID::LazyGet< |
347 base::android::MethodID::TYPE_INSTANCE>( | 349 base::android::MethodID::TYPE_INSTANCE>( |
348 env, TestJni_clazz(env), | 350 env, TestJni_clazz(env), |
349 "returnLongArray", | 351 "returnLongArray", |
350 | 352 |
351 "(" | 353 "(" |
352 ")" | 354 ")" |
353 "[J", | 355 "[J", |
354 &g_TestJni_returnLongArray); | 356 &g_TestJni_returnLongArray); |
355 | 357 |
356 jlongArray ret = | 358 jlongArray ret = |
357 static_cast<jlongArray>(env->CallObjectMethod(obj, | 359 static_cast<jlongArray>(env->CallObjectMethod(obj, |
358 method_id)); | 360 method_id)); |
359 jni_generator::CheckException(env); | 361 jni_generator::CheckException(env); |
360 return ScopedJavaLocalRef<jlongArray>(env, ret); | 362 return base::android::ScopedJavaLocalRef<jlongArray>(env, ret); |
361 } | 363 } |
362 | 364 |
363 static base::subtle::AtomicWord g_TestJni_returnDoubleArray = 0; | 365 static base::subtle::AtomicWord g_TestJni_returnDoubleArray = 0; |
364 static ScopedJavaLocalRef<jdoubleArray> Java_TestJni_returnDoubleArray(JNIEnv* | 366 static base::android::ScopedJavaLocalRef<jdoubleArray> |
365 env, jobject obj) { | 367 Java_TestJni_returnDoubleArray(JNIEnv* env, jobject obj) { |
366 CHECK_CLAZZ(env, obj, | 368 CHECK_CLAZZ(env, obj, |
367 TestJni_clazz(env), NULL); | 369 TestJni_clazz(env), NULL); |
368 jmethodID method_id = | 370 jmethodID method_id = |
369 base::android::MethodID::LazyGet< | 371 base::android::MethodID::LazyGet< |
370 base::android::MethodID::TYPE_INSTANCE>( | 372 base::android::MethodID::TYPE_INSTANCE>( |
371 env, TestJni_clazz(env), | 373 env, TestJni_clazz(env), |
372 "returnDoubleArray", | 374 "returnDoubleArray", |
373 | 375 |
374 "(" | 376 "(" |
375 ")" | 377 ")" |
376 "[D", | 378 "[D", |
377 &g_TestJni_returnDoubleArray); | 379 &g_TestJni_returnDoubleArray); |
378 | 380 |
379 jdoubleArray ret = | 381 jdoubleArray ret = |
380 static_cast<jdoubleArray>(env->CallObjectMethod(obj, | 382 static_cast<jdoubleArray>(env->CallObjectMethod(obj, |
381 method_id)); | 383 method_id)); |
382 jni_generator::CheckException(env); | 384 jni_generator::CheckException(env); |
383 return ScopedJavaLocalRef<jdoubleArray>(env, ret); | 385 return base::android::ScopedJavaLocalRef<jdoubleArray>(env, ret); |
384 } | 386 } |
385 | 387 |
386 static base::subtle::AtomicWord g_TestJni_returnObjectArray = 0; | 388 static base::subtle::AtomicWord g_TestJni_returnObjectArray = 0; |
387 static ScopedJavaLocalRef<jobjectArray> Java_TestJni_returnObjectArray(JNIEnv* | 389 static base::android::ScopedJavaLocalRef<jobjectArray> |
388 env, jobject obj) { | 390 Java_TestJni_returnObjectArray(JNIEnv* env, jobject obj) { |
389 CHECK_CLAZZ(env, obj, | 391 CHECK_CLAZZ(env, obj, |
390 TestJni_clazz(env), NULL); | 392 TestJni_clazz(env), NULL); |
391 jmethodID method_id = | 393 jmethodID method_id = |
392 base::android::MethodID::LazyGet< | 394 base::android::MethodID::LazyGet< |
393 base::android::MethodID::TYPE_INSTANCE>( | 395 base::android::MethodID::TYPE_INSTANCE>( |
394 env, TestJni_clazz(env), | 396 env, TestJni_clazz(env), |
395 "returnObjectArray", | 397 "returnObjectArray", |
396 | 398 |
397 "(" | 399 "(" |
398 ")" | 400 ")" |
399 "[Ljava/lang/Object;", | 401 "[Ljava/lang/Object;", |
400 &g_TestJni_returnObjectArray); | 402 &g_TestJni_returnObjectArray); |
401 | 403 |
402 jobjectArray ret = | 404 jobjectArray ret = |
403 static_cast<jobjectArray>(env->CallObjectMethod(obj, | 405 static_cast<jobjectArray>(env->CallObjectMethod(obj, |
404 method_id)); | 406 method_id)); |
405 jni_generator::CheckException(env); | 407 jni_generator::CheckException(env); |
406 return ScopedJavaLocalRef<jobjectArray>(env, ret); | 408 return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret); |
407 } | 409 } |
408 | 410 |
409 static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0; | 411 static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0; |
410 static ScopedJavaLocalRef<jobjectArray> | 412 static base::android::ScopedJavaLocalRef<jobjectArray> |
411 Java_TestJni_returnArrayOfByteArray(JNIEnv* env, jobject obj) { | 413 Java_TestJni_returnArrayOfByteArray(JNIEnv* env, jobject obj) { |
412 CHECK_CLAZZ(env, obj, | 414 CHECK_CLAZZ(env, obj, |
413 TestJni_clazz(env), NULL); | 415 TestJni_clazz(env), NULL); |
414 jmethodID method_id = | 416 jmethodID method_id = |
415 base::android::MethodID::LazyGet< | 417 base::android::MethodID::LazyGet< |
416 base::android::MethodID::TYPE_INSTANCE>( | 418 base::android::MethodID::TYPE_INSTANCE>( |
417 env, TestJni_clazz(env), | 419 env, TestJni_clazz(env), |
418 "returnArrayOfByteArray", | 420 "returnArrayOfByteArray", |
419 | 421 |
420 "(" | 422 "(" |
421 ")" | 423 ")" |
422 "[[B", | 424 "[[B", |
423 &g_TestJni_returnArrayOfByteArray); | 425 &g_TestJni_returnArrayOfByteArray); |
424 | 426 |
425 jobjectArray ret = | 427 jobjectArray ret = |
426 static_cast<jobjectArray>(env->CallObjectMethod(obj, | 428 static_cast<jobjectArray>(env->CallObjectMethod(obj, |
427 method_id)); | 429 method_id)); |
428 jni_generator::CheckException(env); | 430 jni_generator::CheckException(env); |
429 return ScopedJavaLocalRef<jobjectArray>(env, ret); | 431 return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret); |
430 } | 432 } |
431 | 433 |
432 static base::subtle::AtomicWord g_TestJni_getCompressFormat = 0; | 434 static base::subtle::AtomicWord g_TestJni_getCompressFormat = 0; |
433 static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormat(JNIEnv* env, | 435 static base::android::ScopedJavaLocalRef<jobject> |
434 jobject obj) { | 436 Java_TestJni_getCompressFormat(JNIEnv* env, jobject obj) { |
435 CHECK_CLAZZ(env, obj, | 437 CHECK_CLAZZ(env, obj, |
436 TestJni_clazz(env), NULL); | 438 TestJni_clazz(env), NULL); |
437 jmethodID method_id = | 439 jmethodID method_id = |
438 base::android::MethodID::LazyGet< | 440 base::android::MethodID::LazyGet< |
439 base::android::MethodID::TYPE_INSTANCE>( | 441 base::android::MethodID::TYPE_INSTANCE>( |
440 env, TestJni_clazz(env), | 442 env, TestJni_clazz(env), |
441 "getCompressFormat", | 443 "getCompressFormat", |
442 | 444 |
443 "(" | 445 "(" |
444 ")" | 446 ")" |
445 "Landroid/graphics/Bitmap$CompressFormat;", | 447 "Landroid/graphics/Bitmap$CompressFormat;", |
446 &g_TestJni_getCompressFormat); | 448 &g_TestJni_getCompressFormat); |
447 | 449 |
448 jobject ret = | 450 jobject ret = |
449 env->CallObjectMethod(obj, | 451 env->CallObjectMethod(obj, |
450 method_id); | 452 method_id); |
451 jni_generator::CheckException(env); | 453 jni_generator::CheckException(env); |
452 return ScopedJavaLocalRef<jobject>(env, ret); | 454 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
453 } | 455 } |
454 | 456 |
455 static base::subtle::AtomicWord g_TestJni_getCompressFormatList = 0; | 457 static base::subtle::AtomicWord g_TestJni_getCompressFormatList = 0; |
456 static ScopedJavaLocalRef<jobject> Java_TestJni_getCompressFormatList(JNIEnv* | 458 static base::android::ScopedJavaLocalRef<jobject> |
457 env, jobject obj) { | 459 Java_TestJni_getCompressFormatList(JNIEnv* env, jobject obj) { |
458 CHECK_CLAZZ(env, obj, | 460 CHECK_CLAZZ(env, obj, |
459 TestJni_clazz(env), NULL); | 461 TestJni_clazz(env), NULL); |
460 jmethodID method_id = | 462 jmethodID method_id = |
461 base::android::MethodID::LazyGet< | 463 base::android::MethodID::LazyGet< |
462 base::android::MethodID::TYPE_INSTANCE>( | 464 base::android::MethodID::TYPE_INSTANCE>( |
463 env, TestJni_clazz(env), | 465 env, TestJni_clazz(env), |
464 "getCompressFormatList", | 466 "getCompressFormatList", |
465 | 467 |
466 "(" | 468 "(" |
467 ")" | 469 ")" |
468 "Ljava/util/List;", | 470 "Ljava/util/List;", |
469 &g_TestJni_getCompressFormatList); | 471 &g_TestJni_getCompressFormatList); |
470 | 472 |
471 jobject ret = | 473 jobject ret = |
472 env->CallObjectMethod(obj, | 474 env->CallObjectMethod(obj, |
473 method_id); | 475 method_id); |
474 jni_generator::CheckException(env); | 476 jni_generator::CheckException(env); |
475 return ScopedJavaLocalRef<jobject>(env, ret); | 477 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
476 } | 478 } |
477 | 479 |
478 // Step 3: RegisterNatives. | 480 // Step 3: RegisterNatives. |
479 | 481 |
480 #endif // org_chromium_TestJni_JNI | 482 #endif // org_chromium_TestJni_JNI |
OLD | NEW |