mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
These never really worked with HTML imports. This CL updates them to use a more modern version of the Sky module system so we can delete the old this.exports pattern. R=esprehn@chromium.org Review URL: https://codereview.chromium.org/697723003
24 lines
801 B
Plaintext
24 lines
801 B
Plaintext
<link rel="import" href="/mojo/public/sky/core.sky" as="core" />
|
|
<link rel="import" href="/mojo/public/sky/connection.sky" as="connection" />
|
|
<script>
|
|
function wrapHandle(handle, service, client) {
|
|
var clientClass = client && service.client.delegatingStubClass;
|
|
var serviceConnection = new connection.Connection(
|
|
handle, clientClass, service.proxyClass);
|
|
if (serviceConnection.local)
|
|
serviceConnection.local.delegate$ = client;
|
|
serviceConnection.remote.connection$ = serviceConnection;
|
|
return serviceConnection.remote;
|
|
}
|
|
|
|
function connectToService(url, service, client) {
|
|
var handle = internals.connectToService(url, service.name);
|
|
return wrapHandle(handle, service, client);
|
|
}
|
|
|
|
module.exports = {
|
|
connectToService: connectToService,
|
|
wrapHandle: wrapHandle,
|
|
};
|
|
</script>
|