Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: base/android/jni_generator/jni_generator.py

Issue 10916160: Upstreaming SelectFileDialog for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elliot's nits Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 'Ljava/nio/ByteBuffer', 144 'Ljava/nio/ByteBuffer',
145 'Ljava/io/InputStream', 145 'Ljava/io/InputStream',
146 'Ljava/util/Vector', 146 'Ljava/util/Vector',
147 ] 147 ]
148 app_param_list = [ 148 app_param_list = [
149 'Landroid/graphics/SurfaceTexture', 149 'Landroid/graphics/SurfaceTexture',
150 'Lcom/google/android/apps/chrome/AutofillData', 150 'Lcom/google/android/apps/chrome/AutofillData',
151 'Lcom/google/android/apps/chrome/ChromeBrowserProvider$BookmarkNode', 151 'Lcom/google/android/apps/chrome/ChromeBrowserProvider$BookmarkNode',
152 'Lcom/google/android/apps/chrome/ChromeHttpAuthHandler', 152 'Lcom/google/android/apps/chrome/ChromeHttpAuthHandler',
153 'Lcom/google/android/apps/chrome/ChromeContextMenuInfo', 153 'Lcom/google/android/apps/chrome/ChromeContextMenuInfo',
154 'Lcom/google/android/apps/chrome/ChromeWindow',
154 'Lcom/google/android/apps/chrome/OmniboxSuggestion', 155 'Lcom/google/android/apps/chrome/OmniboxSuggestion',
155 'Lcom/google/android/apps/chrome/PageInfoViewer', 156 'Lcom/google/android/apps/chrome/PageInfoViewer',
156 'Lcom/google/android/apps/chrome/Tab', 157 'Lcom/google/android/apps/chrome/Tab',
157 'Lcom/google/android/apps/chrome/database/SQLiteCursor', 158 'Lcom/google/android/apps/chrome/database/SQLiteCursor',
158 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer', 159 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer',
159 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer$NativeInfoBar', 160 'Lcom/google/android/apps/chrome/infobar/InfoBarContainer$NativeInfoBar',
160 ('Lcom/google/android/apps/chrome/preferences/ChromeNativePreferences$' 161 ('Lcom/google/android/apps/chrome/preferences/ChromeNativePreferences$'
161 'PasswordListObserver'), 162 'PasswordListObserver'),
162 'Lorg/chromium/android_webview/AwWebContentsDelegate', 163 'Lorg/chromium/android_webview/AwWebContentsDelegate',
163 'Lorg/chromium/base/SystemMessageHandler', 164 'Lorg/chromium/base/SystemMessageHandler',
164 'Lorg/chromium/chrome/browser/ChromeWebContentsDelegateAndroid', 165 'Lorg/chromium/chrome/browser/ChromeWebContentsDelegateAndroid',
165 'Lorg/chromium/chrome/browser/FindMatchRectsDetails', 166 'Lorg/chromium/chrome/browser/FindMatchRectsDetails',
166 'Lorg/chromium/chrome/browser/FindNotificationDetails', 167 'Lorg/chromium/chrome/browser/FindNotificationDetails',
167 'Lorg/chromium/chrome/browser/JavascriptAppModalDialog', 168 'Lorg/chromium/chrome/browser/JavascriptAppModalDialog',
168 'Lorg/chromium/chrome/browser/ProcessUtils', 169 'Lorg/chromium/chrome/browser/ProcessUtils',
169 'Lorg/chromium/chrome/browser/SelectFileDialog',
170 'Lorg/chromium/chrome/browser/component/web_contents_delegate_android/WebC ontentsDelegateAndroid', 170 'Lorg/chromium/chrome/browser/component/web_contents_delegate_android/WebC ontentsDelegateAndroid',
171 'Lorg/chromium/content/browser/ContentVideoView', 171 'Lorg/chromium/content/browser/ContentVideoView',
172 'Lorg/chromium/content/browser/ContentViewClient', 172 'Lorg/chromium/content/browser/ContentViewClient',
173 'Lorg/chromium/content/browser/ContentViewCore', 173 'Lorg/chromium/content/browser/ContentViewCore',
174 'Lorg/chromium/content/browser/DeviceOrientation', 174 'Lorg/chromium/content/browser/DeviceOrientation',
175 'Lorg/chromium/content/browser/FindNotificationDetails', 175 'Lorg/chromium/content/browser/FindNotificationDetails',
176 'Lorg/chromium/content/browser/InterceptedRequestData', 176 'Lorg/chromium/content/browser/InterceptedRequestData',
177 'Lorg/chromium/content/browser/JavaInputStream', 177 'Lorg/chromium/content/browser/JavaInputStream',
178 'Lorg/chromium/content/browser/LocationProvider', 178 'Lorg/chromium/content/browser/LocationProvider',
179 'Lorg/chromium/content/browser/SandboxedProcessArgs', 179 'Lorg/chromium/content/browser/SandboxedProcessArgs',
180 'Lorg/chromium/content/browser/SandboxedProcessConnection', 180 'Lorg/chromium/content/browser/SandboxedProcessConnection',
181 'Lorg/chromium/content/app/SandboxedProcessService', 181 'Lorg/chromium/content/app/SandboxedProcessService',
182 'Lorg/chromium/content/browser/TouchPoint', 182 'Lorg/chromium/content/browser/TouchPoint',
183 'Lorg/chromium/content/browser/WaitableNativeEvent', 183 'Lorg/chromium/content/browser/WaitableNativeEvent',
184 'Lorg/chromium/content/browser/WebContentsObserverAndroid', 184 'Lorg/chromium/content/browser/WebContentsObserverAndroid',
185 'Lorg/chromium/content/common/DeviceInfo', 185 'Lorg/chromium/content/common/DeviceInfo',
186 'Lorg/chromium/content/common/SurfaceTextureListener', 186 'Lorg/chromium/content/common/SurfaceTextureListener',
187 'Lorg/chromium/media/MediaPlayerListener', 187 'Lorg/chromium/media/MediaPlayerListener',
188 'Lorg/chromium/net/NetworkChangeNotifier', 188 'Lorg/chromium/net/NetworkChangeNotifier',
189 'Lorg/chromium/net/ProxyChangeListener', 189 'Lorg/chromium/net/ProxyChangeListener',
190 'Lorg/chromium/ui/gfx/NativeWindow',
191 'Lorg/chromium/ui/SelectFileDialog',
190 ] 192 ]
191 if param == 'byte[][]': 193 if param == 'byte[][]':
192 return '[[B' 194 return '[[B'
193 prefix = '' 195 prefix = ''
194 # Array? 196 # Array?
195 if param[-2:] == '[]': 197 if param[-2:] == '[]':
196 prefix = '[' 198 prefix = '['
197 param = param[:-2] 199 param = param[:-2]
198 # Generic? 200 # Generic?
199 if '<' in param: 201 if '<' in param:
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 input_file = options.input_file 982 input_file = options.input_file
981 output_file = None 983 output_file = None
982 if options.output_dir: 984 if options.output_dir:
983 root_name = os.path.splitext(os.path.basename(input_file))[0] 985 root_name = os.path.splitext(os.path.basename(input_file))[0]
984 output_file = os.path.join(options.output_dir, root_name) + '_jni.h' 986 output_file = os.path.join(options.output_dir, root_name) + '_jni.h'
985 GenerateJNIHeader(input_file, output_file, options.namespace) 987 GenerateJNIHeader(input_file, output_file, options.namespace)
986 988
987 989
988 if __name__ == '__main__': 990 if __name__ == '__main__':
989 sys.exit(main(sys.argv)) 991 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/JavascriptAppModalDialog.java » ('j') | content/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698