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

Side by Side Diff: sky/engine/bindings-dart/dart/scripts/templates/dart_blink.template

Issue 918273002: Remove bindings-dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // WARNING: Do not edit - generated code.
6 library dart.dom._blink;
7
8 // This is a place to put custom renames if we need them.
9 final resolverMap = {
10 };
11
12 dynamic resolver(String s) {
13 {% for interface in interfaces %}
14 if (s == "{{interface.name}}") return Blink{{interface.name}}.instance;
15 {% endfor %}
16 // Failed to find it, check for custom renames
17 dynamic obj = resolverMap[s];
18 if (obj != null) return obj;
19 throw("No such interface exposed in blink: ${s}");
20 }
21
22 {% from 'methods_cpp.template' import resolver_method_name with context %}
23 {% for interface in interfaces %}
24 class Blink{{interface.name}}{% if interface.parent_interface %} extends Blink{{ interface.parent_interface}}{% endif %} {
25 static final instance = new Blink{{interface.name}}();
26
27 {% for native_entry in interface.native_entries %}
28 {% set blink_entry = native_entry.blink_entry %}
29 {% set args = native_entry.argument_names | join(", ") %}
30 {% set resolver_string = native_entry.resolver_string %}
31 static {{blink_entry}}({{args}}) native "{{resolver_string}}";
32 {{blink_entry}}_({{args}}) => {{blink_entry}}({{args}});
33
34 {% endfor %}
35 }
36
37 {% endfor %}
38
39 // _Utils native entry points
40 class Blink_Utils {
41 static window() native "Utils_window";
42
43 static forwardingPrint(message) native "Utils_forwardingPrint";
44
45 static spawnDomUri(uri) native "Utils_spawnDomUri";
46
47 static register(document, tag, customType, extendsTagName) native "Utils_regis ter";
48
49 static createElement(document, tagName) native "Utils_createElement";
50
51 static initializeCustomElement(element) native "Utils_initializeCustomElement" ;
52
53 static changeElementWrapper(element, type) native "Utils_changeElementWrapper" ;
54 }
55
56 class Blink_DOMWindowCrossFrame {
57 // FIXME: Return to using explicit cross frame entry points after roll to M35
58 static get_history(_DOMWindowCrossFrame) native "Window_history_cross_frame_Ge tter";
59
60 static get_location(_DOMWindowCrossFrame) native "Window_location_cross_frame_ Getter";
61
62 static get_closed(_DOMWindowCrossFrame) native "Window_closed_Getter";
63
64 static get_opener(_DOMWindowCrossFrame) native "Window_opener_Getter";
65
66 static get_parent(_DOMWindowCrossFrame) native "Window_parent_Getter";
67
68 static get_top(_DOMWindowCrossFrame) native "Window_top_Getter";
69
70 static close(_DOMWindowCrossFrame) native "Window_close_Callback";
71
72 static postMessage(_DOMWindowCrossFrame, message, targetOrigin, [messagePorts] ) native "Window_postMessage_Callback";
73 }
74
75 class Blink_HistoryCrossFrame {
76 // _HistoryCrossFrame native entry points
77 static back(_HistoryCrossFrame) native "History_back_Callback";
78
79 static forward(_HistoryCrossFrame) native "History_forward_Callback";
80
81 static go(_HistoryCrossFrame, distance) native "History_go_Callback";
82 }
83
84 class Blink_LocationCrossFrame {
85 // _LocationCrossFrame native entry points
86 static set_href(_LocationCrossFrame, h) native "Location_href_Setter";
87 }
88
89 class Blink_DOMStringMap {
90 // _DOMStringMap native entry points
91 static containsKey(_DOMStringMap, key) native "DOMStringMap_containsKey_Callba ck";
92
93 static item(_DOMStringMap, key) native "DOMStringMap_item_Callback";
94
95 static setItem(_DOMStringMap, key, value) native "DOMStringMap_setItem_Callbac k";
96
97 static remove(_DOMStringMap, key) native "DOMStringMap_remove_Callback";
98
99 static get_keys(_DOMStringMap) native "DOMStringMap_getKeys_Callback";
100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698