summaryrefslogtreecommitdiffstats
path: root/mojo/services/public/js/shell.js
diff options
context:
space:
mode:
authorrockot <rockot@chromium.org>2014-12-15 16:54:14 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-16 00:54:37 +0000
commit6f6c4e614de20d2509ee53e04b1c5351db71e1c6 (patch)
tree59b3af8852d3a35bf72981e29bdd4516d67abb4b /mojo/services/public/js/shell.js
parent3ac8a6d5596a29d00102e280ec7e7164c2807370 (diff)
downloadchromium_src-6f6c4e614de20d2509ee53e04b1c5351db71e1c6.zip
chromium_src-6f6c4e614de20d2509ee53e04b1c5351db71e1c6.tar.gz
chromium_src-6f6c4e614de20d2509ee53e04b1c5351db71e1c6.tar.bz2
Update mojo sdk to rev 59145288bae55b0fce4276b017df6a1117bcf00f
BUG=None TBR=jamesr@chromium.org for mojo Review URL: https://codereview.chromium.org/799113004 Cr-Commit-Position: refs/heads/master@{#308479}
Diffstat (limited to 'mojo/services/public/js/shell.js')
-rw-r--r--mojo/services/public/js/shell.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/mojo/services/public/js/shell.js b/mojo/services/public/js/shell.js
index 82d5292..c80caa2 100644
--- a/mojo/services/public/js/shell.js
+++ b/mojo/services/public/js/shell.js
@@ -3,13 +3,17 @@
// found in the LICENSE file.
define("mojo/services/public/js/shell", [
+ "mojo/public/js/core",
+ "mojo/public/interfaces/application/shell.mojom",
"mojo/public/interfaces/application/service_provider.mojom",
"mojo/services/public/js/service_provider",
-], function(spInterfaceModule, spModule) {
+], function(coreModule, shellInterfaceModule, spInterfaceModule, spModule) {
class Shell {
- constructor(appShell) {
- this.appShell_ = appShell;
+ constructor(shellHandle, app) {
+ this.shellHandle = shellHandle;
+ this.proxy = new shellInterfaceModule.Shell.proxyClass(shellHandle);
+ this.proxy.client$ = app;
this.applications_ = new Map();
}
@@ -18,9 +22,9 @@ define("mojo/services/public/js/shell", [
if (application)
return application;
- var proxy = new spInterfaceModule.ServiceProvider.proxyClass;
- this.appShell_.connectToApplication(url, proxy);
- application = new spModule.ServiceProvider(proxy);
+ var spProxy = new spInterfaceModule.ServiceProvider.proxyClass;
+ this.proxy.connectToApplication(url, spProxy);
+ application = new spModule.ServiceProvider(spProxy);
this.applications_.set(url, application);
return application;
}
@@ -34,6 +38,7 @@ define("mojo/services/public/js/shell", [
application.close();
});
this.applications_.clear();
+ coreModule.close(this.shellHandle);
}
}