| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 static void spawnDomHelper(Function f, int replyTo) native "Utils_spawnDomHelp
er"; | 126 static void spawnDomHelper(Function f, int replyTo) native "Utils_spawnDomHelp
er"; |
| 127 | 127 |
| 128 static register(document, tag, customType, extendsTagName) native "Utils_regis
ter"; | 128 static register(document, tag, customType, extendsTagName) native "Utils_regis
ter"; |
| 129 | 129 |
| 130 // Defines an interceptor if there is an appropriate JavaScript prototype to d
efine it on. | 130 // Defines an interceptor if there is an appropriate JavaScript prototype to d
efine it on. |
| 131 // In any case, returns a typed JS wrapper compatibile with dart:html and the
new | 131 // In any case, returns a typed JS wrapper compatibile with dart:html and the
new |
| 132 // typed JS Interop. | 132 // typed JS Interop. |
| 133 static defineInterceptorCustomElement(jsObject, Type type) native "Utils_defin
eInterceptorCustomElement"; | 133 static defineInterceptorCustomElement(jsObject, Type type) native "Utils_defin
eInterceptorCustomElement"; |
| 134 static defineInterceptor(jsObject, Type type) native "Utils_defineInterceptor"
; | 134 static defineInterceptor(jsObject, Type type) native "Utils_defineInterceptor"
; |
| 135 static setInstanceInterceptor(o, Type type, {bool customElement: false}) nativ
e "Utils_setInstanceInterceptor"; | 135 static setInstanceInterceptor(o, Type type, {bool customElement: false}) nativ
e "Utils_setInstanceInterceptor"; |
| 136 static setInstanceInterceptorCustomUpgrade(o) native "Utils_setInstanceInterce
ptorCustomUpgrade"; |
| 136 | 137 |
| 137 // This method will throw if the element isn't actually a real Element. | 138 // This method will throw if the element isn't actually a real Element. |
| 138 static initializeCustomElement(element) native "Utils_initializeCustomElement"
; | 139 static initializeCustomElement(element) native "Utils_initializeCustomElement"
; |
| 139 } | 140 } |
| 140 | 141 |
| 141 class Blink_DOMStringMap { | 142 class Blink_DOMStringMap { |
| 142 // _DOMStringMap native entry points | 143 // _DOMStringMap native entry points |
| 143 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba
ck"; | 144 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba
ck"; |
| 144 | 145 |
| 145 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback"; | 146 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback"; |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 else: | 525 else: |
| 525 arguments = [] | 526 arguments = [] |
| 526 for i in range(0, callback_index): | 527 for i in range(0, callback_index): |
| 527 arguments.append(ARGUMENT_NUM % i) | 528 arguments.append(ARGUMENT_NUM % i) |
| 528 argument_list = ', '.join(arguments) | 529 argument_list = ', '.join(arguments) |
| 529 if operation.is_static: | 530 if operation.is_static: |
| 530 class_property = CLASS_STATIC % interface.id | 531 class_property = CLASS_STATIC % interface.id |
| 531 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name,
callback_index, argument_list, class_property, interface.id, name, argument_list
)) | 532 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name,
callback_index, argument_list, class_property, interface.id, name, argument_list
)) |
| 532 else: | 533 else: |
| 533 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac
k_index, argument_list, interface.id, name, argument_list)) | 534 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac
k_index, argument_list, interface.id, name, argument_list)) |
| OLD | NEW |