| 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 http_server_mojom; | 5 library http_server_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; |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 456 |
| 457 | 457 |
| 458 | 458 |
| 459 | 459 |
| 460 const int _HttpServer_setHandlerName = 0; | 460 const int _HttpServer_setHandlerName = 0; |
| 461 const int _HttpServer_getPortName = 1; | 461 const int _HttpServer_getPortName = 1; |
| 462 | 462 |
| 463 | 463 |
| 464 | 464 |
| 465 class _HttpServerServiceDescription implements service_describer.ServiceDescript
ion { | 465 class _HttpServerServiceDescription implements service_describer.ServiceDescript
ion { |
| 466 dynamic getTopLevelInterface([Function responseFactory]) => null; | 466 dynamic getTopLevelInterface([Function responseFactory]) => |
| 467 responseFactory(null); |
| 467 | 468 |
| 468 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 469 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 470 responseFactory(null); |
| 469 | 471 |
| 470 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 472 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 473 responseFactory(null); |
| 471 } | 474 } |
| 472 | 475 |
| 473 abstract class HttpServer { | 476 abstract class HttpServer { |
| 474 static const String serviceName = null; | 477 static const String serviceName = null; |
| 475 dynamic setHandler(String pattern,Object handler,[Function responseFactory = n
ull]); | 478 dynamic setHandler(String pattern,Object handler,[Function responseFactory = n
ull]); |
| 476 dynamic getPort([Function responseFactory = null]); | 479 dynamic getPort([Function responseFactory = null]); |
| 477 } | 480 } |
| 478 | 481 |
| 479 | 482 |
| 480 class _HttpServerProxyImpl extends bindings.Proxy { | 483 class _HttpServerProxyImpl extends bindings.Proxy { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 _impl = d; | 733 _impl = d; |
| 731 } | 734 } |
| 732 | 735 |
| 733 String toString() { | 736 String toString() { |
| 734 var superString = super.toString(); | 737 var superString = super.toString(); |
| 735 return "HttpServerStub($superString)"; | 738 return "HttpServerStub($superString)"; |
| 736 } | 739 } |
| 737 | 740 |
| 738 int get version => 0; | 741 int get version => 0; |
| 739 | 742 |
| 740 service_describer.ServiceDescription get serviceDescription => | 743 static service_describer.ServiceDescription _cachedServiceDescription; |
| 741 new _HttpServerServiceDescription(); | 744 static service_describer.ServiceDescription get serviceDescription { |
| 745 if (_cachedServiceDescription == null) { |
| 746 _cachedServiceDescription = new _HttpServerServiceDescription(); |
| 747 } |
| 748 return _cachedServiceDescription; |
| 749 } |
| 742 } | 750 } |
| 743 | 751 |
| 744 const int _HttpHandler_handleRequestName = 0; | 752 const int _HttpHandler_handleRequestName = 0; |
| 745 | 753 |
| 746 | 754 |
| 747 | 755 |
| 748 class _HttpHandlerServiceDescription implements service_describer.ServiceDescrip
tion { | 756 class _HttpHandlerServiceDescription implements service_describer.ServiceDescrip
tion { |
| 749 dynamic getTopLevelInterface([Function responseFactory]) => null; | 757 dynamic getTopLevelInterface([Function responseFactory]) => |
| 758 responseFactory(null); |
| 750 | 759 |
| 751 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => null; | 760 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
| 761 responseFactory(null); |
| 752 | 762 |
| 753 dynamic getAllTypeDefinitions([Function responseFactory]) => null; | 763 dynamic getAllTypeDefinitions([Function responseFactory]) => |
| 764 responseFactory(null); |
| 754 } | 765 } |
| 755 | 766 |
| 756 abstract class HttpHandler { | 767 abstract class HttpHandler { |
| 757 static const String serviceName = null; | 768 static const String serviceName = null; |
| 758 dynamic handleRequest(http_request_mojom.HttpRequest request,[Function respons
eFactory = null]); | 769 dynamic handleRequest(http_request_mojom.HttpRequest request,[Function respons
eFactory = null]); |
| 759 } | 770 } |
| 760 | 771 |
| 761 | 772 |
| 762 class _HttpHandlerProxyImpl extends bindings.Proxy { | 773 class _HttpHandlerProxyImpl extends bindings.Proxy { |
| 763 _HttpHandlerProxyImpl.fromEndpoint( | 774 _HttpHandlerProxyImpl.fromEndpoint( |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 _impl = d; | 967 _impl = d; |
| 957 } | 968 } |
| 958 | 969 |
| 959 String toString() { | 970 String toString() { |
| 960 var superString = super.toString(); | 971 var superString = super.toString(); |
| 961 return "HttpHandlerStub($superString)"; | 972 return "HttpHandlerStub($superString)"; |
| 962 } | 973 } |
| 963 | 974 |
| 964 int get version => 0; | 975 int get version => 0; |
| 965 | 976 |
| 966 service_describer.ServiceDescription get serviceDescription => | 977 static service_describer.ServiceDescription _cachedServiceDescription; |
| 967 new _HttpHandlerServiceDescription(); | 978 static service_describer.ServiceDescription get serviceDescription { |
| 979 if (_cachedServiceDescription == null) { |
| 980 _cachedServiceDescription = new _HttpHandlerServiceDescription(); |
| 981 } |
| 982 return _cachedServiceDescription; |
| 983 } |
| 968 } | 984 } |
| 969 | 985 |
| 970 | 986 |
| 971 | 987 |
| OLD | NEW |