• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5
6// This file is autogenerated by
7//     base/android/jni_generator/jni_registration_generator.py
8// Please do not change its content.
9
10#ifndef HEADER_GUARD
11#define HEADER_GUARD
12
13#include <jni.h>
14
15#include "base/android/jni_generator/jni_generator_helper.h"
16#include "base/android/jni_int_wrapper.h"
17
18
19// Step 1: Forward declarations (classes).
20
21extern const char kClassPath_org_chromium_TestJni[];
22extern base::subtle::AtomicWord g_org_chromium_TestJni_clazz;
23#ifndef org_chromium_TestJni_clazz_defined
24#define org_chromium_TestJni_clazz_defined
25inline jclass org_chromium_TestJni_clazz(JNIEnv* env) {
26  return base::android::LazyGetClass(env, kClassPath_org_chromium_TestJni,
27      &g_org_chromium_TestJni_clazz);
28}
29#endif
30
31
32// Step 2: Forward declarations (methods).
33
34JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_nativeInit(
35    JNIEnv* env,
36    jobject jcaller);
37JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeDestroy(
38    JNIEnv* env,
39    jobject jcaller,
40    jint nativeChromeBrowserProvider);
41JNI_GENERATOR_EXPORT jlong Java_org_chromium_TestJni_nativeAddBookmark(
42    JNIEnv* env,
43    jobject jcaller,
44    jint nativeChromeBrowserProvider,
45    jstring url,
46    jstring title,
47    jboolean isFolder,
48    jlong parentId);
49JNI_GENERATOR_EXPORT jstring Java_org_chromium_TestJni_nativeGetDomainAndRegistry(
50    JNIEnv* env,
51    jclass jcaller,
52    jstring url);
53JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeCreateHistoricalTabFromState(
54    JNIEnv* env,
55    jclass jcaller,
56    jbyteArray state,
57    jint tab_index);
58JNI_GENERATOR_EXPORT jbyteArray Java_org_chromium_TestJni_nativeGetStateAsByteArray(
59    JNIEnv* env,
60    jobject jcaller,
61    jobject view);
62JNI_GENERATOR_EXPORT jobjectArray Java_org_chromium_TestJni_nativeGetAutofillProfileGUIDs(
63    JNIEnv* env,
64    jclass jcaller);
65JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeSetRecognitionResults(
66    JNIEnv* env,
67    jobject jcaller,
68    jint sessionId,
69    jobjectArray results);
70JNI_GENERATOR_EXPORT jlong Java_org_chromium_TestJni_nativeAddBookmarkFromAPI(
71    JNIEnv* env,
72    jobject jcaller,
73    jint nativeChromeBrowserProvider,
74    jstring url,
75    jobject created,
76    jobject isBookmark,
77    jobject date,
78    jbyteArray favicon,
79    jstring title,
80    jobject visits);
81JNI_GENERATOR_EXPORT jint Java_org_chromium_TestJni_nativeFindAll(
82    JNIEnv* env,
83    jobject jcaller,
84    jstring find);
85JNI_GENERATOR_EXPORT jobject Java_org_chromium_TestJni_nativeGetInnerClass(
86    JNIEnv* env,
87    jclass jcaller);
88JNI_GENERATOR_EXPORT jobject Java_org_chromium_TestJni_nativeQueryBitmap(
89    JNIEnv* env,
90    jobject jcaller,
91    jint nativeChromeBrowserProvider,
92    jobjectArray projection,
93    jstring selection,
94    jobjectArray selectionArgs,
95    jstring sortOrder);
96JNI_GENERATOR_EXPORT void Java_org_chromium_TestJni_nativeGotOrientation(
97    JNIEnv* env,
98    jobject jcaller,
99    jint nativeDataFetcherImplAndroid,
100    jdouble alpha,
101    jdouble beta,
102    jdouble gamma);
103JNI_GENERATOR_EXPORT jthrowable Java_org_chromium_TestJni_nativeMessWithJavaException(
104    JNIEnv* env,
105    jclass jcaller,
106    jthrowable e);
107
108
109// Step 3: Method declarations.
110
111static const JNINativeMethod kMethods_org_chromium_TestJni[] = {
112    { "nativeInit", "()I", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeInit) },
113    { "nativeDestroy", "(I)V", reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeDestroy) },
114    { "nativeAddBookmark", "(ILjava/lang/String;Ljava/lang/String;ZJ)J",
115        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeAddBookmark) },
116    { "nativeGetDomainAndRegistry", "(Ljava/lang/String;)Ljava/lang/String;",
117        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeGetDomainAndRegistry) },
118    { "nativeCreateHistoricalTabFromState", "([BI)V",
119        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeCreateHistoricalTabFromState) },
120    { "nativeGetStateAsByteArray", "(Landroid/view/View;)[B",
121        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeGetStateAsByteArray) },
122    { "nativeGetAutofillProfileGUIDs", "()[Ljava/lang/String;",
123        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeGetAutofillProfileGUIDs) },
124    { "nativeSetRecognitionResults", "(I[Ljava/lang/String;)V",
125        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeSetRecognitionResults) },
126    { "nativeAddBookmarkFromAPI",
127        "(ILjava/lang/String;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/Long;[BLjava/lang/String;Ljava/lang/Integer;)J",
128        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeAddBookmarkFromAPI) },
129    { "nativeFindAll", "(Ljava/lang/String;)I",
130        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeFindAll) },
131    { "nativeGetInnerClass",
132        "()Lorg/chromium/example/jni_generator/SampleForTests$OnFrameAvailableListener;",
133        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeGetInnerClass) },
134    { "nativeQueryBitmap",
135        "(I[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/graphics/Bitmap;",
136        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeQueryBitmap) },
137    { "nativeGotOrientation", "(IDDD)V",
138        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeGotOrientation) },
139    { "nativeMessWithJavaException", "(Ljava/lang/Throwable;)Ljava/lang/Throwable;",
140        reinterpret_cast<void*>(Java_org_chromium_TestJni_nativeMessWithJavaException) },
141};
142
143
144JNI_REGISTRATION_EXPORT bool RegisterNative_org_chromium_TestJni(JNIEnv* env) {
145  const int kMethods_org_chromium_TestJniSize =
146      arraysize(kMethods_org_chromium_TestJni);
147  if (env->RegisterNatives(
148      org_chromium_TestJni_clazz(env),
149      kMethods_org_chromium_TestJni,
150      kMethods_org_chromium_TestJniSize) < 0) {
151    jni_generator::HandleRegistrationError(env,
152        org_chromium_TestJni_clazz(env),
153        __FILE__);
154    return false;
155  }
156
157  return true;
158}
159
160
161// Step 4: Main dex and non-main dex registration functions.
162
163bool RegisterMainDexNatives(JNIEnv* env) {
164  if (!RegisterNative_org_chromium_TestJni(env))
165    return false;
166
167  return true;
168}
169
170bool RegisterNonMainDexNatives(JNIEnv* env) {
171
172  return true;
173}
174
175#endif  // HEADER_GUARD
176