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 28 matching lines...) Expand all Loading... |
39 const base::android::JavaRefOrBare<jstring>& buttonCancel, | 39 const base::android::JavaRefOrBare<jstring>& buttonCancel, |
40 const base::android::JavaRefOrBare<jstring>& title, | 40 const base::android::JavaRefOrBare<jstring>& title, |
41 const base::android::JavaRefOrBare<jobject>& icon) { | 41 const base::android::JavaRefOrBare<jobject>& icon) { |
42 CHECK_CLAZZ(env, obj.obj(), | 42 CHECK_CLAZZ(env, obj.obj(), |
43 TestJni_clazz(env), NULL); | 43 TestJni_clazz(env), NULL); |
44 jmethodID method_id = | 44 jmethodID method_id = |
45 base::android::MethodID::LazyGet< | 45 base::android::MethodID::LazyGet< |
46 base::android::MethodID::TYPE_INSTANCE>( | 46 base::android::MethodID::TYPE_INSTANCE>( |
47 env, TestJni_clazz(env), | 47 env, TestJni_clazz(env), |
48 "showConfirmInfoBar", | 48 "showConfirmInfoBar", |
49 | |
50 "(" | 49 "(" |
51 "I" | 50 "I" |
52 "Ljava/lang/String;" | 51 "Ljava/lang/String;" |
53 "Ljava/lang/String;" | 52 "Ljava/lang/String;" |
54 "Ljava/lang/String;" | 53 "Ljava/lang/String;" |
55 "Landroid/graphics/Bitmap;" | 54 "Landroid/graphics/Bitmap;" |
56 ")" | 55 ")" |
57 "Lorg/chromium/Foo$InnerClass;", | 56 "Lorg/chromium/Foo$InnerClass;", |
58 &g_TestJni_showConfirmInfoBar); | 57 &g_TestJni_showConfirmInfoBar); |
59 | 58 |
(...skipping 12 matching lines...) Expand all Loading... |
72 const base::android::JavaRefOrBare<jstring>& realm, | 71 const base::android::JavaRefOrBare<jstring>& realm, |
73 const base::android::JavaRefOrBare<jstring>& account, | 72 const base::android::JavaRefOrBare<jstring>& account, |
74 const base::android::JavaRefOrBare<jstring>& args) { | 73 const base::android::JavaRefOrBare<jstring>& args) { |
75 CHECK_CLAZZ(env, obj.obj(), | 74 CHECK_CLAZZ(env, obj.obj(), |
76 TestJni_clazz(env), NULL); | 75 TestJni_clazz(env), NULL); |
77 jmethodID method_id = | 76 jmethodID method_id = |
78 base::android::MethodID::LazyGet< | 77 base::android::MethodID::LazyGet< |
79 base::android::MethodID::TYPE_INSTANCE>( | 78 base::android::MethodID::TYPE_INSTANCE>( |
80 env, TestJni_clazz(env), | 79 env, TestJni_clazz(env), |
81 "showAutoLoginInfoBar", | 80 "showAutoLoginInfoBar", |
82 | |
83 "(" | 81 "(" |
84 "I" | 82 "I" |
85 "Ljava/lang/String;" | 83 "Ljava/lang/String;" |
86 "Ljava/lang/String;" | 84 "Ljava/lang/String;" |
87 "Ljava/lang/String;" | 85 "Ljava/lang/String;" |
88 ")" | 86 ")" |
89 "Lorg/chromium/Foo$InnerClass;", | 87 "Lorg/chromium/Foo$InnerClass;", |
90 &g_TestJni_showAutoLoginInfoBar); | 88 &g_TestJni_showAutoLoginInfoBar); |
91 | 89 |
92 jobject ret = | 90 jobject ret = |
93 env->CallObjectMethod(obj.obj(), | 91 env->CallObjectMethod(obj.obj(), |
94 method_id, as_jint(nativeInfoBar), realm.obj(), account.obj(), | 92 method_id, as_jint(nativeInfoBar), realm.obj(), account.obj(), |
95 args.obj()); | 93 args.obj()); |
96 jni_generator::CheckException(env); | 94 jni_generator::CheckException(env); |
97 return base::android::ScopedJavaLocalRef<jobject>(env, ret); | 95 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
98 } | 96 } |
99 | 97 |
100 static base::subtle::AtomicWord g_InfoBar_dismiss = 0; | 98 static base::subtle::AtomicWord g_InfoBar_dismiss = 0; |
101 static void Java_InfoBar_dismiss(JNIEnv* env, const | 99 static void Java_InfoBar_dismiss(JNIEnv* env, const |
102 base::android::JavaRefOrBare<jobject>& obj) { | 100 base::android::JavaRefOrBare<jobject>& obj) { |
103 CHECK_CLAZZ(env, obj.obj(), | 101 CHECK_CLAZZ(env, obj.obj(), |
104 InfoBar_clazz(env)); | 102 InfoBar_clazz(env)); |
105 jmethodID method_id = | 103 jmethodID method_id = |
106 base::android::MethodID::LazyGet< | 104 base::android::MethodID::LazyGet< |
107 base::android::MethodID::TYPE_INSTANCE>( | 105 base::android::MethodID::TYPE_INSTANCE>( |
108 env, InfoBar_clazz(env), | 106 env, InfoBar_clazz(env), |
109 "dismiss", | 107 "dismiss", |
110 | |
111 "(" | 108 "(" |
112 ")" | 109 ")" |
113 "V", | 110 "V", |
114 &g_InfoBar_dismiss); | 111 &g_InfoBar_dismiss); |
115 | 112 |
116 env->CallVoidMethod(obj.obj(), | 113 env->CallVoidMethod(obj.obj(), |
117 method_id); | 114 method_id); |
118 jni_generator::CheckException(env); | 115 jni_generator::CheckException(env); |
119 | |
120 } | 116 } |
121 | 117 |
122 static base::subtle::AtomicWord g_TestJni_shouldShowAutoLogin = 0; | 118 static base::subtle::AtomicWord g_TestJni_shouldShowAutoLogin = 0; |
123 static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, const | 119 static jboolean Java_TestJni_shouldShowAutoLogin(JNIEnv* env, const |
124 base::android::JavaRefOrBare<jobject>& view, | 120 base::android::JavaRefOrBare<jobject>& view, |
125 const base::android::JavaRefOrBare<jstring>& realm, | 121 const base::android::JavaRefOrBare<jstring>& realm, |
126 const base::android::JavaRefOrBare<jstring>& account, | 122 const base::android::JavaRefOrBare<jstring>& account, |
127 const base::android::JavaRefOrBare<jstring>& args) { | 123 const base::android::JavaRefOrBare<jstring>& args) { |
128 CHECK_CLAZZ(env, TestJni_clazz(env), | 124 CHECK_CLAZZ(env, TestJni_clazz(env), |
129 TestJni_clazz(env), false); | 125 TestJni_clazz(env), false); |
130 jmethodID method_id = | 126 jmethodID method_id = |
131 base::android::MethodID::LazyGet< | 127 base::android::MethodID::LazyGet< |
132 base::android::MethodID::TYPE_STATIC>( | 128 base::android::MethodID::TYPE_STATIC>( |
133 env, TestJni_clazz(env), | 129 env, TestJni_clazz(env), |
134 "shouldShowAutoLogin", | 130 "shouldShowAutoLogin", |
135 | |
136 "(" | 131 "(" |
137 "Landroid/view/View;" | 132 "Landroid/view/View;" |
138 "Ljava/lang/String;" | 133 "Ljava/lang/String;" |
139 "Ljava/lang/String;" | 134 "Ljava/lang/String;" |
140 "Ljava/lang/String;" | 135 "Ljava/lang/String;" |
141 ")" | 136 ")" |
142 "Z", | 137 "Z", |
143 &g_TestJni_shouldShowAutoLogin); | 138 &g_TestJni_shouldShowAutoLogin); |
144 | 139 |
145 jboolean ret = | 140 jboolean ret = |
146 env->CallStaticBooleanMethod(TestJni_clazz(env), | 141 env->CallStaticBooleanMethod(TestJni_clazz(env), |
147 method_id, view.obj(), realm.obj(), account.obj(), args.obj()); | 142 method_id, view.obj(), realm.obj(), account.obj(), args.obj()); |
148 jni_generator::CheckException(env); | 143 jni_generator::CheckException(env); |
149 return ret; | 144 return ret; |
150 } | 145 } |
151 | 146 |
152 static base::subtle::AtomicWord g_TestJni_openUrl = 0; | 147 static base::subtle::AtomicWord g_TestJni_openUrl = 0; |
153 static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* | 148 static base::android::ScopedJavaLocalRef<jobject> Java_TestJni_openUrl(JNIEnv* |
154 env, const base::android::JavaRefOrBare<jstring>& url) { | 149 env, const base::android::JavaRefOrBare<jstring>& url) { |
155 CHECK_CLAZZ(env, TestJni_clazz(env), | 150 CHECK_CLAZZ(env, TestJni_clazz(env), |
156 TestJni_clazz(env), NULL); | 151 TestJni_clazz(env), NULL); |
157 jmethodID method_id = | 152 jmethodID method_id = |
158 base::android::MethodID::LazyGet< | 153 base::android::MethodID::LazyGet< |
159 base::android::MethodID::TYPE_STATIC>( | 154 base::android::MethodID::TYPE_STATIC>( |
160 env, TestJni_clazz(env), | 155 env, TestJni_clazz(env), |
161 "openUrl", | 156 "openUrl", |
162 | |
163 "(" | 157 "(" |
164 "Ljava/lang/String;" | 158 "Ljava/lang/String;" |
165 ")" | 159 ")" |
166 "Ljava/io/InputStream;", | 160 "Ljava/io/InputStream;", |
167 &g_TestJni_openUrl); | 161 &g_TestJni_openUrl); |
168 | 162 |
169 jobject ret = | 163 jobject ret = |
170 env->CallStaticObjectMethod(TestJni_clazz(env), | 164 env->CallStaticObjectMethod(TestJni_clazz(env), |
171 method_id, url.obj()); | 165 method_id, url.obj()); |
172 jni_generator::CheckException(env); | 166 jni_generator::CheckException(env); |
173 return base::android::ScopedJavaLocalRef<jobject>(env, ret); | 167 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
174 } | 168 } |
175 | 169 |
176 static base::subtle::AtomicWord g_TestJni_activateHardwareAcceleration = 0; | 170 static base::subtle::AtomicWord g_TestJni_activateHardwareAcceleration = 0; |
177 static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, const | 171 static void Java_TestJni_activateHardwareAcceleration(JNIEnv* env, const |
178 base::android::JavaRefOrBare<jobject>& obj, jboolean activated, | 172 base::android::JavaRefOrBare<jobject>& obj, jboolean activated, |
179 JniIntWrapper iPid, | 173 JniIntWrapper iPid, |
180 JniIntWrapper iType, | 174 JniIntWrapper iType, |
181 JniIntWrapper iPrimaryID, | 175 JniIntWrapper iPrimaryID, |
182 JniIntWrapper iSecondaryID) { | 176 JniIntWrapper iSecondaryID) { |
183 CHECK_CLAZZ(env, obj.obj(), | 177 CHECK_CLAZZ(env, obj.obj(), |
184 TestJni_clazz(env)); | 178 TestJni_clazz(env)); |
185 jmethodID method_id = | 179 jmethodID method_id = |
186 base::android::MethodID::LazyGet< | 180 base::android::MethodID::LazyGet< |
187 base::android::MethodID::TYPE_INSTANCE>( | 181 base::android::MethodID::TYPE_INSTANCE>( |
188 env, TestJni_clazz(env), | 182 env, TestJni_clazz(env), |
189 "activateHardwareAcceleration", | 183 "activateHardwareAcceleration", |
190 | |
191 "(" | 184 "(" |
192 "Z" | 185 "Z" |
193 "I" | 186 "I" |
194 "I" | 187 "I" |
195 "I" | 188 "I" |
196 "I" | 189 "I" |
197 ")" | 190 ")" |
198 "V", | 191 "V", |
199 &g_TestJni_activateHardwareAcceleration); | 192 &g_TestJni_activateHardwareAcceleration); |
200 | 193 |
201 env->CallVoidMethod(obj.obj(), | 194 env->CallVoidMethod(obj.obj(), |
202 method_id, activated, as_jint(iPid), as_jint(iType), | 195 method_id, activated, as_jint(iPid), as_jint(iType), |
203 as_jint(iPrimaryID), as_jint(iSecondaryID)); | 196 as_jint(iPrimaryID), as_jint(iSecondaryID)); |
204 jni_generator::CheckException(env); | 197 jni_generator::CheckException(env); |
205 | |
206 } | 198 } |
207 | 199 |
208 static base::subtle::AtomicWord g_TestJni_updateStatus = 0; | 200 static base::subtle::AtomicWord g_TestJni_updateStatus = 0; |
209 static jint Java_TestJni_updateStatus(JNIEnv* env, JniIntWrapper status) { | 201 static jint Java_TestJni_updateStatus(JNIEnv* env, JniIntWrapper status) { |
210 CHECK_CLAZZ(env, TestJni_clazz(env), | 202 CHECK_CLAZZ(env, TestJni_clazz(env), |
211 TestJni_clazz(env), 0); | 203 TestJni_clazz(env), 0); |
212 jmethodID method_id = | 204 jmethodID method_id = |
213 base::android::MethodID::LazyGet< | 205 base::android::MethodID::LazyGet< |
214 base::android::MethodID::TYPE_STATIC>( | 206 base::android::MethodID::TYPE_STATIC>( |
215 env, TestJni_clazz(env), | 207 env, TestJni_clazz(env), |
216 "updateStatus", | 208 "updateStatus", |
217 | |
218 "(" | 209 "(" |
219 "I" | 210 "I" |
220 ")" | 211 ")" |
221 "I", | 212 "I", |
222 &g_TestJni_updateStatus); | 213 &g_TestJni_updateStatus); |
223 | 214 |
224 jint ret = | 215 jint ret = |
225 env->CallStaticIntMethod(TestJni_clazz(env), | 216 env->CallStaticIntMethod(TestJni_clazz(env), |
226 method_id, as_jint(status)); | 217 method_id, as_jint(status)); |
227 jni_generator::CheckException(env); | 218 jni_generator::CheckException(env); |
228 return ret; | 219 return ret; |
229 } | 220 } |
230 | 221 |
231 static base::subtle::AtomicWord g_TestJni_uncheckedCall = 0; | 222 static base::subtle::AtomicWord g_TestJni_uncheckedCall = 0; |
232 static void Java_TestJni_uncheckedCall(JNIEnv* env, const | 223 static void Java_TestJni_uncheckedCall(JNIEnv* env, const |
233 base::android::JavaRefOrBare<jobject>& obj, JniIntWrapper iParam) { | 224 base::android::JavaRefOrBare<jobject>& obj, JniIntWrapper iParam) { |
234 CHECK_CLAZZ(env, obj.obj(), | 225 CHECK_CLAZZ(env, obj.obj(), |
235 TestJni_clazz(env)); | 226 TestJni_clazz(env)); |
236 jmethodID method_id = | 227 jmethodID method_id = |
237 base::android::MethodID::LazyGet< | 228 base::android::MethodID::LazyGet< |
238 base::android::MethodID::TYPE_INSTANCE>( | 229 base::android::MethodID::TYPE_INSTANCE>( |
239 env, TestJni_clazz(env), | 230 env, TestJni_clazz(env), |
240 "uncheckedCall", | 231 "uncheckedCall", |
241 | |
242 "(" | 232 "(" |
243 "I" | 233 "I" |
244 ")" | 234 ")" |
245 "V", | 235 "V", |
246 &g_TestJni_uncheckedCall); | 236 &g_TestJni_uncheckedCall); |
247 | 237 |
248 env->CallVoidMethod(obj.obj(), | 238 env->CallVoidMethod(obj.obj(), |
249 method_id, as_jint(iParam)); | 239 method_id, as_jint(iParam)); |
250 | |
251 } | 240 } |
252 | 241 |
253 static base::subtle::AtomicWord g_TestJni_returnByteArray = 0; | 242 static base::subtle::AtomicWord g_TestJni_returnByteArray = 0; |
254 static base::android::ScopedJavaLocalRef<jbyteArray> | 243 static base::android::ScopedJavaLocalRef<jbyteArray> |
255 Java_TestJni_returnByteArray(JNIEnv* env, const | 244 Java_TestJni_returnByteArray(JNIEnv* env, const |
256 base::android::JavaRefOrBare<jobject>& obj) { | 245 base::android::JavaRefOrBare<jobject>& obj) { |
257 CHECK_CLAZZ(env, obj.obj(), | 246 CHECK_CLAZZ(env, obj.obj(), |
258 TestJni_clazz(env), NULL); | 247 TestJni_clazz(env), NULL); |
259 jmethodID method_id = | 248 jmethodID method_id = |
260 base::android::MethodID::LazyGet< | 249 base::android::MethodID::LazyGet< |
261 base::android::MethodID::TYPE_INSTANCE>( | 250 base::android::MethodID::TYPE_INSTANCE>( |
262 env, TestJni_clazz(env), | 251 env, TestJni_clazz(env), |
263 "returnByteArray", | 252 "returnByteArray", |
264 | |
265 "(" | 253 "(" |
266 ")" | 254 ")" |
267 "[B", | 255 "[B", |
268 &g_TestJni_returnByteArray); | 256 &g_TestJni_returnByteArray); |
269 | 257 |
270 jbyteArray ret = | 258 jbyteArray ret = |
271 static_cast<jbyteArray>(env->CallObjectMethod(obj.obj(), | 259 static_cast<jbyteArray>(env->CallObjectMethod(obj.obj(), |
272 method_id)); | 260 method_id)); |
273 jni_generator::CheckException(env); | 261 jni_generator::CheckException(env); |
274 return base::android::ScopedJavaLocalRef<jbyteArray>(env, ret); | 262 return base::android::ScopedJavaLocalRef<jbyteArray>(env, ret); |
275 } | 263 } |
276 | 264 |
277 static base::subtle::AtomicWord g_TestJni_returnBooleanArray = 0; | 265 static base::subtle::AtomicWord g_TestJni_returnBooleanArray = 0; |
278 static base::android::ScopedJavaLocalRef<jbooleanArray> | 266 static base::android::ScopedJavaLocalRef<jbooleanArray> |
279 Java_TestJni_returnBooleanArray(JNIEnv* env, const | 267 Java_TestJni_returnBooleanArray(JNIEnv* env, const |
280 base::android::JavaRefOrBare<jobject>& obj) { | 268 base::android::JavaRefOrBare<jobject>& obj) { |
281 CHECK_CLAZZ(env, obj.obj(), | 269 CHECK_CLAZZ(env, obj.obj(), |
282 TestJni_clazz(env), NULL); | 270 TestJni_clazz(env), NULL); |
283 jmethodID method_id = | 271 jmethodID method_id = |
284 base::android::MethodID::LazyGet< | 272 base::android::MethodID::LazyGet< |
285 base::android::MethodID::TYPE_INSTANCE>( | 273 base::android::MethodID::TYPE_INSTANCE>( |
286 env, TestJni_clazz(env), | 274 env, TestJni_clazz(env), |
287 "returnBooleanArray", | 275 "returnBooleanArray", |
288 | |
289 "(" | 276 "(" |
290 ")" | 277 ")" |
291 "[Z", | 278 "[Z", |
292 &g_TestJni_returnBooleanArray); | 279 &g_TestJni_returnBooleanArray); |
293 | 280 |
294 jbooleanArray ret = | 281 jbooleanArray ret = |
295 static_cast<jbooleanArray>(env->CallObjectMethod(obj.obj(), | 282 static_cast<jbooleanArray>(env->CallObjectMethod(obj.obj(), |
296 method_id)); | 283 method_id)); |
297 jni_generator::CheckException(env); | 284 jni_generator::CheckException(env); |
298 return base::android::ScopedJavaLocalRef<jbooleanArray>(env, ret); | 285 return base::android::ScopedJavaLocalRef<jbooleanArray>(env, ret); |
299 } | 286 } |
300 | 287 |
301 static base::subtle::AtomicWord g_TestJni_returnCharArray = 0; | 288 static base::subtle::AtomicWord g_TestJni_returnCharArray = 0; |
302 static base::android::ScopedJavaLocalRef<jcharArray> | 289 static base::android::ScopedJavaLocalRef<jcharArray> |
303 Java_TestJni_returnCharArray(JNIEnv* env, const | 290 Java_TestJni_returnCharArray(JNIEnv* env, const |
304 base::android::JavaRefOrBare<jobject>& obj) { | 291 base::android::JavaRefOrBare<jobject>& obj) { |
305 CHECK_CLAZZ(env, obj.obj(), | 292 CHECK_CLAZZ(env, obj.obj(), |
306 TestJni_clazz(env), NULL); | 293 TestJni_clazz(env), NULL); |
307 jmethodID method_id = | 294 jmethodID method_id = |
308 base::android::MethodID::LazyGet< | 295 base::android::MethodID::LazyGet< |
309 base::android::MethodID::TYPE_INSTANCE>( | 296 base::android::MethodID::TYPE_INSTANCE>( |
310 env, TestJni_clazz(env), | 297 env, TestJni_clazz(env), |
311 "returnCharArray", | 298 "returnCharArray", |
312 | |
313 "(" | 299 "(" |
314 ")" | 300 ")" |
315 "[C", | 301 "[C", |
316 &g_TestJni_returnCharArray); | 302 &g_TestJni_returnCharArray); |
317 | 303 |
318 jcharArray ret = | 304 jcharArray ret = |
319 static_cast<jcharArray>(env->CallObjectMethod(obj.obj(), | 305 static_cast<jcharArray>(env->CallObjectMethod(obj.obj(), |
320 method_id)); | 306 method_id)); |
321 jni_generator::CheckException(env); | 307 jni_generator::CheckException(env); |
322 return base::android::ScopedJavaLocalRef<jcharArray>(env, ret); | 308 return base::android::ScopedJavaLocalRef<jcharArray>(env, ret); |
323 } | 309 } |
324 | 310 |
325 static base::subtle::AtomicWord g_TestJni_returnShortArray = 0; | 311 static base::subtle::AtomicWord g_TestJni_returnShortArray = 0; |
326 static base::android::ScopedJavaLocalRef<jshortArray> | 312 static base::android::ScopedJavaLocalRef<jshortArray> |
327 Java_TestJni_returnShortArray(JNIEnv* env, const | 313 Java_TestJni_returnShortArray(JNIEnv* env, const |
328 base::android::JavaRefOrBare<jobject>& obj) { | 314 base::android::JavaRefOrBare<jobject>& obj) { |
329 CHECK_CLAZZ(env, obj.obj(), | 315 CHECK_CLAZZ(env, obj.obj(), |
330 TestJni_clazz(env), NULL); | 316 TestJni_clazz(env), NULL); |
331 jmethodID method_id = | 317 jmethodID method_id = |
332 base::android::MethodID::LazyGet< | 318 base::android::MethodID::LazyGet< |
333 base::android::MethodID::TYPE_INSTANCE>( | 319 base::android::MethodID::TYPE_INSTANCE>( |
334 env, TestJni_clazz(env), | 320 env, TestJni_clazz(env), |
335 "returnShortArray", | 321 "returnShortArray", |
336 | |
337 "(" | 322 "(" |
338 ")" | 323 ")" |
339 "[S", | 324 "[S", |
340 &g_TestJni_returnShortArray); | 325 &g_TestJni_returnShortArray); |
341 | 326 |
342 jshortArray ret = | 327 jshortArray ret = |
343 static_cast<jshortArray>(env->CallObjectMethod(obj.obj(), | 328 static_cast<jshortArray>(env->CallObjectMethod(obj.obj(), |
344 method_id)); | 329 method_id)); |
345 jni_generator::CheckException(env); | 330 jni_generator::CheckException(env); |
346 return base::android::ScopedJavaLocalRef<jshortArray>(env, ret); | 331 return base::android::ScopedJavaLocalRef<jshortArray>(env, ret); |
347 } | 332 } |
348 | 333 |
349 static base::subtle::AtomicWord g_TestJni_returnIntArray = 0; | 334 static base::subtle::AtomicWord g_TestJni_returnIntArray = 0; |
350 static base::android::ScopedJavaLocalRef<jintArray> | 335 static base::android::ScopedJavaLocalRef<jintArray> |
351 Java_TestJni_returnIntArray(JNIEnv* env, const | 336 Java_TestJni_returnIntArray(JNIEnv* env, const |
352 base::android::JavaRefOrBare<jobject>& obj) { | 337 base::android::JavaRefOrBare<jobject>& obj) { |
353 CHECK_CLAZZ(env, obj.obj(), | 338 CHECK_CLAZZ(env, obj.obj(), |
354 TestJni_clazz(env), NULL); | 339 TestJni_clazz(env), NULL); |
355 jmethodID method_id = | 340 jmethodID method_id = |
356 base::android::MethodID::LazyGet< | 341 base::android::MethodID::LazyGet< |
357 base::android::MethodID::TYPE_INSTANCE>( | 342 base::android::MethodID::TYPE_INSTANCE>( |
358 env, TestJni_clazz(env), | 343 env, TestJni_clazz(env), |
359 "returnIntArray", | 344 "returnIntArray", |
360 | |
361 "(" | 345 "(" |
362 ")" | 346 ")" |
363 "[I", | 347 "[I", |
364 &g_TestJni_returnIntArray); | 348 &g_TestJni_returnIntArray); |
365 | 349 |
366 jintArray ret = | 350 jintArray ret = |
367 static_cast<jintArray>(env->CallObjectMethod(obj.obj(), | 351 static_cast<jintArray>(env->CallObjectMethod(obj.obj(), |
368 method_id)); | 352 method_id)); |
369 jni_generator::CheckException(env); | 353 jni_generator::CheckException(env); |
370 return base::android::ScopedJavaLocalRef<jintArray>(env, ret); | 354 return base::android::ScopedJavaLocalRef<jintArray>(env, ret); |
371 } | 355 } |
372 | 356 |
373 static base::subtle::AtomicWord g_TestJni_returnLongArray = 0; | 357 static base::subtle::AtomicWord g_TestJni_returnLongArray = 0; |
374 static base::android::ScopedJavaLocalRef<jlongArray> | 358 static base::android::ScopedJavaLocalRef<jlongArray> |
375 Java_TestJni_returnLongArray(JNIEnv* env, const | 359 Java_TestJni_returnLongArray(JNIEnv* env, const |
376 base::android::JavaRefOrBare<jobject>& obj) { | 360 base::android::JavaRefOrBare<jobject>& obj) { |
377 CHECK_CLAZZ(env, obj.obj(), | 361 CHECK_CLAZZ(env, obj.obj(), |
378 TestJni_clazz(env), NULL); | 362 TestJni_clazz(env), NULL); |
379 jmethodID method_id = | 363 jmethodID method_id = |
380 base::android::MethodID::LazyGet< | 364 base::android::MethodID::LazyGet< |
381 base::android::MethodID::TYPE_INSTANCE>( | 365 base::android::MethodID::TYPE_INSTANCE>( |
382 env, TestJni_clazz(env), | 366 env, TestJni_clazz(env), |
383 "returnLongArray", | 367 "returnLongArray", |
384 | |
385 "(" | 368 "(" |
386 ")" | 369 ")" |
387 "[J", | 370 "[J", |
388 &g_TestJni_returnLongArray); | 371 &g_TestJni_returnLongArray); |
389 | 372 |
390 jlongArray ret = | 373 jlongArray ret = |
391 static_cast<jlongArray>(env->CallObjectMethod(obj.obj(), | 374 static_cast<jlongArray>(env->CallObjectMethod(obj.obj(), |
392 method_id)); | 375 method_id)); |
393 jni_generator::CheckException(env); | 376 jni_generator::CheckException(env); |
394 return base::android::ScopedJavaLocalRef<jlongArray>(env, ret); | 377 return base::android::ScopedJavaLocalRef<jlongArray>(env, ret); |
395 } | 378 } |
396 | 379 |
397 static base::subtle::AtomicWord g_TestJni_returnDoubleArray = 0; | 380 static base::subtle::AtomicWord g_TestJni_returnDoubleArray = 0; |
398 static base::android::ScopedJavaLocalRef<jdoubleArray> | 381 static base::android::ScopedJavaLocalRef<jdoubleArray> |
399 Java_TestJni_returnDoubleArray(JNIEnv* env, const | 382 Java_TestJni_returnDoubleArray(JNIEnv* env, const |
400 base::android::JavaRefOrBare<jobject>& obj) { | 383 base::android::JavaRefOrBare<jobject>& obj) { |
401 CHECK_CLAZZ(env, obj.obj(), | 384 CHECK_CLAZZ(env, obj.obj(), |
402 TestJni_clazz(env), NULL); | 385 TestJni_clazz(env), NULL); |
403 jmethodID method_id = | 386 jmethodID method_id = |
404 base::android::MethodID::LazyGet< | 387 base::android::MethodID::LazyGet< |
405 base::android::MethodID::TYPE_INSTANCE>( | 388 base::android::MethodID::TYPE_INSTANCE>( |
406 env, TestJni_clazz(env), | 389 env, TestJni_clazz(env), |
407 "returnDoubleArray", | 390 "returnDoubleArray", |
408 | |
409 "(" | 391 "(" |
410 ")" | 392 ")" |
411 "[D", | 393 "[D", |
412 &g_TestJni_returnDoubleArray); | 394 &g_TestJni_returnDoubleArray); |
413 | 395 |
414 jdoubleArray ret = | 396 jdoubleArray ret = |
415 static_cast<jdoubleArray>(env->CallObjectMethod(obj.obj(), | 397 static_cast<jdoubleArray>(env->CallObjectMethod(obj.obj(), |
416 method_id)); | 398 method_id)); |
417 jni_generator::CheckException(env); | 399 jni_generator::CheckException(env); |
418 return base::android::ScopedJavaLocalRef<jdoubleArray>(env, ret); | 400 return base::android::ScopedJavaLocalRef<jdoubleArray>(env, ret); |
419 } | 401 } |
420 | 402 |
421 static base::subtle::AtomicWord g_TestJni_returnObjectArray = 0; | 403 static base::subtle::AtomicWord g_TestJni_returnObjectArray = 0; |
422 static base::android::ScopedJavaLocalRef<jobjectArray> | 404 static base::android::ScopedJavaLocalRef<jobjectArray> |
423 Java_TestJni_returnObjectArray(JNIEnv* env, const | 405 Java_TestJni_returnObjectArray(JNIEnv* env, const |
424 base::android::JavaRefOrBare<jobject>& obj) { | 406 base::android::JavaRefOrBare<jobject>& obj) { |
425 CHECK_CLAZZ(env, obj.obj(), | 407 CHECK_CLAZZ(env, obj.obj(), |
426 TestJni_clazz(env), NULL); | 408 TestJni_clazz(env), NULL); |
427 jmethodID method_id = | 409 jmethodID method_id = |
428 base::android::MethodID::LazyGet< | 410 base::android::MethodID::LazyGet< |
429 base::android::MethodID::TYPE_INSTANCE>( | 411 base::android::MethodID::TYPE_INSTANCE>( |
430 env, TestJni_clazz(env), | 412 env, TestJni_clazz(env), |
431 "returnObjectArray", | 413 "returnObjectArray", |
432 | |
433 "(" | 414 "(" |
434 ")" | 415 ")" |
435 "[Ljava/lang/Object;", | 416 "[Ljava/lang/Object;", |
436 &g_TestJni_returnObjectArray); | 417 &g_TestJni_returnObjectArray); |
437 | 418 |
438 jobjectArray ret = | 419 jobjectArray ret = |
439 static_cast<jobjectArray>(env->CallObjectMethod(obj.obj(), | 420 static_cast<jobjectArray>(env->CallObjectMethod(obj.obj(), |
440 method_id)); | 421 method_id)); |
441 jni_generator::CheckException(env); | 422 jni_generator::CheckException(env); |
442 return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret); | 423 return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret); |
443 } | 424 } |
444 | 425 |
445 static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0; | 426 static base::subtle::AtomicWord g_TestJni_returnArrayOfByteArray = 0; |
446 static base::android::ScopedJavaLocalRef<jobjectArray> | 427 static base::android::ScopedJavaLocalRef<jobjectArray> |
447 Java_TestJni_returnArrayOfByteArray(JNIEnv* env, const | 428 Java_TestJni_returnArrayOfByteArray(JNIEnv* env, const |
448 base::android::JavaRefOrBare<jobject>& obj) { | 429 base::android::JavaRefOrBare<jobject>& obj) { |
449 CHECK_CLAZZ(env, obj.obj(), | 430 CHECK_CLAZZ(env, obj.obj(), |
450 TestJni_clazz(env), NULL); | 431 TestJni_clazz(env), NULL); |
451 jmethodID method_id = | 432 jmethodID method_id = |
452 base::android::MethodID::LazyGet< | 433 base::android::MethodID::LazyGet< |
453 base::android::MethodID::TYPE_INSTANCE>( | 434 base::android::MethodID::TYPE_INSTANCE>( |
454 env, TestJni_clazz(env), | 435 env, TestJni_clazz(env), |
455 "returnArrayOfByteArray", | 436 "returnArrayOfByteArray", |
456 | |
457 "(" | 437 "(" |
458 ")" | 438 ")" |
459 "[[B", | 439 "[[B", |
460 &g_TestJni_returnArrayOfByteArray); | 440 &g_TestJni_returnArrayOfByteArray); |
461 | 441 |
462 jobjectArray ret = | 442 jobjectArray ret = |
463 static_cast<jobjectArray>(env->CallObjectMethod(obj.obj(), | 443 static_cast<jobjectArray>(env->CallObjectMethod(obj.obj(), |
464 method_id)); | 444 method_id)); |
465 jni_generator::CheckException(env); | 445 jni_generator::CheckException(env); |
466 return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret); | 446 return base::android::ScopedJavaLocalRef<jobjectArray>(env, ret); |
467 } | 447 } |
468 | 448 |
469 static base::subtle::AtomicWord g_TestJni_getCompressFormat = 0; | 449 static base::subtle::AtomicWord g_TestJni_getCompressFormat = 0; |
470 static base::android::ScopedJavaLocalRef<jobject> | 450 static base::android::ScopedJavaLocalRef<jobject> |
471 Java_TestJni_getCompressFormat(JNIEnv* env, const | 451 Java_TestJni_getCompressFormat(JNIEnv* env, const |
472 base::android::JavaRefOrBare<jobject>& obj) { | 452 base::android::JavaRefOrBare<jobject>& obj) { |
473 CHECK_CLAZZ(env, obj.obj(), | 453 CHECK_CLAZZ(env, obj.obj(), |
474 TestJni_clazz(env), NULL); | 454 TestJni_clazz(env), NULL); |
475 jmethodID method_id = | 455 jmethodID method_id = |
476 base::android::MethodID::LazyGet< | 456 base::android::MethodID::LazyGet< |
477 base::android::MethodID::TYPE_INSTANCE>( | 457 base::android::MethodID::TYPE_INSTANCE>( |
478 env, TestJni_clazz(env), | 458 env, TestJni_clazz(env), |
479 "getCompressFormat", | 459 "getCompressFormat", |
480 | |
481 "(" | 460 "(" |
482 ")" | 461 ")" |
483 "Landroid/graphics/Bitmap$CompressFormat;", | 462 "Landroid/graphics/Bitmap$CompressFormat;", |
484 &g_TestJni_getCompressFormat); | 463 &g_TestJni_getCompressFormat); |
485 | 464 |
486 jobject ret = | 465 jobject ret = |
487 env->CallObjectMethod(obj.obj(), | 466 env->CallObjectMethod(obj.obj(), |
488 method_id); | 467 method_id); |
489 jni_generator::CheckException(env); | 468 jni_generator::CheckException(env); |
490 return base::android::ScopedJavaLocalRef<jobject>(env, ret); | 469 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
491 } | 470 } |
492 | 471 |
493 static base::subtle::AtomicWord g_TestJni_getCompressFormatList = 0; | 472 static base::subtle::AtomicWord g_TestJni_getCompressFormatList = 0; |
494 static base::android::ScopedJavaLocalRef<jobject> | 473 static base::android::ScopedJavaLocalRef<jobject> |
495 Java_TestJni_getCompressFormatList(JNIEnv* env, const | 474 Java_TestJni_getCompressFormatList(JNIEnv* env, const |
496 base::android::JavaRefOrBare<jobject>& obj) { | 475 base::android::JavaRefOrBare<jobject>& obj) { |
497 CHECK_CLAZZ(env, obj.obj(), | 476 CHECK_CLAZZ(env, obj.obj(), |
498 TestJni_clazz(env), NULL); | 477 TestJni_clazz(env), NULL); |
499 jmethodID method_id = | 478 jmethodID method_id = |
500 base::android::MethodID::LazyGet< | 479 base::android::MethodID::LazyGet< |
501 base::android::MethodID::TYPE_INSTANCE>( | 480 base::android::MethodID::TYPE_INSTANCE>( |
502 env, TestJni_clazz(env), | 481 env, TestJni_clazz(env), |
503 "getCompressFormatList", | 482 "getCompressFormatList", |
504 | |
505 "(" | 483 "(" |
506 ")" | 484 ")" |
507 "Ljava/util/List;", | 485 "Ljava/util/List;", |
508 &g_TestJni_getCompressFormatList); | 486 &g_TestJni_getCompressFormatList); |
509 | 487 |
510 jobject ret = | 488 jobject ret = |
511 env->CallObjectMethod(obj.obj(), | 489 env->CallObjectMethod(obj.obj(), |
512 method_id); | 490 method_id); |
513 jni_generator::CheckException(env); | 491 jni_generator::CheckException(env); |
514 return base::android::ScopedJavaLocalRef<jobject>(env, ret); | 492 return base::android::ScopedJavaLocalRef<jobject>(env, ret); |
515 } | 493 } |
516 | 494 |
517 // Step 3: RegisterNatives. | 495 // Step 3: RegisterNatives. |
518 | 496 |
519 #endif // org_chromium_TestJni_JNI | 497 #endif // org_chromium_TestJni_JNI |
OLD | NEW |