2 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 // WebKit Web Facing API
33 /** @type {boolean} */
34 Event.prototype.isMetaOrCtrlForTest;
38 * @extends {KeyboardEvent}
39 * @param {string} eventType
40 * @param {!Object=} properties
42 window.KeyboardEvent = function(eventType, properties) {}
47 KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;
49 /** @param {*} message */
50 function postMessage(message) {}
53 * @param {string} eventName
54 * @param {!Function} listener
55 * @param {boolean=} capturing
57 function addEventListener(eventName, listener, capturing) {}
61 * @param {boolean=} onlyFirst
65 Array.prototype.remove = function(value, onlyFirst) {}
67 * @return {!Object.<string, boolean>}
71 Array.prototype.keySet = function() {}
73 * @param {number} index
74 * @return {!Array.<!T>}
78 Array.prototype.rotate = function(index) {}
81 * @param {function(!T,!S):number=} comparator
86 Array.prototype.lowerBound = function(object, comparator) {}
89 * @param {function(!T,!S):number=} comparator
94 Array.prototype.upperBound = function(object, comparator) {}
97 * @param {function(!T,!S):number} comparator
102 Array.prototype.binaryIndexOf = function(value, comparator) {}
104 * @param {function(number, number): number} comparator
105 * @param {number} leftBound
106 * @param {number} rightBound
107 * @param {number} sortWindowLeft
108 * @param {number} sortWindowRight
109 * @return {!Array.<number>}
110 * @this {Array.<number>}
112 Array.prototype.sortRange = function(comparator, leftBound, rightBound, sortWindowLeft, sortWindowRight) {}
115 * @param {function(!T,!T): number=} comparator
116 * @return {!Array.<T>}
120 Array.prototype.stableSort = function(comparator) {}
123 * @this {Array.<number>}
124 * @param {function(number,number):boolean} comparator
125 * @param {number} left
126 * @param {number} right
127 * @param {number} pivotIndex
130 Array.prototype.partition = function(comparator, left, right, pivotIndex) {}
133 * @this {Array.<number>}
135 * @param {function(number,number):boolean=} comparator
138 Array.prototype.qselect = function(k, comparator) {}
141 * @param {string} field
142 * @return {!Array.<!T>}
143 * @this {Array.<!Object.<string,T>>}
146 Array.prototype.select = function(field) {}
149 * @return {!T|undefined}
153 Array.prototype.peekLast = function() {}
156 * @param {!Array.<T>} array
157 * @param {function(T,T):number} comparator
158 * @return {!Array.<T>}
162 Array.prototype.intersectOrdered = function(array, comparator) {}
165 * @param {!Array.<T>} array
166 * @param {function(T,T):number} comparator
167 * @return {!Array.<T>}
171 Array.prototype.mergeOrdered = function(array, comparator) {}
177 function DOMFileSystem() {}
180 * @type {DirectoryEntry}
182 DOMFileSystem.prototype.root = null;
185 function InspectorFrontendHostAPI() {}
186 /** @param {!Function=} callback */
187 InspectorFrontendHostAPI.prototype.addFileSystem = function(callback) {}
188 /** @param {!Function=} callback */
189 InspectorFrontendHostAPI.prototype.append = function(url, content, callback) {}
190 /** @param {!Function=} callback */
191 InspectorFrontendHostAPI.prototype.indexPath = function(requestId, fileSystemPath, callback) {}
192 /** @return {string} */
193 InspectorFrontendHostAPI.prototype.getSelectionBackgroundColor = function() {}
194 /** @return {string} */
195 InspectorFrontendHostAPI.prototype.getSelectionForegroundColor = function() {}
196 /** @return {boolean} */
197 InspectorFrontendHost.isUnderTest = function() {}
199 * Requests inspected page to be placed atop of the inspector frontend
200 * with passed insets from the frontend sides, respecting minimum size passed.
201 * @param {{top: number, left: number, right: number, bottom: number}} insets
202 * @param {{width: number, height: number}} minSize
204 InspectorFrontendHostAPI.prototype.setContentsResizingStrategy = function(insets, minSize) {}
205 /** @param {string} shortcuts */
206 InspectorFrontendHostAPI.prototype.setWhitelistedShortcuts = function(shortcuts) {}
207 InspectorFrontendHostAPI.prototype.inspectElementCompleted = function() {}
208 /** @param {!Function=} callback */
209 InspectorFrontendHostAPI.prototype.moveWindowBy = function(x, y, callback) {}
210 /** @param {!Function=} callback */
211 InspectorFrontendHostAPI.prototype.openInNewTab = function(url, callback) {}
212 /** @param {!Function=} callback */
213 InspectorFrontendHostAPI.prototype.removeFileSystem = function(fileSystemPath, callback) {}
214 /** @param {!Function=} callback */
215 InspectorFrontendHostAPI.prototype.requestFileSystems = function(callback) {}
216 /** @param {!Function=} callback */
217 InspectorFrontendHostAPI.prototype.save = function(url, content, forceSaveAs, callback) {}
218 /** @param {!Function=} callback */
219 InspectorFrontendHostAPI.prototype.searchInPath = function(requestId, fileSystemPath, query, callback) {}
220 /** @param {!Function=} callback */
221 InspectorFrontendHostAPI.prototype.stopIndexing = function(requestId, callback) {}
223 InspectorFrontendHostAPI.prototype.bringToFront = function() {}
224 InspectorFrontendHostAPI.prototype.openUrlOnRemoteDeviceAndInspect = function(browserId, url) {}
225 InspectorFrontendHostAPI.prototype.closeWindow = function() {}
226 InspectorFrontendHostAPI.prototype.copyText = function(text) {}
227 InspectorFrontendHostAPI.prototype.inspectedURLChanged = function(url) {}
228 InspectorFrontendHostAPI.prototype.isolatedFileSystem = function(fileSystemId, registeredName) {}
229 InspectorFrontendHostAPI.prototype.upgradeDraggedFileSystemPermissions = function(DOMFileSystem) {}
230 InspectorFrontendHostAPI.prototype.platform = function() {}
231 InspectorFrontendHostAPI.prototype.port = function() {}
232 InspectorFrontendHostAPI.prototype.recordActionTaken = function(actionCode) {}
233 InspectorFrontendHostAPI.prototype.recordPanelShown = function(panelCode) {}
234 InspectorFrontendHostAPI.prototype.sendMessageToBackend = function(message) {}
235 InspectorFrontendHostAPI.prototype.sendMessageToEmbedder = function(message) {}
236 InspectorFrontendHostAPI.prototype.setInjectedScriptForOrigin = function(origin, script) {}
237 InspectorFrontendHostAPI.prototype.setIsDocked = function(isDocked) {}
238 InspectorFrontendHostAPI.prototype.setZoomFactor = function(zoom) {}
239 InspectorFrontendHostAPI.prototype.startRemoteDevicesListener = function() {}
240 InspectorFrontendHostAPI.prototype.stopRemoteDevicesListener = function() {}
241 InspectorFrontendHostAPI.prototype.zoomFactor = function() {}
242 InspectorFrontendHostAPI.prototype.zoomIn = function() {}
243 InspectorFrontendHostAPI.prototype.zoomOut = function() {}
244 InspectorFrontendHostAPI.prototype.resetZoom = function() {}
245 /** @type {InspectorFrontendHostAPI} */
246 var InspectorFrontendHost;
247 InspectorFrontendHost.embedderMessageAck = function(id, error) {}
249 // FIXME: remove everything below.
250 var FormatterWorker = {}
251 var WebInspector = {}
253 WebInspector.devicesModel = {};
255 WebInspector.reload = function() { }
257 /** Extensions API */
260 function AuditCategory() {}
262 function AuditResult() {}
264 function EventSink() {}
266 function ExtensionSidebarPane() {}
270 function PanelWithSidebar() {}
272 function Request() {}
274 function Resource() {}
276 function Timeline() {}
283 function ExtensionDescriptor() {
291 function ExtensionReloadOptions() {
292 this.ignoreCache = false;
293 this.injectedScript = "";
294 this.preprocessingScript = "";
300 difflib.stringAsLines = function(text) { return []; }
302 difflib.SequenceMatcher = function(baseText, newText) { }
303 difflib.SequenceMatcher.prototype.get_opcodes = function() { return []; }
306 var CodeMirror = function() { }
307 CodeMirror.on = function(obj, type, handler) { }
308 CodeMirror.prototype = {
309 addKeyMap: function(map) { },
310 addLineClass: function(handle, where, cls) { },
311 addLineWidget: function(handle, node, options) { },
313 * @param {string|!Object} spec
314 * @param {!Object=} options
316 addOverlay: function(spec, options) { },
317 addWidget: function(pos, node, scroll, vert, horiz) { },
318 charCoords: function(pos, mode) { },
319 clearGutter: function(gutterID) { },
320 clearHistory: function() { },
321 clipPos: function(pos) { },
322 coordsChar: function(coords, mode) { },
323 cursorCoords: function(start, mode) { },
324 defaultCharWidth: function() { },
325 defaultTextHeight: function() { },
326 deleteH: function(dir, unit) { },
327 eachLine: function(from, to, op) { },
328 execCommand: function(cmd) { },
329 extendSelection: function(from, to) { },
330 findMarksAt: function(pos) { },
331 findMatchingBracket: function() { },
332 findPosH: function(from, amount, unit, visually) { },
333 findPosV: function(from, amount, unit, goalColumn) { },
334 firstLine: function() { },
335 focus: function() { },
336 getAllMarks: function() { },
337 /** @param {string=} start */
338 getCursor: function(start) { },
339 getDoc: function() { },
340 getGutterElement: function() { },
341 getHistory: function() { },
342 getInputField: function(){ },
343 getLine: function(line) { },
345 * @return {!{wrapClass: string}}
347 getLineHandle: function(line) { },
348 getLineNumber: function(line) { },
349 getMode: function() { },
350 getOption: function(option) { },
351 getRange: function(from, to, lineSep) { },
353 * @return {!{left: number, top: number, width: number, height: number, clientWidth: number, clientHeight: number}}
355 getScrollInfo: function() { },
356 getScrollerElement: function() { },
357 getSelection: function() { },
358 getSelections: function() { },
359 getStateAfter: function(line) { },
360 getTokenAt: function(pos) { },
361 getValue: function(lineSep) { },
362 getViewport: function() { },
363 getWrapperElement: function() { },
364 hasFocus: function() { },
365 historySize: function() { },
366 indentLine: function(n, dir, aggressive) { },
367 indentSelection: function(how) { },
368 indexFromPos: function(coords) { },
369 isClean: function() { },
370 iterLinkedDocs: function(f) { },
371 lastLine: function() { },
372 lineCount: function() { },
373 lineInfo: function(line) { },
375 * @param {number} height
376 * @param {string=} mode
378 lineAtHeight: function(height, mode) { },
379 linkedDoc: function(options) { },
380 listSelections: function() { },
381 markClean: function() { },
382 markText: function(from, to, options) { },
383 moveH: function(dir, unit) { },
384 moveV: function(dir, unit) { },
385 off: function(type, f) { },
386 on: function(type, f) { },
387 operation: function(f) { },
388 posFromIndex: function(off) { },
389 redo: function() { },
390 refresh: function() { },
391 removeKeyMap: function(map) { },
392 removeLine: function(line) { },
393 removeLineClass: function(handle, where, cls) { },
394 removeLineWidget: function(widget) { },
395 removeOverlay: function(spec) { },
396 replaceRange: function(code, from, to, origin) { },
397 replaceSelection: function(code, collapse, origin) { },
398 scrollIntoView: function(pos, margin) { },
399 scrollTo: function(x, y) { },
400 setBookmark: function(pos, options) { },
401 setCursor: function(line, ch, extend) { },
402 setExtending: function(val) { },
403 setGutterMarker: function(line, gutterID, value) { },
404 setHistory: function(histData) { },
405 setLine: function(line, text) { },
406 setOption: function(option, value) { },
407 setSelection: function(anchor, head) { },
408 setSelections: function(selections) { },
409 setSize: function(width, height) { },
410 setValue: function(code) { },
411 somethingSelected: function() { },
412 swapDoc: function(doc) { },
413 undo: function() { },
414 unlinkDoc: function(other) { }
416 /** @type {!{cursorDiv: Element}} */
417 CodeMirror.prototype.display;
419 CodeMirror.showHint = function(codeMirror, hintintFunction) { };
420 CodeMirror.commands = {};
421 CodeMirror.modes = {};
422 CodeMirror.mimeModes = {};
423 CodeMirror.getMode = function(options, spec) { };
424 CodeMirror.overlayMode = function(mode1, mode2, squashSpans) { };
425 CodeMirror.defineMode = function(modeName, modeConstructor) { };
426 CodeMirror.startState = function(mode) { };
429 CodeMirror.Pos = function(line, ch) { }
431 CodeMirror.Pos.prototype.line;
433 CodeMirror.Pos.prototype.ch;
436 CodeMirror.StringStream = function(line)
441 CodeMirror.StringStream.prototype = {
442 backUp: function (n) { },
443 column: function () { },
444 current: function () { },
445 eat: function (match) { },
446 eatSpace: function () { },
447 eatWhile: function (match) { },
448 eol: function () { },
449 indentation: function () { },
451 * @param {!RegExp|string} pattern
452 * @param {boolean=} consume
453 * @param {boolean=} caseInsensitive
455 match: function (pattern, consume, caseInsensitive) { },
456 next: function () { },
457 peek: function () { },
458 skipTo: function (ch) { },
459 skipToEnd: function () { },
463 /** @type {Object.<string, !Object.<string, string>>} */
466 /** @type {{scrollLeft: number, scrollTop: number}} */
469 /** @type {boolean} */
470 window.dispatchStandaloneTestRunnerMessages;