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

Side by Side Diff: tools/dom/scripts/generate_blink_file.py

Issue 1883513004: Revert "Revert "Fix handling of cross-origin windows in dartium and better align general handling o… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix bug Created 4 years, 8 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
« no previous file with comments | « sdk/lib/html/html_common/conversions_dartium.dart ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
174 class Blink_DOMStringMap { 141 class Blink_DOMStringMap {
175 // _DOMStringMap native entry points 142 // _DOMStringMap native entry points
176 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba ck"; 143 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba ck";
177 144
178 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback"; 145 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback";
179 146
180 static setItem(_DOMStringMap, key, value) native "DOMStringMap_setItem_Callbac k"; 147 static setItem(_DOMStringMap, key, value) native "DOMStringMap_setItem_Callbac k";
181 148
182 static remove(_DOMStringMap, key) native "DOMStringMap_remove_Callback"; 149 static remove(_DOMStringMap, key) native "DOMStringMap_remove_Callback";
183 150
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 else: 524 else:
558 arguments = [] 525 arguments = []
559 for i in range(0, callback_index): 526 for i in range(0, callback_index):
560 arguments.append(ARGUMENT_NUM % i) 527 arguments.append(ARGUMENT_NUM % i)
561 argument_list = ', '.join(arguments) 528 argument_list = ', '.join(arguments)
562 if operation.is_static: 529 if operation.is_static:
563 class_property = CLASS_STATIC % interface.id 530 class_property = CLASS_STATIC % interface.id
564 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name, callback_index, argument_list, class_property, interface.id, name, argument_list )) 531 blink_file.write(Select_Stub(STATIC_OPERATION_ARGS, is_native) % (name, callback_index, argument_list, class_property, interface.id, name, argument_list ))
565 else: 532 else:
566 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac k_index, argument_list, interface.id, name, argument_list)) 533 blink_file.write(Select_Stub(OPERATION_ARGS, is_native) % (name, callbac k_index, argument_list, interface.id, name, argument_list))
OLDNEW
« no previous file with comments | « sdk/lib/html/html_common/conversions_dartium.dart ('k') | tools/dom/scripts/systemnative.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698