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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/tcp_connected_socket.mojom.dart

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Merge with master Created 4 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 library tcp_connected_socket_mojom; 5 library tcp_connected_socket_mojom;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:mojo/bindings.dart' as bindings; 9 import 'package:mojo/bindings.dart' as bindings;
10 import 'package:mojo/core.dart' as core; 10 import 'package:mojo/core.dart' as core;
11 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types;
12 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
11 13
12 14
13 15
16
17
18
19 class _TcpConnectedSocketServiceDescription implements service_describer.Service Description {
20 dynamic getTopLevelInterface([Function responseFactory]) => null;
21
22 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null;
23
24 dynamic getAllTypeDefinitions([Function responseFactory]) => null;
25 }
26
14 abstract class TcpConnectedSocket { 27 abstract class TcpConnectedSocket {
15 static const String serviceName = null; 28 static const String serviceName = null;
16 } 29 }
17 30
18 31
19 class _TcpConnectedSocketProxyImpl extends bindings.Proxy { 32 class _TcpConnectedSocketProxyImpl extends bindings.Proxy {
20 _TcpConnectedSocketProxyImpl.fromEndpoint( 33 _TcpConnectedSocketProxyImpl.fromEndpoint(
21 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); 34 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint);
22 35
23 _TcpConnectedSocketProxyImpl.fromHandle(core.MojoHandle handle) : 36 _TcpConnectedSocketProxyImpl.fromHandle(core.MojoHandle handle) :
24 super.fromHandle(handle); 37 super.fromHandle(handle);
25 38
26 _TcpConnectedSocketProxyImpl.unbound() : super.unbound(); 39 _TcpConnectedSocketProxyImpl.unbound() : super.unbound();
27 40
28 static _TcpConnectedSocketProxyImpl newFromEndpoint( 41 static _TcpConnectedSocketProxyImpl newFromEndpoint(
29 core.MojoMessagePipeEndpoint endpoint) { 42 core.MojoMessagePipeEndpoint endpoint) {
30 assert(endpoint.setDescription("For _TcpConnectedSocketProxyImpl")); 43 assert(endpoint.setDescription("For _TcpConnectedSocketProxyImpl"));
31 return new _TcpConnectedSocketProxyImpl.fromEndpoint(endpoint); 44 return new _TcpConnectedSocketProxyImpl.fromEndpoint(endpoint);
32 } 45 }
33 46
47 service_describer.ServiceDescription get serviceDescription =>
48 new _TcpConnectedSocketServiceDescription();
49
34 void handleResponse(bindings.ServiceMessage message) { 50 void handleResponse(bindings.ServiceMessage message) {
35 switch (message.header.type) { 51 switch (message.header.type) {
36 default: 52 default:
37 proxyError("Unexpected message type: ${message.header.type}"); 53 proxyError("Unexpected message type: ${message.header.type}");
38 close(immediate: true); 54 close(immediate: true);
39 break; 55 break;
40 } 56 }
41 } 57 }
42 58
43 String toString() { 59 String toString() {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 assert(_impl == null); 169 assert(_impl == null);
154 _impl = d; 170 _impl = d;
155 } 171 }
156 172
157 String toString() { 173 String toString() {
158 var superString = super.toString(); 174 var superString = super.toString();
159 return "TcpConnectedSocketStub($superString)"; 175 return "TcpConnectedSocketStub($superString)";
160 } 176 }
161 177
162 int get version => 0; 178 int get version => 0;
179
180 service_describer.ServiceDescription get serviceDescription =>
181 new _TcpConnectedSocketServiceDescription();
163 } 182 }
164 183
165 184
185
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698