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

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

Issue 2515763003: DevTools: use shorthand syntax in interface definitions. (Closed)
Patch Set: Created 4 years, 1 month 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 * @interface 5 * @interface
6 */ 6 */
7 function Service() { 7 function Service() {
8 } 8 }
9 9
10 Service.prototype = { 10 Service.prototype = {
11 /** 11 /**
12 * @return {!Promise} 12 * @return {!Promise}
13 */ 13 */
14 dispose: function() {}, 14 dispose() {},
15 15
16 /** 16 /**
17 * @return {function(string)} 17 * @return {function(string)}
18 */ 18 */
19 setNotify: function(notify) {} 19 setNotify(notify) {}
20 }; 20 };
21 21
22 /** 22 /**
23 * @unrestricted 23 * @unrestricted
24 */ 24 */
25 var ServiceDispatcher = class { 25 var ServiceDispatcher = class {
26 /** 26 /**
27 * @param {!ServicePort} port 27 * @param {!ServicePort} port
28 */ 28 */
29 constructor(port) { 29 constructor(port) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 function onNewPort(port) { 191 function onNewPort(port) {
192 var dispatcher = new ServiceDispatcher(new WorkerServicePort(port)); 192 var dispatcher = new ServiceDispatcher(new WorkerServicePort(port));
193 dispatchers.push(dispatcher); 193 dispatchers.push(dispatcher);
194 } 194 }
195 Runtime.setSharedWorkerNewPortCallback(onNewPort); 195 Runtime.setSharedWorkerNewPortCallback(onNewPort);
196 } else { 196 } else {
197 var worker = /** @type {!Object} */ (self); 197 var worker = /** @type {!Object} */ (self);
198 var servicePort = new WorkerServicePort(/** @type {!Worker} */ (worker)); 198 var servicePort = new WorkerServicePort(/** @type {!Worker} */ (worker));
199 dispatchers.push(new ServiceDispatcher(servicePort)); 199 dispatchers.push(new ServiceDispatcher(servicePort));
200 } 200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698