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

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

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: No changes to sha1s Created 4 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
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 device_info_mojom; 5 library device_info_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 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return "_DeviceInfoGetDeviceTypeParams("")"; 61 return "_DeviceInfoGetDeviceTypeParams("")";
62 } 62 }
63 63
64 Map toJson() { 64 Map toJson() {
65 Map map = new Map(); 65 Map map = new Map();
66 return map; 66 return map;
67 } 67 }
68 } 68 }
69 69
70 70
71
72
73 class DeviceInfoGetDeviceTypeResponseParams extends bindings.Struct { 71 class DeviceInfoGetDeviceTypeResponseParams extends bindings.Struct {
74 static const List<bindings.StructDataHeader> kVersions = const [ 72 static const List<bindings.StructDataHeader> kVersions = const [
75 const bindings.StructDataHeader(16, 0) 73 const bindings.StructDataHeader(16, 0)
76 ]; 74 ];
77 DeviceInfoDeviceType deviceType = null; 75 DeviceInfoDeviceType deviceType = null;
78 76
79 DeviceInfoGetDeviceTypeResponseParams() : super(kVersions.last.size); 77 DeviceInfoGetDeviceTypeResponseParams() : super(kVersions.last.size);
80 78
81 static DeviceInfoGetDeviceTypeResponseParams deserialize(bindings.Message mess age) { 79 static DeviceInfoGetDeviceTypeResponseParams deserialize(bindings.Message mess age) {
82 var decoder = new bindings.Decoder(message); 80 var decoder = new bindings.Decoder(message);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 "deviceType: $deviceType" ")"; 136 "deviceType: $deviceType" ")";
139 } 137 }
140 138
141 Map toJson() { 139 Map toJson() {
142 Map map = new Map(); 140 Map map = new Map();
143 map["deviceType"] = deviceType; 141 map["deviceType"] = deviceType;
144 return map; 142 return map;
145 } 143 }
146 } 144 }
147 145
148
149
150
151 const int _DeviceInfo_getDeviceTypeName = 0; 146 const int _DeviceInfo_getDeviceTypeName = 0;
152 147
153 class DeviceInfoDeviceType extends bindings.MojoEnum { 148 class DeviceInfoDeviceType extends bindings.MojoEnum {
154 static const DeviceInfoDeviceType unknown = const DeviceInfoDeviceType._(0); 149 static const DeviceInfoDeviceType unknown = const DeviceInfoDeviceType._(0);
155 static const DeviceInfoDeviceType headless = const DeviceInfoDeviceType._(1); 150 static const DeviceInfoDeviceType headless = const DeviceInfoDeviceType._(1);
156 static const DeviceInfoDeviceType watch = const DeviceInfoDeviceType._(2); 151 static const DeviceInfoDeviceType watch = const DeviceInfoDeviceType._(2);
157 static const DeviceInfoDeviceType phone = const DeviceInfoDeviceType._(3); 152 static const DeviceInfoDeviceType phone = const DeviceInfoDeviceType._(3);
158 static const DeviceInfoDeviceType tablet = const DeviceInfoDeviceType._(4); 153 static const DeviceInfoDeviceType tablet = const DeviceInfoDeviceType._(4);
159 static const DeviceInfoDeviceType desktop = const DeviceInfoDeviceType._(5); 154 static const DeviceInfoDeviceType desktop = const DeviceInfoDeviceType._(5);
160 static const DeviceInfoDeviceType tv = const DeviceInfoDeviceType._(6); 155 static const DeviceInfoDeviceType tv = const DeviceInfoDeviceType._(6);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 case tv: 225 case tv:
231 return 'DeviceInfoDeviceType.tv'; 226 return 'DeviceInfoDeviceType.tv';
232 default: 227 default:
233 return null; 228 return null;
234 } 229 }
235 } 230 }
236 231
237 int toJson() => mojoEnumValue; 232 int toJson() => mojoEnumValue;
238 } 233 }
239 234
240
241
242
243
244 class _DeviceInfoServiceDescription implements service_describer.ServiceDescript ion { 235 class _DeviceInfoServiceDescription implements service_describer.ServiceDescript ion {
245 dynamic getTopLevelInterface([Function responseFactory]) => 236 dynamic getTopLevelInterface([Function responseFactory]) =>
246 responseFactory(null); 237 responseFactory(null);
247 238
248 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 239 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
249 responseFactory(null); 240 responseFactory(null);
250 241
251 dynamic getAllTypeDefinitions([Function responseFactory]) => 242 dynamic getAllTypeDefinitions([Function responseFactory]) =>
252 responseFactory(null); 243 responseFactory(null);
253 } 244 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 static service_describer.ServiceDescription get serviceDescription { 454 static service_describer.ServiceDescription get serviceDescription {
464 if (_cachedServiceDescription == null) { 455 if (_cachedServiceDescription == null) {
465 _cachedServiceDescription = new _DeviceInfoServiceDescription(); 456 _cachedServiceDescription = new _DeviceInfoServiceDescription();
466 } 457 }
467 return _cachedServiceDescription; 458 return _cachedServiceDescription;
468 } 459 }
469 } 460 }
470 461
471 462
472 463
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698