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

Side by Side Diff: mojo/services/public/js/shell.js

Issue 883953003: Mojo JS Bindings: Add support for closing Proxy and Stub connections (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « mojo/public/js/connection.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 define("mojo/services/public/js/shell", [ 5 define("mojo/services/public/js/shell", [
6 "mojo/public/js/bindings", 6 "mojo/public/js/bindings",
7 "mojo/public/js/core", 7 "mojo/public/js/core",
8 "mojo/public/js/connection", 8 "mojo/public/js/connection",
9 "mojo/public/interfaces/application/shell.mojom", 9 "mojo/public/interfaces/application/shell.mojom",
10 "mojo/public/interfaces/application/service_provider.mojom", 10 "mojo/public/interfaces/application/service_provider.mojom",
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 40
41 connectToService(url, service, client) { 41 connectToService(url, service, client) {
42 return this.connectToApplication(url).requestService(service, client); 42 return this.connectToApplication(url).requestService(service, client);
43 }; 43 };
44 44
45 close() { 45 close() {
46 this.applications_.forEach(function(application, url) { 46 this.applications_.forEach(function(application, url) {
47 application.close(); 47 application.close();
48 }); 48 });
49 // TODO(hansmuller): Use a proper API on Proxy to close. 49 ProxyBindings(this.shellProxy).close();
50 core.close(this.shellProxy.handleStash);
51 this.applications_.clear(); 50 this.applications_.clear();
52 } 51 }
53 } 52 }
54 53
55 var exports = {}; 54 var exports = {};
56 exports.Shell = Shell; 55 exports.Shell = Shell;
57 return exports; 56 return exports;
58 }); 57 });
OLDNEW
« no previous file with comments | « mojo/public/js/connection.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698