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

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

Issue 10693068: Refactor Android's NetworckChangeNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 'Lorg/chromium/content/browser/InterceptedRequestData', 173 'Lorg/chromium/content/browser/InterceptedRequestData',
174 'Lorg/chromium/content/browser/JavaInputStream', 174 'Lorg/chromium/content/browser/JavaInputStream',
175 'Lorg/chromium/content/browser/LocationProvider', 175 'Lorg/chromium/content/browser/LocationProvider',
176 'Lorg/chromium/content/browser/SandboxedProcessArgs', 176 'Lorg/chromium/content/browser/SandboxedProcessArgs',
177 'Lorg/chromium/content/browser/SandboxedProcessConnection', 177 'Lorg/chromium/content/browser/SandboxedProcessConnection',
178 'Lorg/chromium/content/app/SandboxedProcessService', 178 'Lorg/chromium/content/app/SandboxedProcessService',
179 'Lorg/chromium/content/browser/SurfaceTextureListener', 179 'Lorg/chromium/content/browser/SurfaceTextureListener',
180 'Lorg/chromium/content/browser/TouchPoint', 180 'Lorg/chromium/content/browser/TouchPoint',
181 'Lorg/chromium/content/browser/WaitableNativeEvent', 181 'Lorg/chromium/content/browser/WaitableNativeEvent',
182 'Lorg/chromium/media/MediaPlayerListener', 182 'Lorg/chromium/media/MediaPlayerListener',
183 'Lorg/chromium/net/NetworkChangeNotifier',
184 'Lorg/chromium/net/ProxyChangeListener', 183 'Lorg/chromium/net/ProxyChangeListener',
185 ] 184 ]
186 if param == 'byte[][]': 185 if param == 'byte[][]':
187 return '[[B' 186 return '[[B'
188 prefix = '' 187 prefix = ''
189 # Array? 188 # Array?
190 if param[-2:] == '[]': 189 if param[-2:] == '[]':
191 prefix = '[' 190 prefix = '['
192 param = param[:-2] 191 param = param[:-2]
193 # Generic? 192 # Generic?
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 CheckFilenames(input_files, output_files) 990 CheckFilenames(input_files, output_files)
992 if options.jar_file: 991 if options.jar_file:
993 # CheckFileNames guarantees same length for inputs and outputs 992 # CheckFileNames guarantees same length for inputs and outputs
994 out_dirs = map(os.path.dirname, output_files) 993 out_dirs = map(os.path.dirname, output_files)
995 input_files = ExtractInputFiles(options.jar_file, input_files, out_dirs) 994 input_files = ExtractInputFiles(options.jar_file, input_files, out_dirs)
996 GenerateJNIHeaders(input_files, output_files, options.namespace) 995 GenerateJNIHeaders(input_files, output_files, options.namespace)
997 996
998 997
999 if __name__ == '__main__': 998 if __name__ == '__main__':
1000 sys.exit(main(sys.argv)) 999 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698