| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 'Ljava/util/List', | 130 'Ljava/util/List', |
| 131 'Ljava/util/ArrayList', | 131 'Ljava/util/ArrayList', |
| 132 'Ljava/util/HashMap', | 132 'Ljava/util/HashMap', |
| 133 'Landroid/graphics/Bitmap', | 133 'Landroid/graphics/Bitmap', |
| 134 'Landroid/content/Context', | 134 'Landroid/content/Context', |
| 135 'Landroid/graphics/Canvas', | 135 'Landroid/graphics/Canvas', |
| 136 'Landroid/view/Surface', | 136 'Landroid/view/Surface', |
| 137 'Landroid/view/KeyEvent', | 137 'Landroid/view/KeyEvent', |
| 138 'Landroid/graphics/Rect', | 138 'Landroid/graphics/Rect', |
| 139 'Landroid/graphics/RectF', | 139 'Landroid/graphics/RectF', |
| 140 'Landroid/os/Message', |
| 140 'Landroid/view/View', | 141 'Landroid/view/View', |
| 141 'Landroid/graphics/Matrix', | 142 'Landroid/graphics/Matrix', |
| 142 'Landroid/graphics/Point', | 143 'Landroid/graphics/Point', |
| 143 'Ljava/nio/ByteBuffer', | 144 'Ljava/nio/ByteBuffer', |
| 144 'Ljava/io/InputStream', | 145 'Ljava/io/InputStream', |
| 145 'Ljava/util/Vector', | 146 'Ljava/util/Vector', |
| 146 ] | 147 ] |
| 147 app_param_list = [ | 148 app_param_list = [ |
| 148 'Landroid/graphics/SurfaceTexture', | 149 'Landroid/graphics/SurfaceTexture', |
| 149 'Lcom/google/android/apps/chrome/AutofillData', | 150 'Lcom/google/android/apps/chrome/AutofillData', |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 input_file = options.input_file | 978 input_file = options.input_file |
| 978 output_file = None | 979 output_file = None |
| 979 if options.output_dir: | 980 if options.output_dir: |
| 980 root_name = os.path.splitext(os.path.basename(input_file))[0] | 981 root_name = os.path.splitext(os.path.basename(input_file))[0] |
| 981 output_file = os.path.join(options.output_dir, root_name) + '_jni.h' | 982 output_file = os.path.join(options.output_dir, root_name) + '_jni.h' |
| 982 GenerateJNIHeader(input_file, output_file, options.namespace) | 983 GenerateJNIHeader(input_file, output_file, options.namespace) |
| 983 | 984 |
| 984 | 985 |
| 985 if __name__ == '__main__': | 986 if __name__ == '__main__': |
| 986 sys.exit(main(sys.argv)) | 987 sys.exit(main(sys.argv)) |
| OLD | NEW |