Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: mojo/services/public/js/shell.js

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes to adapt to roll Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/js/shell.js
diff --git a/mojo/services/public/js/shell.js b/mojo/services/public/js/shell.js
index 9fc8552f82748fc56ca87d7483fce7fc7f9f6e03..d80a2e9ad57e734ec5fe41dfc03d339f3fbd7e0e 100644
--- a/mojo/services/public/js/shell.js
+++ b/mojo/services/public/js/shell.js
@@ -8,8 +8,8 @@ define("mojo/services/public/js/shell", [
"mojo/public/js/connection",
"mojo/public/interfaces/application/shell.mojom",
"mojo/public/interfaces/application/service_provider.mojom",
- "mojo/services/public/js/service_provider",
-], function(bindings, core, connection, shellMojom, spMojom, sp) {
+ "mojo/services/public/js/service_provider","console",
+], function(bindings, core, connection, shellMojom, spMojom, sp, console) {
const ProxyBindings = bindings.ProxyBindings;
const StubBindings = bindings.StubBindings;
@@ -18,13 +18,8 @@ define("mojo/services/public/js/shell", [
const ShellInterface = shellMojom.Shell;
class Shell {
- constructor(shellHandle, app) {
- this.shellHandle = shellHandle;
- this.proxy = connection.bindProxyHandle(
- shellHandle, ShellInterface.client, ShellInterface);
-
- ProxyBindings(this.proxy).setLocalDelegate(app);
- // TODO: call this serviceProviders_
+ constructor(shellProxy) {
+ this.shellProxy = shellProxy;
this.applications_ = new Map();
}
@@ -33,11 +28,12 @@ define("mojo/services/public/js/shell", [
if (application)
return application;
- this.proxy.connectToApplication(url, function(services) {
- application = new ServiceProvider(services);
- }, function() {
- return application;
- });
+ var application = new ServiceProvider();
+ this.shellProxy.connectToApplication(url,
+ function(services) {
+ application.proxy = services;
+ },
+ application);
this.applications_.set(url, application);
return application;
}
@@ -50,8 +46,9 @@ define("mojo/services/public/js/shell", [
this.applications_.forEach(function(application, url) {
application.close();
});
+ // TODO(hansmuller): Use a proper API on Proxy to close.
+ core.close(this.shellProxy.handleStash);
this.applications_.clear();
- core.close(this.shellHandle);
}
}

Powered by Google App Engine
This is Rietveld 408576698