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 authenticating_url_loader_interceptor_meta_factory_mojom; | 5 library authenticating_url_loader_interceptor_meta_factory_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/authentication/authentication.mojom.dart' as authe
ntication_mojom; | 10 import 'package:mojo_services/authentication/authentication.mojom.dart' as authe
ntication_mojom; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 dynamic getAllTypeDefinitions([Function responseFactory]) => | 107 dynamic getAllTypeDefinitions([Function responseFactory]) => |
108 responseFactory(null); | 108 responseFactory(null); |
109 } | 109 } |
110 | 110 |
111 abstract class AuthenticatingUrlLoaderInterceptorMetaFactory { | 111 abstract class AuthenticatingUrlLoaderInterceptorMetaFactory { |
112 static const String serviceName = "mojo::AuthenticatingURLLoaderInterceptorMet
aFactory"; | 112 static const String serviceName = "mojo::AuthenticatingURLLoaderInterceptorMet
aFactory"; |
113 void createUrlLoaderInterceptorFactory(Object factoryRequest, Object authentic
ationService); | 113 void createUrlLoaderInterceptorFactory(Object factoryRequest, Object authentic
ationService); |
114 } | 114 } |
115 | 115 |
116 | 116 class _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl |
117 class _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl extends binding
s.ProxyMessageHandler | 117 extends bindings.ProxyMessageHandler |
118 implements bindings.ProxyControl { | 118 implements bindings.ProxyControl { |
119 _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fromEndpoint( | 119 _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fromEndpoint( |
120 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 120 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
121 | 121 |
122 _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fromHandle( | 122 _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fromHandle( |
123 core.MojoHandle handle) : super.fromHandle(handle); | 123 core.MojoHandle handle) : super.fromHandle(handle); |
124 | 124 |
125 _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.unbound() : super.u
nbound(); | 125 _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.unbound() : super.u
nbound(); |
126 | 126 |
127 service_describer.ServiceDescription get serviceDescription => | 127 service_describer.ServiceDescription get serviceDescription => |
128 new _AuthenticatingUrlLoaderInterceptorMetaFactoryServiceDescription(); | 128 new _AuthenticatingUrlLoaderInterceptorMetaFactoryServiceDescription(); |
129 | 129 |
130 String get serviceName => AuthenticatingUrlLoaderInterceptorMetaFactory.servic
eName; | 130 String get serviceName => AuthenticatingUrlLoaderInterceptorMetaFactory.servic
eName; |
131 | 131 |
132 @override | |
133 void handleResponse(bindings.ServiceMessage message) { | 132 void handleResponse(bindings.ServiceMessage message) { |
134 switch (message.header.type) { | 133 switch (message.header.type) { |
135 default: | 134 default: |
136 proxyError("Unexpected message type: ${message.header.type}"); | 135 proxyError("Unexpected message type: ${message.header.type}"); |
137 close(immediate: true); | 136 close(immediate: true); |
138 break; | 137 break; |
139 } | 138 } |
140 } | 139 } |
141 | 140 |
142 @override | 141 @override |
143 String toString() { | 142 String toString() { |
144 var superString = super.toString(); | 143 var superString = super.toString(); |
145 return "_AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl($superStr
ing)"; | 144 return "_AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl($superStr
ing)"; |
146 } | 145 } |
147 } | 146 } |
148 | 147 |
149 | 148 class AuthenticatingUrlLoaderInterceptorMetaFactoryProxy |
150 class AuthenticatingUrlLoaderInterceptorMetaFactoryProxy extends bindings.Proxy | 149 extends bindings.Proxy |
151 implements AuthenticatingUrlLoaderInterceptorMetaF
actory { | 150 implements AuthenticatingUrlLoaderInterceptorMetaFactory { |
152 AuthenticatingUrlLoaderInterceptorMetaFactoryProxy.fromEndpoint( | 151 AuthenticatingUrlLoaderInterceptorMetaFactoryProxy.fromEndpoint( |
153 core.MojoMessagePipeEndpoint endpoint) | 152 core.MojoMessagePipeEndpoint endpoint) |
154 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fro
mEndpoint(endpoint)); | 153 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fro
mEndpoint(endpoint)); |
155 | 154 |
156 AuthenticatingUrlLoaderInterceptorMetaFactoryProxy.fromHandle(core.MojoHandle
handle) | 155 AuthenticatingUrlLoaderInterceptorMetaFactoryProxy.fromHandle(core.MojoHandle
handle) |
157 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fro
mHandle(handle)); | 156 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.fro
mHandle(handle)); |
158 | 157 |
159 AuthenticatingUrlLoaderInterceptorMetaFactoryProxy.unbound() | 158 AuthenticatingUrlLoaderInterceptorMetaFactoryProxy.unbound() |
160 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.unb
ound()); | 159 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryProxyControl.unb
ound()); |
161 | 160 |
(...skipping 17 matching lines...) Expand all Loading... |
179 return; | 178 return; |
180 } | 179 } |
181 var params = new _AuthenticatingUrlLoaderInterceptorMetaFactoryCreateUrlLoad
erInterceptorFactoryParams(); | 180 var params = new _AuthenticatingUrlLoaderInterceptorMetaFactoryCreateUrlLoad
erInterceptorFactoryParams(); |
182 params.factoryRequest = factoryRequest; | 181 params.factoryRequest = factoryRequest; |
183 params.authenticationService = authenticationService; | 182 params.authenticationService = authenticationService; |
184 ctrl.sendMessage(params, | 183 ctrl.sendMessage(params, |
185 _authenticatingUrlLoaderInterceptorMetaFactoryMethodCreateUrlLoaderInter
ceptorFactoryName); | 184 _authenticatingUrlLoaderInterceptorMetaFactoryMethodCreateUrlLoaderInter
ceptorFactoryName); |
186 } | 185 } |
187 } | 186 } |
188 | 187 |
189 | 188 class _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl |
190 class AuthenticatingUrlLoaderInterceptorMetaFactoryStub extends bindings.Stub { | 189 extends bindings.StubMessageHandler |
| 190 implements bindings.StubControl<AuthenticatingUrlLoaderInterceptorMetaFactor
y> { |
191 AuthenticatingUrlLoaderInterceptorMetaFactory _impl; | 191 AuthenticatingUrlLoaderInterceptorMetaFactory _impl; |
192 | 192 |
193 AuthenticatingUrlLoaderInterceptorMetaFactoryStub.fromEndpoint( | 193 _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.fromEndpoint( |
194 core.MojoMessagePipeEndpoint endpoint, [AuthenticatingUrlLoaderInterceptor
MetaFactory impl]) | 194 core.MojoMessagePipeEndpoint endpoint, [AuthenticatingUrlLoaderInterceptor
MetaFactory impl]) |
195 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 195 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
196 _impl = impl; | 196 _impl = impl; |
197 } | 197 } |
198 | 198 |
199 AuthenticatingUrlLoaderInterceptorMetaFactoryStub.fromHandle( | 199 _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.fromHandle( |
200 core.MojoHandle handle, [AuthenticatingUrlLoaderInterceptorMetaFactory imp
l]) | 200 core.MojoHandle handle, [AuthenticatingUrlLoaderInterceptorMetaFactory imp
l]) |
201 : super.fromHandle(handle, autoBegin: impl != null) { | 201 : super.fromHandle(handle, autoBegin: impl != null) { |
202 _impl = impl; | 202 _impl = impl; |
203 } | 203 } |
204 | 204 |
205 AuthenticatingUrlLoaderInterceptorMetaFactoryStub.unbound([this._impl]) : supe
r.unbound(); | 205 _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.unbound([this._impl]
) : super.unbound(); |
206 | |
207 static AuthenticatingUrlLoaderInterceptorMetaFactoryStub newFromEndpoint( | |
208 core.MojoMessagePipeEndpoint endpoint) { | |
209 assert(endpoint.setDescription("For AuthenticatingUrlLoaderInterceptorMetaFa
ctoryStub")); | |
210 return new AuthenticatingUrlLoaderInterceptorMetaFactoryStub.fromEndpoint(en
dpoint); | |
211 } | |
212 | 206 |
213 | 207 |
214 | 208 |
215 dynamic handleMessage(bindings.ServiceMessage message) { | 209 dynamic handleMessage(bindings.ServiceMessage message) { |
216 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 210 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
217 return bindings.ControlMessageHandler.handleMessage(this, | 211 return bindings.ControlMessageHandler.handleMessage(this, |
218 0, | 212 0, |
219 message); | 213 message); |
220 } | 214 } |
221 if (_impl == null) { | 215 if (_impl == null) { |
(...skipping 24 matching lines...) Expand all Loading... |
246 } | 240 } |
247 | 241 |
248 @override | 242 @override |
249 void bind(core.MojoMessagePipeEndpoint endpoint) { | 243 void bind(core.MojoMessagePipeEndpoint endpoint) { |
250 super.bind(endpoint); | 244 super.bind(endpoint); |
251 if (!isOpen && (_impl != null)) { | 245 if (!isOpen && (_impl != null)) { |
252 beginHandlingEvents(); | 246 beginHandlingEvents(); |
253 } | 247 } |
254 } | 248 } |
255 | 249 |
| 250 @override |
256 String toString() { | 251 String toString() { |
257 var superString = super.toString(); | 252 var superString = super.toString(); |
258 return "AuthenticatingUrlLoaderInterceptorMetaFactoryStub($superString)"; | 253 return "_AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl($superStri
ng)"; |
259 } | 254 } |
260 | 255 |
261 int get version => 0; | 256 int get version => 0; |
262 | 257 |
263 static service_describer.ServiceDescription _cachedServiceDescription; | 258 static service_describer.ServiceDescription _cachedServiceDescription; |
264 static service_describer.ServiceDescription get serviceDescription { | 259 static service_describer.ServiceDescription get serviceDescription { |
265 if (_cachedServiceDescription == null) { | 260 if (_cachedServiceDescription == null) { |
266 _cachedServiceDescription = new _AuthenticatingUrlLoaderInterceptorMetaFac
toryServiceDescription(); | 261 _cachedServiceDescription = new _AuthenticatingUrlLoaderInterceptorMetaFac
toryServiceDescription(); |
267 } | 262 } |
268 return _cachedServiceDescription; | 263 return _cachedServiceDescription; |
269 } | 264 } |
270 } | 265 } |
271 | 266 |
| 267 class AuthenticatingUrlLoaderInterceptorMetaFactoryStub |
| 268 extends bindings.Stub<AuthenticatingUrlLoaderInterceptorMetaFactory> |
| 269 implements AuthenticatingUrlLoaderInterceptorMetaFactory { |
| 270 AuthenticatingUrlLoaderInterceptorMetaFactoryStub.fromEndpoint( |
| 271 core.MojoMessagePipeEndpoint endpoint, [AuthenticatingUrlLoaderInterceptor
MetaFactory impl]) |
| 272 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.from
Endpoint(endpoint, impl)); |
| 273 |
| 274 AuthenticatingUrlLoaderInterceptorMetaFactoryStub.fromHandle( |
| 275 core.MojoHandle handle, [AuthenticatingUrlLoaderInterceptorMetaFactory imp
l]) |
| 276 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.from
Handle(handle, impl)); |
| 277 |
| 278 AuthenticatingUrlLoaderInterceptorMetaFactoryStub.unbound([AuthenticatingUrlLo
aderInterceptorMetaFactory impl]) |
| 279 : super(new _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.unbo
und(impl)); |
| 280 |
| 281 static AuthenticatingUrlLoaderInterceptorMetaFactoryStub newFromEndpoint( |
| 282 core.MojoMessagePipeEndpoint endpoint) { |
| 283 assert(endpoint.setDescription("For AuthenticatingUrlLoaderInterceptorMetaFa
ctoryStub")); |
| 284 return new AuthenticatingUrlLoaderInterceptorMetaFactoryStub.fromEndpoint(en
dpoint); |
| 285 } |
| 286 |
| 287 static service_describer.ServiceDescription get serviceDescription => |
| 288 _AuthenticatingUrlLoaderInterceptorMetaFactoryStubControl.serviceDescripti
on; |
| 289 |
| 290 |
| 291 void createUrlLoaderInterceptorFactory(Object factoryRequest, Object authentic
ationService) { |
| 292 return impl.createUrlLoaderInterceptorFactory(factoryRequest, authentication
Service); |
| 293 } |
| 294 } |
| 295 |
272 | 296 |
273 | 297 |
OLD | NEW |