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

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

Issue 996923003: Dart: Better handle leak checks. close() is async. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 years, 9 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') | services/dart/dart_apptests/main.dart » ('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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 {{interface|name}}Proxy.unbound() : 148 {{interface|name}}Proxy.unbound() :
149 impl = new {{interface|name}}ProxyImpl.unbound() { 149 impl = new {{interface|name}}ProxyImpl.unbound() {
150 ptr = new _{{interface|name}}ProxyCalls(impl); 150 ptr = new _{{interface|name}}ProxyCalls(impl);
151 } 151 }
152 152
153 static {{interface|name}}Proxy newFromEndpoint( 153 static {{interface|name}}Proxy newFromEndpoint(
154 core.MojoMessagePipeEndpoint endpoint) => 154 core.MojoMessagePipeEndpoint endpoint) =>
155 new {{interface|name}}Proxy.fromEndpoint(endpoint); 155 new {{interface|name}}Proxy.fromEndpoint(endpoint);
156 156
157 void close() => impl.close(); 157 Future close() => impl.close();
158 158
159 String toString() { 159 String toString() {
160 return "{{interface|name}}Proxy($impl)"; 160 return "{{interface|name}}Proxy($impl)";
161 } 161 }
162 } 162 }
163 163
164 164
165 class {{interface|name}}Stub extends bindings.Stub { 165 class {{interface|name}}Stub extends bindings.Stub {
166 {{interface|name}} _impl = null; 166 {{interface|name}} _impl = null;
167 167
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 set impl({{interface|name}} d) { 240 set impl({{interface|name}} d) {
241 assert(_impl == null); 241 assert(_impl == null);
242 _impl = d; 242 _impl = d;
243 } 243 }
244 244
245 String toString() { 245 String toString() {
246 var superString = super.toString(); 246 var superString = super.toString();
247 return "{{interface|name}}Stub($superString)"; 247 return "{{interface|name}}Stub($superString)";
248 } 248 }
249 } 249 }
OLDNEW
« no previous file with comments | « mojo/public/dart/src/stub.dart ('k') | services/dart/dart_apptests/main.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698