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

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: Response to review 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
« no previous file with comments | « mojo/services/public/js/service_provider.js ('k') | mojo/services/view_manager/public/cpp/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e6c2dee1fdb0a2d1e032c6220cd41f2a93d9c1dc 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,8 @@ define("mojo/services/public/js/shell", [
this.applications_.forEach(function(application, url) {
application.close();
});
+ ProxyBindings(this.shellProxy).close();
this.applications_.clear();
- core.close(this.shellHandle);
}
}
« no previous file with comments | « mojo/services/public/js/service_provider.js ('k') | mojo/services/view_manager/public/cpp/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698