| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
| 5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
| 6 | 6 |
| 7 """Generates sdk/lib/_blink/dartium/_blink_dartium.dart file.""" | 7 """Generates sdk/lib/_blink/dartium/_blink_dartium.dart file.""" |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 from sets import Set | 10 from sets import Set |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Below code sets up VMLibraryHooks for resolvePackageUri. | 132 // Below code sets up VMLibraryHooks for resolvePackageUri. |
| 133 static Uri resolvePackageUri(Uri packageUri) native "Utils_resolvePackageUri"; | 133 static Uri resolvePackageUri(Uri packageUri) native "Utils_resolvePackageUri"; |
| 134 static Future<Uri> _resolvePackageUriFuture(Uri packageUri) async { | 134 static Future<Uri> _resolvePackageUriFuture(Uri packageUri) async { |
| 135 return resolvePackageUri(packageUri); | 135 return resolvePackageUri(packageUri); |
| 136 } | 136 } |
| 137 static void _setupHooks() { | 137 static void _setupHooks() { |
| 138 internal.VMLibraryHooks.resolvePackageUriFuture = _resolvePackageUriFuture; | 138 internal.VMLibraryHooks.resolvePackageUriFuture = _resolvePackageUriFuture; |
| 139 } | 139 } |
| 140 | 140 |
| 141 // Defines an interceptor if there is an appropriate JavaScript prototype to d
efine it on. | 141 // Defines an interceptor if there is an appropriate JavaScript prototype to d
efine it on. |
| 142 // In any case, returns a typed JS wrapper compatibile with dart:html and the
new | 142 // In any case, returns a typed JS wrapper compatible with dart:html and the n
ew |
| 143 // typed JS Interop. | 143 // typed JS Interop. |
| 144 static defineInterceptorCustomElement(jsObject, Type type) native "Utils_defin
eInterceptorCustomElement"; | 144 static defineInterceptorCustomElement(jsObject, Type type) native "Utils_defin
eInterceptorCustomElement"; |
| 145 static defineInterceptor(jsObject, Type type) native "Utils_defineInterceptor"
; | 145 static defineInterceptor(jsObject, Type type) native "Utils_defineInterceptor"
; |
| 146 static setInstanceInterceptor(o, Type type, {bool customElement: false}) nativ
e "Utils_setInstanceInterceptor"; | 146 static setInstanceInterceptor(o, Type type, {bool customElement: false}) nativ
e "Utils_setInstanceInterceptor"; |
| 147 static setInstanceInterceptorCustomUpgrade(o) native "Utils_setInstanceInterce
ptorCustomUpgrade"; | 147 static setInstanceInterceptorCustomUpgrade(o) native "Utils_setInstanceInterce
ptorCustomUpgrade"; |
| 148 | 148 |
| 149 // This method will throw if the element isn't actually a real Element. | 149 // This method will throw if the element isn't actually a real Element. |
| 150 static initializeCustomElement(element) native "Utils_initializeCustomElement"
; | 150 static initializeCustomElement(element) native "Utils_initializeCustomElement"
; |
| 151 } | 151 } |
| 152 | 152 |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 else: | 536 else: |
| 537 arguments = [] | 537 arguments = [] |
| 538 for i in range(0, callback_index): | 538 for i in range(0, callback_index): |
| 539 arguments.append(ARGUMENT_NUM % i) | 539 arguments.append(ARGUMENT_NUM % i) |
| 540 argument_list = ', '.join(arguments) | 540 argument_list = ', '.join(arguments) |
| 541 if operation.is_static: | 541 if operation.is_static: |
| 542 class_property = CLASS_STATIC % interface.id | 542 class_property = CLASS_STATIC % interface.id |
| 543 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name,
callback_index, argument_list, class_property, interface.id, name, argument_list
)) | 543 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name,
callback_index, argument_list, class_property, interface.id, name, argument_list
)) |
| 544 else: | 544 else: |
| 545 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac
k_index, argument_list, interface.id, name, argument_list)) | 545 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac
k_index, argument_list, interface.id, name, argument_list)) |
| OLD | NEW |