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 cookie_store_mojom; | 5 library cookie_store_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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 | 76 |
77 Map toJson() { | 77 Map toJson() { |
78 Map map = new Map(); | 78 Map map = new Map(); |
79 map["url"] = url; | 79 map["url"] = url; |
80 return map; | 80 return map; |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 | |
86 | |
87 class CookieStoreGetResponseParams extends bindings.Struct { | 85 class CookieStoreGetResponseParams extends bindings.Struct { |
88 static const List<bindings.StructDataHeader> kVersions = const [ | 86 static const List<bindings.StructDataHeader> kVersions = const [ |
89 const bindings.StructDataHeader(16, 0) | 87 const bindings.StructDataHeader(16, 0) |
90 ]; | 88 ]; |
91 String cookies = null; | 89 String cookies = null; |
92 | 90 |
93 CookieStoreGetResponseParams() : super(kVersions.last.size); | 91 CookieStoreGetResponseParams() : super(kVersions.last.size); |
94 | 92 |
95 static CookieStoreGetResponseParams deserialize(bindings.Message message) { | 93 static CookieStoreGetResponseParams deserialize(bindings.Message message) { |
96 var decoder = new bindings.Decoder(message); | 94 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 147 } |
150 | 148 |
151 Map toJson() { | 149 Map toJson() { |
152 Map map = new Map(); | 150 Map map = new Map(); |
153 map["cookies"] = cookies; | 151 map["cookies"] = cookies; |
154 return map; | 152 return map; |
155 } | 153 } |
156 } | 154 } |
157 | 155 |
158 | 156 |
159 | |
160 | |
161 class _CookieStoreSetParams extends bindings.Struct { | 157 class _CookieStoreSetParams extends bindings.Struct { |
162 static const List<bindings.StructDataHeader> kVersions = const [ | 158 static const List<bindings.StructDataHeader> kVersions = const [ |
163 const bindings.StructDataHeader(24, 0) | 159 const bindings.StructDataHeader(24, 0) |
164 ]; | 160 ]; |
165 String url = null; | 161 String url = null; |
166 String cookie = null; | 162 String cookie = null; |
167 | 163 |
168 _CookieStoreSetParams() : super(kVersions.last.size); | 164 _CookieStoreSetParams() : super(kVersions.last.size); |
169 | 165 |
170 static _CookieStoreSetParams deserialize(bindings.Message message) { | 166 static _CookieStoreSetParams deserialize(bindings.Message message) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 233 |
238 Map toJson() { | 234 Map toJson() { |
239 Map map = new Map(); | 235 Map map = new Map(); |
240 map["url"] = url; | 236 map["url"] = url; |
241 map["cookie"] = cookie; | 237 map["cookie"] = cookie; |
242 return map; | 238 return map; |
243 } | 239 } |
244 } | 240 } |
245 | 241 |
246 | 242 |
247 | |
248 | |
249 class CookieStoreSetResponseParams extends bindings.Struct { | 243 class CookieStoreSetResponseParams extends bindings.Struct { |
250 static const List<bindings.StructDataHeader> kVersions = const [ | 244 static const List<bindings.StructDataHeader> kVersions = const [ |
251 const bindings.StructDataHeader(16, 0) | 245 const bindings.StructDataHeader(16, 0) |
252 ]; | 246 ]; |
253 bool success = false; | 247 bool success = false; |
254 | 248 |
255 CookieStoreSetResponseParams() : super(kVersions.last.size); | 249 CookieStoreSetResponseParams() : super(kVersions.last.size); |
256 | 250 |
257 static CookieStoreSetResponseParams deserialize(bindings.Message message) { | 251 static CookieStoreSetResponseParams deserialize(bindings.Message message) { |
258 var decoder = new bindings.Decoder(message); | 252 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 "success: $success" ")"; | 304 "success: $success" ")"; |
311 } | 305 } |
312 | 306 |
313 Map toJson() { | 307 Map toJson() { |
314 Map map = new Map(); | 308 Map map = new Map(); |
315 map["success"] = success; | 309 map["success"] = success; |
316 return map; | 310 return map; |
317 } | 311 } |
318 } | 312 } |
319 | 313 |
320 | |
321 | |
322 | |
323 const int _CookieStore_getName = 0; | 314 const int _CookieStore_getName = 0; |
324 const int _CookieStore_setName = 1; | 315 const int _CookieStore_setName = 1; |
325 | 316 |
326 | |
327 | |
328 class _CookieStoreServiceDescription implements service_describer.ServiceDescrip
tion { | 317 class _CookieStoreServiceDescription implements service_describer.ServiceDescrip
tion { |
329 dynamic getTopLevelInterface([Function responseFactory]) => | 318 dynamic getTopLevelInterface([Function responseFactory]) => |
330 responseFactory(null); | 319 responseFactory(null); |
331 | 320 |
332 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 321 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
333 responseFactory(null); | 322 responseFactory(null); |
334 | 323 |
335 dynamic getAllTypeDefinitions([Function responseFactory]) => | 324 dynamic getAllTypeDefinitions([Function responseFactory]) => |
336 responseFactory(null); | 325 responseFactory(null); |
337 } | 326 } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 static service_describer.ServiceDescription get serviceDescription { | 597 static service_describer.ServiceDescription get serviceDescription { |
609 if (_cachedServiceDescription == null) { | 598 if (_cachedServiceDescription == null) { |
610 _cachedServiceDescription = new _CookieStoreServiceDescription(); | 599 _cachedServiceDescription = new _CookieStoreServiceDescription(); |
611 } | 600 } |
612 return _cachedServiceDescription; | 601 return _cachedServiceDescription; |
613 } | 602 } |
614 } | 603 } |
615 | 604 |
616 | 605 |
617 | 606 |
OLD | NEW |