| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
| 6 * @interface | 6 * @interface |
| 7 */ | 7 */ |
| 8 function Service() { } | 8 function Service() { } |
| 9 | 9 |
| 10 Service.prototype = { | 10 Service.prototype = { |
| 11 /** |
| 12 * @return {!Promise} |
| 13 */ |
| 11 dispose: function() { } | 14 dispose: function() { } |
| 12 } | 15 } |
| 13 | 16 |
| 14 /** | 17 /** |
| 15 * @constructor | 18 * @constructor |
| 16 * @param {!ServicePort} port | 19 * @param {!ServicePort} port |
| 17 */ | 20 */ |
| 18 function ServiceDispatcher(port) | 21 function ServiceDispatcher(port) |
| 19 { | 22 { |
| 20 this._constructors = new Map(); | 23 this._constructors = new Map(); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 233 |
| 231 function onNewPort(port) | 234 function onNewPort(port) |
| 232 { | 235 { |
| 233 var servicePort = new WorkerServicePort(port); | 236 var servicePort = new WorkerServicePort(port); |
| 234 var dispatcher = new ServiceDispatcher(servicePort); | 237 var dispatcher = new ServiceDispatcher(servicePort); |
| 235 dispatchers.push(dispatcher); | 238 dispatchers.push(dispatcher); |
| 236 for (var name of services.keys()) | 239 for (var name of services.keys()) |
| 237 dispatcher.registerObject(name, services.get(name)); | 240 dispatcher.registerObject(name, services.get(name)); |
| 238 } | 241 } |
| 239 } | 242 } |
| OLD | NEW |