OLD | NEW |
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 Loading... |
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 }); |
OLD | NEW |