OLD | NEW |
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 files_mojom; | 5 library files_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 import 'package:mojo_services/mojo/files/directory.mojom.dart' as directory_mojo
m; | 10 import 'package:mojo_services/mojo/files/directory.mojom.dart' as directory_mojo
m; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 "directory: $directory" ")"; | 89 "directory: $directory" ")"; |
90 } | 90 } |
91 | 91 |
92 Map toJson() { | 92 Map toJson() { |
93 throw new bindings.MojoCodecError( | 93 throw new bindings.MojoCodecError( |
94 'Object containing handles cannot be encoded to JSON.'); | 94 'Object containing handles cannot be encoded to JSON.'); |
95 } | 95 } |
96 } | 96 } |
97 | 97 |
98 | 98 |
99 | |
100 | |
101 class FilesOpenFileSystemResponseParams extends bindings.Struct { | 99 class FilesOpenFileSystemResponseParams extends bindings.Struct { |
102 static const List<bindings.StructDataHeader> kVersions = const [ | 100 static const List<bindings.StructDataHeader> kVersions = const [ |
103 const bindings.StructDataHeader(16, 0) | 101 const bindings.StructDataHeader(16, 0) |
104 ]; | 102 ]; |
105 types_mojom.Error error = null; | 103 types_mojom.Error error = null; |
106 | 104 |
107 FilesOpenFileSystemResponseParams() : super(kVersions.last.size); | 105 FilesOpenFileSystemResponseParams() : super(kVersions.last.size); |
108 | 106 |
109 static FilesOpenFileSystemResponseParams deserialize(bindings.Message message)
{ | 107 static FilesOpenFileSystemResponseParams deserialize(bindings.Message message)
{ |
110 var decoder = new bindings.Decoder(message); | 108 var decoder = new bindings.Decoder(message); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 "error: $error" ")"; | 164 "error: $error" ")"; |
167 } | 165 } |
168 | 166 |
169 Map toJson() { | 167 Map toJson() { |
170 Map map = new Map(); | 168 Map map = new Map(); |
171 map["error"] = error; | 169 map["error"] = error; |
172 return map; | 170 return map; |
173 } | 171 } |
174 } | 172 } |
175 | 173 |
176 | |
177 | |
178 | |
179 const int _Files_openFileSystemName = 0; | 174 const int _Files_openFileSystemName = 0; |
180 | 175 |
181 | |
182 | |
183 class _FilesServiceDescription implements service_describer.ServiceDescription { | 176 class _FilesServiceDescription implements service_describer.ServiceDescription { |
184 dynamic getTopLevelInterface([Function responseFactory]) => | 177 dynamic getTopLevelInterface([Function responseFactory]) => |
185 responseFactory(null); | 178 responseFactory(null); |
186 | 179 |
187 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 180 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
188 responseFactory(null); | 181 responseFactory(null); |
189 | 182 |
190 dynamic getAllTypeDefinitions([Function responseFactory]) => | 183 dynamic getAllTypeDefinitions([Function responseFactory]) => |
191 responseFactory(null); | 184 responseFactory(null); |
192 } | 185 } |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 static service_describer.ServiceDescription get serviceDescription { | 399 static service_describer.ServiceDescription get serviceDescription { |
407 if (_cachedServiceDescription == null) { | 400 if (_cachedServiceDescription == null) { |
408 _cachedServiceDescription = new _FilesServiceDescription(); | 401 _cachedServiceDescription = new _FilesServiceDescription(); |
409 } | 402 } |
410 return _cachedServiceDescription; | 403 return _cachedServiceDescription; |
411 } | 404 } |
412 } | 405 } |
413 | 406 |
414 | 407 |
415 | 408 |
OLD | NEW |