diff options
| author | Steve Block <steveblock@google.com> | 2011-05-06 11:45:16 +0100 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2011-05-12 13:44:10 +0100 |
| commit | cad810f21b803229eb11403f9209855525a25d57 (patch) | |
| tree | 29a6fd0279be608e0fe9ffe9841f722f0f4e4269 /Source/WebCore/inspector/Inspector.idl | |
| parent | 121b0cf4517156d0ac5111caf9830c51b69bae8f (diff) | |
| download | external_webkit-cad810f21b803229eb11403f9209855525a25d57.zip external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.gz external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.bz2 | |
Merge WebKit at r75315: Initial merge by git.
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
Diffstat (limited to 'Source/WebCore/inspector/Inspector.idl')
| -rw-r--r-- | Source/WebCore/inspector/Inspector.idl | 299 |
1 files changed, 299 insertions, 0 deletions
diff --git a/Source/WebCore/inspector/Inspector.idl b/Source/WebCore/inspector/Inspector.idl new file mode 100644 index 0000000..7b2d7e2 --- /dev/null +++ b/Source/WebCore/inspector/Inspector.idl @@ -0,0 +1,299 @@ +/* + * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +module core { + interface [Conditional=INSPECTOR] Inspector { + + /////////////////////////////////////////////////////////////////////// + // generic Inspector's methods + /////////////////////////////////////////////////////////////////////// + + // HUGE FIXME: we need to expose InjectedScript methods here. Or document InjectedScript capabilities. + [domain=Inspector] void setInjectedScriptSource(in String scriptSource); + [domain=Inspector] void dispatchOnInjectedScript(in long injectedScriptId, in String methodName, in String arguments, out Value result, out boolean isException); + [domain=Inspector] void addScriptToEvaluateOnLoad(in String scriptSource); + [domain=Inspector] void removeAllScriptsToEvaluateOnLoad(); + [domain=Inspector] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup); + [domain=Inspector] void getInspectorState(out Object state); + [domain=Inspector] void setMonitoringXHREnabled(in boolean enable, out boolean newState); + [domain=Inspector] void reloadPage(); + [domain=Inspector] void populateScriptObjects(); + + [domain=Inspector] void openInInspectedWindow(in String url); + [domain=Inspector] void setSearchingForNode(in boolean enabled, out boolean newState); + [notify, domain=Inspector] void addNodesToSearchResult(out Array nodeIds); + [notify, domain=Inspector] void bringToFront(); + [notify, domain=Inspector] void disconnectFromBackend(); + [notify, domain=Inspector] void inspectedURLChanged(out String url); + [notify, domain=Inspector] void domContentEventFired(out double time); + [notify, domain=Inspector] void loadEventFired(out double time); + [notify, domain=Inspector] void reset(); + [notify, domain=Inspector] void showPanel(out String panel); + + [notify, domain=Inspector] void evaluateForTestInFrontend(out long testCallId, out String script); + [domain=Inspector] void didEvaluateForTestInFrontend(in long testCallId, in String jsonResult); + + [domain=Inspector] void highlightDOMNode(in long nodeId); + [domain=Inspector] void hideDOMNodeHighlight(); + [domain=Inspector] void highlightFrame(in unsigned long frameId); + [domain=Inspector] void hideFrameHighlight(); + [notify, domain=Inspector] void updateFocusedNode(out long nodeId); + + [domain=Inspector] void setExtraHeaders(in Object headers); + + [domain=Inspector] void getCookies(out Array cookies, out String cookiesString); + [domain=Inspector] void deleteCookie(in String cookieName, in String domain); + + /////////////////////////////////////////////////////////////////////// + // Console API + /////////////////////////////////////////////////////////////////////// + + [domain=Inspector] void setConsoleMessagesEnabled(in boolean enabled, out boolean newState); + [notify, domain=Inspector] void addConsoleMessage(out Object messageObj); + [notify, domain=Inspector] void updateConsoleMessageExpiredCount(out unsigned long count); + [notify, domain=Inspector] void updateConsoleMessageRepeatCount(out unsigned long count); + [domain=Inspector] void clearConsoleMessages(); + [notify, domain=Inspector] void consoleMessagesCleared(); + + /////////////////////////////////////////////////////////////////////// + // Network API + /////////////////////////////////////////////////////////////////////// + + [domain=Network] void cachedResources(out Object resources); + [domain=Network] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out String content); + [notify, domain=Network] void frameDetachedFromParent(out unsigned long frameId); + + [notify, domain=Network] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack); + [notify, domain=Network] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse); + [notify, domain=Network] void markResourceAsCached(out long identifier); + [notify, domain=Network] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response); + [notify, domain=Network] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived); + [notify, domain=Network] void didFinishLoading(out long identifier, out double finishTime); + [notify, domain=Network] void didFailLoading(out long identifier, out double time, out String localizedDescription); + [notify, domain=Network] void didLoadResourceFromMemoryCache(out double time, out Object resource); + [notify, domain=Network] void setInitialContent(out long identifier, out String sourceString, out String type); + [notify, domain=Network] void didCommitLoadForFrame(out Object frame, out Object loader); + [notify, domain=Network] void didCreateWebSocket(out unsigned long identifier, out String requestURL); + [notify, domain=Network] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request); + [notify, domain=Network] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response); + [notify, domain=Network] void didCloseWebSocket(out unsigned long identifier, out double time); + +#if defined(ENABLE_DATABASE) && ENABLE_DATABASE + + /////////////////////////////////////////////////////////////////////// + // Database API + /////////////////////////////////////////////////////////////////////// + + [notify, domain=Database] void addDatabase(out Object database); + [notify, domain=Database] void selectDatabase(out int databaseId); + [domain=Database] void getDatabaseTableNames(in long databaseId, out Array tableNames); + [domain=Database] void executeSQL(in long databaseId, in String query, out boolean success, out long transactionId); + [notify, domain=Database] void sqlTransactionSucceeded(out long transactionId, out Value columnNames, out Value values); + [notify, domain=Database] void sqlTransactionFailed(out long transactionId, out Value sqlError); +#endif + +#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE + + /////////////////////////////////////////////////////////////////////// + // DOM Storage API + /////////////////////////////////////////////////////////////////////// + + [domain=DOMStorage] void getDOMStorageEntries(in long storageId, out Array entries); + [domain=DOMStorage] void setDOMStorageItem(in long storageId, in String key, in String value, out boolean success); + [domain=DOMStorage] void removeDOMStorageItem(in long storageId, in String key, out boolean success); + [notify, domain=DOMStorage] void addDOMStorage(out Object storage); + [notify, domain=DOMStorage] void updateDOMStorage(out int storageId); + [notify, domain=DOMStorage] void selectDOMStorage(out int storageId); +#endif + +#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS + + /////////////////////////////////////////////////////////////////////// + // AppCache API + /////////////////////////////////////////////////////////////////////// + + [domain=ApplicationCache] void getApplicationCaches(out Value applicationCaches); + [notify, domain=ApplicationCache] void updateApplicationCacheStatus(out int status); + [notify, domain=ApplicationCache] void updateNetworkState(out boolean isNowOnline); +#endif + +#if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM + + /////////////////////////////////////////////////////////////////////// + // Filesystem API + /////////////////////////////////////////////////////////////////////// + + [domain=FileSystem] void getFileSystemPathAsync(in unsigned int type, in String origin); + [domain=FileSystem] void revealFolderInOS(in String path); + + [notify, domain=FileSystem] void didGetFileSystemPath(out String root, out int type, out String origin); + [notify, domain=FileSystem] void didGetFileSystemError(out int type, out String origin); + [notify, domain=FileSystem] void didGetFileSystemDisabled(); +#endif + + /////////////////////////////////////////////////////////////////////// + // DOM API + /////////////////////////////////////////////////////////////////////// + + [domain=DOM] void getChildNodes(in long nodeId); + [domain=DOM] void setAttribute(in long elementId, in String name, in String value, out boolean success); + [domain=DOM] void removeAttribute(in long elementId, in String name, out boolean success); + [domain=DOM] void setTextNodeValue(in long nodeId, in String value, out boolean success); + [domain=DOM] void getEventListenersForNode(in long nodeId, out long outNodeId, out Array listenersArray); + [domain=DOM] void copyNode(in long nodeId); + [domain=DOM] void removeNode(in long nodeId, out long outNodeId); + [domain=DOM] void changeTagName(in long nodeId, in String newTagName, out long outNodeId); + [domain=DOM] void getOuterHTML(in long nodeId, out String outerHTML); + [domain=DOM] void setOuterHTML(in long nodeId, in String outerHTML, out long outNodeId); + [domain=DOM] void addInspectedNode(in long nodeId); + [domain=DOM] void performSearch(in String query, in boolean runSynchronously); + [domain=DOM] void searchCanceled(); + [domain=DOM] void pushNodeByPathToFrontend(in String path, out long nodeId); + + [notify, domain=DOM] void setDocument(out Value root); // FIXME: should be requested from the front-end as getDocument. + [notify, domain=DOM] void attributesUpdated(out long id, out Array attributes); + [notify, domain=DOM] void characterDataModified(out long id, out String newValue); + [notify, domain=DOM] void setChildNodes(out long parentId, out Array nodes); + [notify, domain=DOM] void setDetachedRoot(out Object root); + [notify, domain=DOM] void childNodeCountUpdated(out long id, out int newValue); + [notify, domain=DOM] void childNodeInserted(out long parentId, out long prevId, out Object node); + [notify, domain=DOM] void childNodeRemoved(out long parentId, out long id); + [notify, domain=DOM] void didCommitLoad(); + + /////////////////////////////////////////////////////////////////////// + // CSS API + /////////////////////////////////////////////////////////////////////// + + [domain=CSS] void getStylesForNode2(in long nodeId, out Value styles); + [domain=CSS] void getComputedStyleForNode2(in long nodeId, out Value style); + [domain=CSS] void getInlineStyleForNode2(in long nodeId, out Value style); + [domain=CSS] void getAllStyles2(out Array styleSheetIds); + [domain=CSS] void getStyleSheet2(in String styleSheetId, out Value styleSheet); + [domain=CSS] void getStyleSheetText2(in String styleSheetId, out String url, out String text); + [domain=CSS] void setStyleSheetText2(in String styleSheetId, in String text, out boolean success); + [domain=CSS] void setPropertyText2(in Object styleId, in long propertyIndex, in String text, in boolean overwrite, out Value style); + [domain=CSS] void toggleProperty2(in Object styleId, in long propertyIndex, in boolean disable, out Value style); + [domain=CSS] void setRuleSelector2(in Object ruleId, in String selector, out Value rule); + [domain=CSS] void addRule2(in long contextNodeId, in String selector, out Value rule); + [domain=CSS] void getSupportedCSSProperties(out Array cssProperties); + [domain=CSS] void querySelectorAll(in long documentId, in String selector, out Array result); + + /////////////////////////////////////////////////////////////////////// + // Timeline API + /////////////////////////////////////////////////////////////////////// + + [domain=Inspector] void startTimelineProfiler(); + [domain=Inspector] void stopTimelineProfiler(); + [notify, domain=Timeline] void timelineProfilerWasStarted(); + [notify, domain=Timeline] void timelineProfilerWasStopped(); + [notify, domain=Timeline] void addRecordToTimeline(out Object record); + +#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER + + /////////////////////////////////////////////////////////////////////// + // Debugger API + /////////////////////////////////////////////////////////////////////// + + [domain=Inspector] void enableDebuggerFromFrontend(in boolean always); + [domain=Inspector] void disableDebugger(in boolean always); + [notify, domain=Debugger] void debuggerWasEnabled(); + [notify, domain=Debugger] void debuggerWasDisabled(); + + [notify, domain=Debugger] void attachDebuggerWhenShown(); // FIXME: do something with this eventually. + + [notify, domain=Debugger] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType); + [notify, domain=Debugger] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage); + + [domain=Debugger] void activateBreakpoints(); + [domain=Debugger] void deactivateBreakpoints(); + + [domain=Debugger] void setBreakpoint(in String sourceID, in unsigned int lineNumber, in String condition, in boolean enabled, out String breakpointId, out unsigned int actualLineNumber); + [domain=Debugger] void removeBreakpoint(in String breakpointId); + + [domain=Inspector] void setStickyBreakpoints(in Object breakpoints); // FIXME: Move to newly introduced BrowserDebugger. + + [domain=DOM] void setDOMBreakpoint(in long nodeId, in long type); // FIXME: Move to newly introduced BrowserDebugger. + [domain=DOM] void removeDOMBreakpoint(in long nodeId, in long type); // FIXME: Move to newly introduced BrowserDebugger. + + [domain=Inspector] void setEventListenerBreakpoint(in String eventName); // FIXME: Move to newly introduced BrowserDebugger. + [domain=Inspector] void removeEventListenerBreakpoint(in String eventName); // FIXME: Move to newly introduced BrowserDebugger. + + [domain=Inspector] void setXHRBreakpoint(in String url); // FIXME: Move to newly introduced BrowserDebugger. + [domain=Inspector] void removeXHRBreakpoint(in String url); // FIXME: Move to newly introduced BrowserDebugger. + + [domain=Debugger] void stepOverStatement(); // FIXME: rename to stepOver + [domain=Debugger] void stepIntoStatement(); // FIXME: rename to stepInto + [domain=Debugger] void stepOutOfFunction(); // FIXME: rename to stepOut + [domain=Debugger] void pause(); + [notify, domain=Debugger] void pausedScript(out Object details); + [domain=Debugger] void resume(); + [notify, domain=Debugger] void resumedScript(); // FIXME: Make this out parameter fo resume if possible. + + [domain=Debugger] void setPauseOnExceptionsState(in long pauseOnExceptionsState, out long newState); + + [domain=Debugger] void editScriptSource(in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames); + [domain=Debugger] void getScriptSource(in String sourceID, out String scriptSource); + + [notify, domain=Debugger] void breakpointResolved(out String breakpointId, out String sourceID, out unsigned int lineNumber, out String condition, out boolean enabled, out unsigned int originalLineNumber); + +#if defined(ENABLE_WORKERS) && ENABLE_WORKERS + [notify, domain=Debugger] void didCreateWorker(out long id, out String url, out boolean isShared); + [notify, domain=Debugger] void didDestroyWorker(out long id); +#endif // ENABLE_WORKERS + + /////////////////////////////////////////////////////////////////////// + // Profiler API + /////////////////////////////////////////////////////////////////////// + + [domain=Inspector] void enableProfiler(in boolean always); // FIXME: preferrable with Inspector domain, dispatched on backend. + [domain=Inspector] void disableProfiler(in boolean always); + [notify, domain=Profiler] void profilerWasEnabled(); + [notify, domain=Profiler] void profilerWasDisabled(); + + [domain=Inspector] void startProfiling(); // FIXME: dispatch on profiler agent. + [domain=Inspector] void stopProfiling(); // FIXME: dispatch on profiler agent. + + [domain=Profiler] void getProfileHeaders(out Array headers); + [domain=Profiler] void getProfile(in String type, in unsigned long uid, out Object profile); + [domain=Profiler] void removeProfile(in String type, in unsigned long uid); + [domain=Profiler] void clearProfiles(); + + // FIXME: split into Profiler and HeapProfiler. + [domain=Profiler] void takeHeapSnapshot(); + [notify, domain=Profiler] void addProfileHeader(out Object header); + [notify, domain=Profiler] void addHeapSnapshotChunk(out unsigned long uid, out String chunk); + [notify, domain=Profiler] void finishHeapSnapshot(out unsigned long uid); + [notify, domain=Profiler] void setRecordingProfile(out boolean isProfiling); + [notify, domain=Profiler] void resetProfiles(); + +#endif // ENABLE_JAVASCRIPT_DEBUGGER + }; +} |
