| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 136 |
| 137 // This method will throw if the element isn't actually a real Element. | 137 // This method will throw if the element isn't actually a real Element. |
| 138 static initializeCustomElement(element) native "Utils_initializeCustomElement"
; | 138 static initializeCustomElement(element) native "Utils_initializeCustomElement"
; |
| 139 } | 139 } |
| 140 | 140 |
| 141 class Blink_DOMWindowCrossFrame { |
| 142 // FIXME: Return to using explicit cross frame entry points after roll to M35 |
| 143 static get_history(_DOMWindowCrossFrame) native "Window_history_cross_frame_Ge
tter"; |
| 144 |
| 145 static get_location(_DOMWindowCrossFrame) native "Window_location_cross_frame_
Getter"; |
| 146 |
| 147 static get_closed(_DOMWindowCrossFrame) native "Window_closed_Getter"; |
| 148 |
| 149 static get_opener(_DOMWindowCrossFrame) native "Window_opener_Getter"; |
| 150 |
| 151 static get_parent(_DOMWindowCrossFrame) native "Window_parent_Getter"; |
| 152 |
| 153 static get_top(_DOMWindowCrossFrame) native "Window_top_Getter"; |
| 154 |
| 155 static close(_DOMWindowCrossFrame) native "Window_close_Callback"; |
| 156 |
| 157 static postMessage(_DOMWindowCrossFrame, message, targetOrigin, [messagePorts]
) native "Window_postMessage_Callback"; |
| 158 } |
| 159 |
| 160 class Blink_HistoryCrossFrame { |
| 161 // _HistoryCrossFrame native entry points |
| 162 static back(_HistoryCrossFrame) native "History_back_Callback"; |
| 163 |
| 164 static forward(_HistoryCrossFrame) native "History_forward_Callback"; |
| 165 |
| 166 static go(_HistoryCrossFrame, distance) native "History_go_Callback"; |
| 167 } |
| 168 |
| 169 class Blink_LocationCrossFrame { |
| 170 // _LocationCrossFrame native entry points |
| 171 static set_href(_LocationCrossFrame, h) native "Location_href_Setter"; |
| 172 } |
| 173 |
| 141 class Blink_DOMStringMap { | 174 class Blink_DOMStringMap { |
| 142 // _DOMStringMap native entry points | 175 // _DOMStringMap native entry points |
| 143 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba
ck"; | 176 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba
ck"; |
| 144 | 177 |
| 145 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback"; | 178 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback"; |
| 146 | 179 |
| 147 static setItem(_DOMStringMap, key, value) native "DOMStringMap_setItem_Callbac
k"; | 180 static setItem(_DOMStringMap, key, value) native "DOMStringMap_setItem_Callbac
k"; |
| 148 | 181 |
| 149 static remove(_DOMStringMap, key) native "DOMStringMap_remove_Callback"; | 182 static remove(_DOMStringMap, key) native "DOMStringMap_remove_Callback"; |
| 150 | 183 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 else: | 557 else: |
| 525 arguments = [] | 558 arguments = [] |
| 526 for i in range(0, callback_index): | 559 for i in range(0, callback_index): |
| 527 arguments.append(ARGUMENT_NUM % i) | 560 arguments.append(ARGUMENT_NUM % i) |
| 528 argument_list = ', '.join(arguments) | 561 argument_list = ', '.join(arguments) |
| 529 if operation.is_static: | 562 if operation.is_static: |
| 530 class_property = CLASS_STATIC % interface.id | 563 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
)) | 564 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name,
callback_index, argument_list, class_property, interface.id, name, argument_list
)) |
| 532 else: | 565 else: |
| 533 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac
k_index, argument_list, interface.id, name, argument_list)) | 566 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac
k_index, argument_list, interface.id, name, argument_list)) |
| OLD | NEW |