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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.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 (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 /** @interface */ 4 /** @interface */
5 function InspectorFrontendHostAPI() { 5 function InspectorFrontendHostAPI() {
6 } 6 }
7 window.InspectorFrontendHostAPI = InspectorFrontendHostAPI; 7 window.InspectorFrontendHostAPI = InspectorFrontendHostAPI;
8 /** @typedef 8 /** @typedef
9 {{ 9 {{
10 type: string, 10 type: string,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 [InspectorFrontendHostAPI.Events.SearchCompleted, 'searchCompleted', ['request Id', 'fileSystemPath', 'files']], 91 [InspectorFrontendHostAPI.Events.SearchCompleted, 'searchCompleted', ['request Id', 'fileSystemPath', 'files']],
92 [InspectorFrontendHostAPI.Events.SetInspectedTabId, 'setInspectedTabId', ['tab Id']], 92 [InspectorFrontendHostAPI.Events.SetInspectedTabId, 'setInspectedTabId', ['tab Id']],
93 [InspectorFrontendHostAPI.Events.SetUseSoftMenu, 'setUseSoftMenu', ['useSoftMe nu']], 93 [InspectorFrontendHostAPI.Events.SetUseSoftMenu, 'setUseSoftMenu', ['useSoftMe nu']],
94 [InspectorFrontendHostAPI.Events.ShowPanel, 'showPanel', ['panelName']] 94 [InspectorFrontendHostAPI.Events.ShowPanel, 'showPanel', ['panelName']]
95 ]; 95 ];
96 96
97 InspectorFrontendHostAPI.prototype = { 97 InspectorFrontendHostAPI.prototype = {
98 /** 98 /**
99 * @param {string=} fileSystemPath 99 * @param {string=} fileSystemPath
100 */ 100 */
101 addFileSystem: function(fileSystemPath) {}, 101 addFileSystem(fileSystemPath) {},
102 102
103 /** 103 /**
104 * @param {string} url 104 * @param {string} url
105 * @param {string} content 105 * @param {string} content
106 */ 106 */
107 append: function(url, content) {}, 107 append(url, content) {},
108 108
109 loadCompleted: function() {}, 109 loadCompleted() {},
110 110
111 /** 111 /**
112 * @param {number} requestId 112 * @param {number} requestId
113 * @param {string} fileSystemPath 113 * @param {string} fileSystemPath
114 */ 114 */
115 indexPath: function(requestId, fileSystemPath) {}, 115 indexPath(requestId, fileSystemPath) {},
116 116
117 /** 117 /**
118 * @return {string} 118 * @return {string}
119 */ 119 */
120 getSelectionBackgroundColor: function() {}, 120 getSelectionBackgroundColor() {},
121 121
122 /** 122 /**
123 * @return {string} 123 * @return {string}
124 */ 124 */
125 getSelectionForegroundColor: function() {}, 125 getSelectionForegroundColor() {},
126 126
127 /** 127 /**
128 * Requests inspected page to be placed atop of the inspector frontend with sp ecified bounds. 128 * Requests inspected page to be placed atop of the inspector frontend with sp ecified bounds.
129 * @param {{x: number, y: number, width: number, height: number}} bounds 129 * @param {{x: number, y: number, width: number, height: number}} bounds
130 */ 130 */
131 setInspectedPageBounds: function(bounds) {}, 131 setInspectedPageBounds(bounds) {},
132 132
133 /** 133 /**
134 * @param {!Array<string>} certChain 134 * @param {!Array<string>} certChain
135 */ 135 */
136 showCertificateViewer: function(certChain) {}, 136 showCertificateViewer(certChain) {},
137 137
138 /** 138 /**
139 * @param {string} shortcuts 139 * @param {string} shortcuts
140 */ 140 */
141 setWhitelistedShortcuts: function(shortcuts) {}, 141 setWhitelistedShortcuts(shortcuts) {},
142 142
143 inspectElementCompleted: function() {}, 143 inspectElementCompleted() {},
144 144
145 /** 145 /**
146 * @param {string} url 146 * @param {string} url
147 */ 147 */
148 openInNewTab: function(url) {}, 148 openInNewTab(url) {},
149 149
150 /** 150 /**
151 * @param {string} fileSystemPath 151 * @param {string} fileSystemPath
152 */ 152 */
153 removeFileSystem: function(fileSystemPath) {}, 153 removeFileSystem(fileSystemPath) {},
154 154
155 requestFileSystems: function() {}, 155 requestFileSystems() {},
156 156
157 /** 157 /**
158 * @param {string} url 158 * @param {string} url
159 * @param {string} content 159 * @param {string} content
160 * @param {boolean} forceSaveAs 160 * @param {boolean} forceSaveAs
161 */ 161 */
162 save: function(url, content, forceSaveAs) {}, 162 save(url, content, forceSaveAs) {},
163 163
164 /** 164 /**
165 * @param {number} requestId 165 * @param {number} requestId
166 * @param {string} fileSystemPath 166 * @param {string} fileSystemPath
167 * @param {string} query 167 * @param {string} query
168 */ 168 */
169 searchInPath: function(requestId, fileSystemPath, query) {}, 169 searchInPath(requestId, fileSystemPath, query) {},
170 170
171 /** 171 /**
172 * @param {number} requestId 172 * @param {number} requestId
173 */ 173 */
174 stopIndexing: function(requestId) {}, 174 stopIndexing(requestId) {},
175 175
176 bringToFront: function() {}, 176 bringToFront() {},
177 177
178 closeWindow: function() {}, 178 closeWindow() {},
179 179
180 copyText: function(text) {}, 180 copyText(text) {},
181 181
182 /** 182 /**
183 * @param {string} url 183 * @param {string} url
184 */ 184 */
185 inspectedURLChanged: function(url) {}, 185 inspectedURLChanged(url) {},
186 186
187 /** 187 /**
188 * @param {string} fileSystemId 188 * @param {string} fileSystemId
189 * @param {string} registeredName 189 * @param {string} registeredName
190 * @return {?DOMFileSystem} 190 * @return {?DOMFileSystem}
191 */ 191 */
192 isolatedFileSystem: function(fileSystemId, registeredName) {}, 192 isolatedFileSystem(fileSystemId, registeredName) {},
193 193
194 /** 194 /**
195 * @param {string} url 195 * @param {string} url
196 * @param {string} headers 196 * @param {string} headers
197 * @param {number} streamId 197 * @param {number} streamId
198 * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} call back 198 * @param {function(!InspectorFrontendHostAPI.LoadNetworkResourceResult)} call back
199 */ 199 */
200 loadNetworkResource: function(url, headers, streamId, callback) {}, 200 loadNetworkResource(url, headers, streamId, callback) {},
201 201
202 /** 202 /**
203 * @param {function(!Object<string, string>)} callback 203 * @param {function(!Object<string, string>)} callback
204 */ 204 */
205 getPreferences: function(callback) {}, 205 getPreferences(callback) {},
206 206
207 /** 207 /**
208 * @param {string} name 208 * @param {string} name
209 * @param {string} value 209 * @param {string} value
210 */ 210 */
211 setPreference: function(name, value) {}, 211 setPreference(name, value) {},
212 212
213 /** 213 /**
214 * @param {string} name 214 * @param {string} name
215 */ 215 */
216 removePreference: function(name) {}, 216 removePreference(name) {},
217 217
218 clearPreferences: function() {}, 218 clearPreferences() {},
219 219
220 /** 220 /**
221 * @param {!FileSystem} fileSystem 221 * @param {!FileSystem} fileSystem
222 */ 222 */
223 upgradeDraggedFileSystemPermissions: function(fileSystem) {}, 223 upgradeDraggedFileSystemPermissions(fileSystem) {},
224 224
225 /** 225 /**
226 * @return {string} 226 * @return {string}
227 */ 227 */
228 platform: function() {}, 228 platform() {},
229 229
230 /** 230 /**
231 * @param {string} actionName 231 * @param {string} actionName
232 * @param {number} actionCode 232 * @param {number} actionCode
233 * @param {number} bucketSize 233 * @param {number} bucketSize
234 */ 234 */
235 recordEnumeratedHistogram: function(actionName, actionCode, bucketSize) {}, 235 recordEnumeratedHistogram(actionName, actionCode, bucketSize) {},
236 236
237 /** 237 /**
238 * @param {string} message 238 * @param {string} message
239 */ 239 */
240 sendMessageToBackend: function(message) {}, 240 sendMessageToBackend(message) {},
241 241
242 /** 242 /**
243 * @param {boolean} discoverUsbDevices 243 * @param {boolean} discoverUsbDevices
244 * @param {boolean} portForwardingEnabled 244 * @param {boolean} portForwardingEnabled
245 * @param {!Adb.PortForwardingConfig} portForwardingConfig 245 * @param {!Adb.PortForwardingConfig} portForwardingConfig
246 */ 246 */
247 setDevicesDiscoveryConfig: function(discoverUsbDevices, portForwardingEnabled, portForwardingConfig) {}, 247 setDevicesDiscoveryConfig(discoverUsbDevices, portForwardingEnabled, portForwa rdingConfig) {},
248 248
249 /** 249 /**
250 * @param {boolean} enabled 250 * @param {boolean} enabled
251 */ 251 */
252 setDevicesUpdatesEnabled: function(enabled) {}, 252 setDevicesUpdatesEnabled(enabled) {},
253 253
254 /** 254 /**
255 * @param {string} pageId 255 * @param {string} pageId
256 * @param {string} action 256 * @param {string} action
257 */ 257 */
258 performActionOnRemotePage: function(pageId, action) {}, 258 performActionOnRemotePage(pageId, action) {},
259 259
260 /** 260 /**
261 * @param {string} browserId 261 * @param {string} browserId
262 * @param {string} url 262 * @param {string} url
263 */ 263 */
264 openRemotePage: function(browserId, url) {}, 264 openRemotePage(browserId, url) {},
265 265
266 /** 266 /**
267 * @param {string} origin 267 * @param {string} origin
268 * @param {string} script 268 * @param {string} script
269 */ 269 */
270 setInjectedScriptForOrigin: function(origin, script) {}, 270 setInjectedScriptForOrigin(origin, script) {},
271 271
272 /** 272 /**
273 * @param {boolean} isDocked 273 * @param {boolean} isDocked
274 * @param {function()} callback 274 * @param {function()} callback
275 */ 275 */
276 setIsDocked: function(isDocked, callback) {}, 276 setIsDocked(isDocked, callback) {},
277 277
278 /** 278 /**
279 * @return {number} 279 * @return {number}
280 */ 280 */
281 zoomFactor: function() {}, 281 zoomFactor() {},
282 282
283 zoomIn: function() {}, 283 zoomIn() {},
284 284
285 zoomOut: function() {}, 285 zoomOut() {},
286 286
287 resetZoom: function() {}, 287 resetZoom() {},
288 288
289 /** 289 /**
290 * @param {number} x 290 * @param {number} x
291 * @param {number} y 291 * @param {number} y
292 * @param {!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor>} items 292 * @param {!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor>} items
293 * @param {!Document} document 293 * @param {!Document} document
294 */ 294 */
295 showContextMenuAtPoint: function(x, y, items, document) {}, 295 showContextMenuAtPoint(x, y, items, document) {},
296 296
297 /** 297 /**
298 * @param {function()} callback 298 * @param {function()} callback
299 */ 299 */
300 reattach: function(callback) {}, 300 reattach(callback) {},
301 301
302 /** 302 /**
303 * @return {boolean} 303 * @return {boolean}
304 */ 304 */
305 isUnderTest: function() {}, 305 isUnderTest() {},
306 306
307 readyForTest: function() {}, 307 readyForTest() {},
308 308
309 /** 309 /**
310 * @return {boolean} 310 * @return {boolean}
311 */ 311 */
312 isHostedMode: function() {} 312 isHostedMode() {}
313 }; 313 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698