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

Side by Side Diff: mojo/public/tools/bindings/generators/dart_templates/interface_definition.tmpl

Issue 1060193002: Provide mechanism to close immediately to Dart bindings (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « mojo/public/dart/src/stub.dart ('k') | sky/engine/bindings/mojo_natives.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {%- for method in interface.methods %} 1 {%- for method in interface.methods %}
2 const int k{{interface|name}}_{{method|name}}_name = {{method.ordinal}}; 2 const int k{{interface|name}}_{{method|name}}_name = {{method.ordinal}};
3 {%- endfor %} 3 {%- endfor %}
4 4
5 const String {{interface|name}}Name = 5 const String {{interface|name}}Name =
6 '{{namespace|replace(".","::")}}::{{interface|name}}'; 6 '{{namespace|replace(".","::")}}::{{interface|name}}';
7 7
8 abstract class {{interface|name}} { 8 abstract class {{interface|name}} {
9 {%- for method in interface.methods %} 9 {%- for method in interface.methods %}
10 {%- if method.response_parameters == None %} 10 {%- if method.response_parameters == None %}
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 {{interface|name}}Proxy.unbound() : 152 {{interface|name}}Proxy.unbound() :
153 impl = new {{interface|name}}ProxyImpl.unbound() { 153 impl = new {{interface|name}}ProxyImpl.unbound() {
154 ptr = new _{{interface|name}}ProxyCalls(impl); 154 ptr = new _{{interface|name}}ProxyCalls(impl);
155 } 155 }
156 156
157 static {{interface|name}}Proxy newFromEndpoint( 157 static {{interface|name}}Proxy newFromEndpoint(
158 core.MojoMessagePipeEndpoint endpoint) => 158 core.MojoMessagePipeEndpoint endpoint) =>
159 new {{interface|name}}Proxy.fromEndpoint(endpoint); 159 new {{interface|name}}Proxy.fromEndpoint(endpoint);
160 160
161 Future close({bool nodefer: false}) => impl.close(nodefer: nodefer); 161 Future close({bool immediate: false}) => impl.close(immediate: immediate);
162 162
163 String toString() { 163 String toString() {
164 return "{{interface|name}}Proxy($impl)"; 164 return "{{interface|name}}Proxy($impl)";
165 } 165 }
166 } 166 }
167 167
168 168
169 class {{interface|name}}Stub extends bindings.Stub { 169 class {{interface|name}}Stub extends bindings.Stub {
170 {{interface|name}} _impl = null; 170 {{interface|name}} _impl = null;
171 171
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 set impl({{interface|name}} d) { 244 set impl({{interface|name}} d) {
245 assert(_impl == null); 245 assert(_impl == null);
246 _impl = d; 246 _impl = d;
247 } 247 }
248 248
249 String toString() { 249 String toString() {
250 var superString = super.toString(); 250 var superString = super.toString();
251 return "{{interface|name}}Stub($superString)"; 251 return "{{interface|name}}Stub($superString)";
252 } 252 }
253 } 253 }
OLDNEW
« no previous file with comments | « mojo/public/dart/src/stub.dart ('k') | sky/engine/bindings/mojo_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698