Sky should expose services provided to/by embedder

These now appear on internals as takeServicesProvidedToEmbedder and
takeServicesProvidedByEmbedder. When you call these functions, you get back the
raw int that represents the handle. We'll need to wrap them up inside the Dart
VM with the appropriate types. We can create a nice wrapper for that in a
future CL.

R=hansmuller@google.com, hansmuller@chromium.org

Review URL: https://codereview.chromium.org/944733002
This commit is contained in:
Adam Barth
2015-02-19 21:16:04 -08:00
parent cd6b52b4a3
commit c1dfaa1b4f
3 changed files with 3 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ main() {
var messagePipe = new MojoMessagePipe();
var wget = new WGet(messagePipe.endpoints[1]);
wget.listen();
var shellProxy = new shell_mojom.ShellProxy.fromHandle(new MojoHandle(internals.passShellProxyHandle()));
var shellProxy = new shell_mojom.ShellProxy.fromHandle(new MojoHandle(internals.takeShellProxyHandle()));
wget.initializeFromShellProxy(shellProxy, ["mojo:wget", "http://www.google.com"], "mojo:wget");
}

View File

@@ -11,7 +11,7 @@
<iframe></iframe>
<script>
var shellHandle = internals.passShellProxyHandle();
var shellHandle = internals.takeShellProxyHandle();
var shellProxy = connection.bindHandleToProxy(shellHandle, shellMojom.Shell);
var shell = new shellJS.Shell(shellProxy);

View File

@@ -14,7 +14,7 @@ describe('Mojo network_service', function() {
this.enableTimeouts(false);
it('should be able to fetch text files', function(done) {
var shellHandle = internals.passShellProxyHandle();
var shellHandle = internals.takeShellProxyHandle();
var shellProxy = connection.bindHandleToProxy(shellHandle, shellMojom.Shell);
var shell = new Shell(shellProxy);
var netService = shell.connectToService(