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/apps/js/mojo", [ | 5 define("mojo/apps/js/mojo", [ |
6 "mojo/public/interfaces/application/service_provider.mojom", | 6 "mojo/public/interfaces/application/service_provider.mojom", |
7 "mojo/public/js/bindings/connection", | 7 "mojo/public/js/connection", |
8 "mojo/public/js/bindings/core", | 8 "mojo/public/js/core", |
9 "mojo/apps/js/bridge", | 9 "mojo/apps/js/bridge", |
10 ], function(service, connection, core, bridge) { | 10 ], function(service, connection, core, bridge) { |
11 | 11 |
12 function Shell() { | 12 function Shell() { |
13 this.applications_ = new Map(); | 13 this.applications_ = new Map(); |
14 } | 14 } |
15 | 15 |
16 Shell.prototype.connectToApplication = function(url) { | 16 Shell.prototype.connectToApplication = function(url) { |
17 var application = this.applications_.get(url); | 17 var application = this.applications_.get(url); |
18 if (application) | 18 if (application) |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 shell().close(); | 160 shell().close(); |
161 bridge.quit(); | 161 bridge.quit(); |
162 } | 162 } |
163 | 163 |
164 var exports = {}; | 164 var exports = {}; |
165 exports.requestor = requestor; | 165 exports.requestor = requestor; |
166 exports.shell = shell; | 166 exports.shell = shell; |
167 exports.quit = quit; | 167 exports.quit = quit; |
168 return exports; | 168 return exports; |
169 }); | 169 }); |
OLD | NEW |