OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # TODO (qinmin): Need to refactor this file as base should not know about | 6 # TODO (qinmin): Need to refactor this file as base should not know about |
7 # higher level concepts. Currently this file has knowledge about higher level | 7 # higher level concepts. Currently this file has knowledge about higher level |
8 # java classes. | 8 # java classes. |
9 | 9 |
10 """Extracts native methods from a Java file and generates the JNI bindings. | 10 """Extracts native methods from a Java file and generates the JNI bindings. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 'Landroid/view/View', | 148 'Landroid/view/View', |
149 'Landroid/webkit/ValueCallback', | 149 'Landroid/webkit/ValueCallback', |
150 'Ljava/io/InputStream', | 150 'Ljava/io/InputStream', |
151 'Ljava/nio/ByteBuffer', | 151 'Ljava/nio/ByteBuffer', |
152 'Ljava/util/Vector', | 152 'Ljava/util/Vector', |
153 ] | 153 ] |
154 app_param_list = [ | 154 app_param_list = [ |
155 'Landroid/graphics/SurfaceTexture', | 155 'Landroid/graphics/SurfaceTexture', |
156 'Lcom/google/android/apps/chrome/ChromeContextMenuInfo', | 156 'Lcom/google/android/apps/chrome/ChromeContextMenuInfo', |
157 'Lcom/google/android/apps/chrome/ChromeWindow', | 157 'Lcom/google/android/apps/chrome/ChromeWindow', |
| 158 'Lcom/google/android/apps/chrome/GoogleLocationSettingsHelperImpl', |
158 'Lcom/google/android/apps/chrome/OmniboxSuggestion', | 159 'Lcom/google/android/apps/chrome/OmniboxSuggestion', |
159 'Lcom/google/android/apps/chrome/PageInfoViewer', | 160 'Lcom/google/android/apps/chrome/PageInfoViewer', |
160 'Lcom/google/android/apps/chrome/Tab', | 161 'Lcom/google/android/apps/chrome/Tab', |
161 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer', | 162 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer', |
162 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer$NativeInfoBar', | 163 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer$NativeInfoBar', |
163 ('Lcom/google/android/apps/chrome/preferences/ChromeNativePreferences$' | 164 ('Lcom/google/android/apps/chrome/preferences/ChromeNativePreferences$' |
164 'PasswordListObserver'), | 165 'PasswordListObserver'), |
165 'Lorg/chromium/android_webview/AwContents', | 166 'Lorg/chromium/android_webview/AwContents', |
166 'Lorg/chromium/android_webview/AwContentsClient', | 167 'Lorg/chromium/android_webview/AwContentsClient', |
167 'Lorg/chromium/android_webview/AwHttpAuthHandler', | 168 'Lorg/chromium/android_webview/AwHttpAuthHandler', |
168 'Lorg/chromium/android_webview/AwContentsIoThreadClient', | 169 'Lorg/chromium/android_webview/AwContentsIoThreadClient', |
169 'Lorg/chromium/android_webview/AwWebContentsDelegate', | 170 'Lorg/chromium/android_webview/AwWebContentsDelegate', |
170 'Lorg/chromium/android_webview/InterceptedRequestData', | 171 'Lorg/chromium/android_webview/InterceptedRequestData', |
171 'Lorg/chromium/android_webview/JsPromptResultReceiver', | 172 'Lorg/chromium/android_webview/JsPromptResultReceiver', |
172 'Lorg/chromium/android_webview/JsResultHandler', | 173 'Lorg/chromium/android_webview/JsResultHandler', |
173 'Lorg/chromium/android_webview/JsResultReceiver', | 174 'Lorg/chromium/android_webview/JsResultReceiver', |
174 'Lorg/chromium/base/SystemMessageHandler', | 175 'Lorg/chromium/base/SystemMessageHandler', |
175 'Lorg/chromium/chrome/browser/autofill/AutofillExternalDelegate', | 176 'Lorg/chromium/chrome/browser/autofill/AutofillExternalDelegate', |
176 'Lorg/chromium/chrome/browser/autofill/AutofillSuggestion', | 177 'Lorg/chromium/chrome/browser/autofill/AutofillSuggestion', |
177 'Lorg/chromium/chrome/browser/ChromeBrowserProvider$BookmarkNode', | 178 'Lorg/chromium/chrome/browser/ChromeBrowserProvider$BookmarkNode', |
178 'Lorg/chromium/chrome/browser/ChromeHttpAuthHandler', | 179 'Lorg/chromium/chrome/browser/ChromeHttpAuthHandler', |
179 'Lorg/chromium/chrome/browser/ChromeWebContentsDelegateAndroid', | 180 'Lorg/chromium/chrome/browser/ChromeWebContentsDelegateAndroid', |
180 'Lorg/chromium/chrome/browser/FindMatchRectsDetails', | 181 'Lorg/chromium/chrome/browser/FindMatchRectsDetails', |
181 'Lorg/chromium/chrome/browser/FindNotificationDetails', | 182 'Lorg/chromium/chrome/browser/FindNotificationDetails', |
| 183 'Lorg/chromium/chrome/browser/GoogleLocationSettingsHelper', |
| 184 'Lorg/chromium/chrome/browser/GoogleLocationSettingsHelperStub', |
182 'Lorg/chromium/chrome/browser/JavascriptAppModalDialog', | 185 'Lorg/chromium/chrome/browser/JavascriptAppModalDialog', |
183 'Lorg/chromium/chrome/browser/ProcessUtils', | 186 'Lorg/chromium/chrome/browser/ProcessUtils', |
184 ('Lorg/chromium/chrome/browser/component/navigation_interception/' | 187 ('Lorg/chromium/chrome/browser/component/navigation_interception/' |
185 'InterceptNavigationDelegate'), | 188 'InterceptNavigationDelegate'), |
186 ('Lorg/chromium/chrome/browser/component/web_contents_delegate_android/' | 189 ('Lorg/chromium/chrome/browser/component/web_contents_delegate_android/' |
187 'WebContentsDelegateAndroid'), | 190 'WebContentsDelegateAndroid'), |
188 'Lorg/chromium/chrome/browser/database/SQLiteCursor', | 191 'Lorg/chromium/chrome/browser/database/SQLiteCursor', |
189 'Lorg/chromium/content/app/SandboxedProcessService', | 192 'Lorg/chromium/content/app/SandboxedProcessService', |
190 'Lorg/chromium/content/browser/ContainerViewDelegate', | 193 'Lorg/chromium/content/browser/ContainerViewDelegate', |
191 'Lorg/chromium/content/browser/ContentVideoView', | 194 'Lorg/chromium/content/browser/ContentVideoView', |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 input_file = options.input_file | 1041 input_file = options.input_file |
1039 output_file = None | 1042 output_file = None |
1040 if options.output_dir: | 1043 if options.output_dir: |
1041 root_name = os.path.splitext(os.path.basename(input_file))[0] | 1044 root_name = os.path.splitext(os.path.basename(input_file))[0] |
1042 output_file = os.path.join(options.output_dir, root_name) + '_jni.h' | 1045 output_file = os.path.join(options.output_dir, root_name) + '_jni.h' |
1043 GenerateJNIHeader(input_file, output_file, options.namespace) | 1046 GenerateJNIHeader(input_file, output_file, options.namespace) |
1044 | 1047 |
1045 | 1048 |
1046 if __name__ == '__main__': | 1049 if __name__ == '__main__': |
1047 sys.exit(main(sys.argv)) | 1050 sys.exit(main(sys.argv)) |
OLD | NEW |