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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/common/Object.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 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 eventList.splice(0, eventList.length); 157 eventList.splice(0, eventList.length);
158 }; 158 };
159 159
160 Common.EventTarget.prototype = { 160 Common.EventTarget.prototype = {
161 /** 161 /**
162 * @param {string|symbol} eventType 162 * @param {string|symbol} eventType
163 * @param {function(!Common.Event)} listener 163 * @param {function(!Common.Event)} listener
164 * @param {!Object=} thisObject 164 * @param {!Object=} thisObject
165 * @return {!Common.EventTarget.EventDescriptor} 165 * @return {!Common.EventTarget.EventDescriptor}
166 */ 166 */
167 addEventListener: function(eventType, listener, thisObject) {}, 167 addEventListener(eventType, listener, thisObject) {},
168 168
169 /** 169 /**
170 * @param {string|symbol} eventType 170 * @param {string|symbol} eventType
171 * @param {function(!Common.Event)} listener 171 * @param {function(!Common.Event)} listener
172 * @param {!Object=} thisObject 172 * @param {!Object=} thisObject
173 */ 173 */
174 removeEventListener: function(eventType, listener, thisObject) {}, 174 removeEventListener(eventType, listener, thisObject) {},
175 175
176 removeAllListeners: function() {}, 176 removeAllListeners() {},
177 177
178 /** 178 /**
179 * @param {string|symbol} eventType 179 * @param {string|symbol} eventType
180 * @return {boolean} 180 * @return {boolean}
181 */ 181 */
182 hasEventListeners: function(eventType) {}, 182 hasEventListeners(eventType) {},
183 183
184 /** 184 /**
185 * @param {string|symbol} eventType 185 * @param {string|symbol} eventType
186 * @param {*=} eventData 186 * @param {*=} eventData
187 * @return {boolean} 187 * @return {boolean}
188 */ 188 */
189 dispatchEventToListeners: function(eventType, eventData) {}, 189 dispatchEventToListeners(eventType, eventData) {},
190 }; 190 };
191 191
192 /** 192 /**
193 * @unrestricted 193 * @unrestricted
194 */ 194 */
195 Common.EventTarget.EventDescriptor = class { 195 Common.EventTarget.EventDescriptor = class {
196 /** 196 /**
197 * @param {!Common.EventTarget} eventTarget 197 * @param {!Common.EventTarget} eventTarget
198 * @param {string|symbol} eventType 198 * @param {string|symbol} eventType
199 * @param {(!Object|undefined)} receiver 199 * @param {(!Object|undefined)} receiver
200 * @param {function(?):?} method 200 * @param {function(?):?} method
201 */ 201 */
202 constructor(eventTarget, eventType, receiver, method) { 202 constructor(eventTarget, eventType, receiver, method) {
203 this.eventTarget = eventTarget; 203 this.eventTarget = eventTarget;
204 this.eventType = eventType; 204 this.eventType = eventType;
205 this.receiver = receiver; 205 this.receiver = receiver;
206 this.method = method; 206 this.method = method;
207 } 207 }
208 }; 208 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698