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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/worker_service/ServiceDispatcher.js

Issue 2421913003: DevTools: allow reattaching main target live. (Closed)
Patch Set: review comments addressed. Created 4 years, 2 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
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698