/* * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2008 Matt Lilek * Copyright (C) 2009, 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 { [notify] void addRecordToTimeline(out Object record); [notify] void addNodesToSearchResult(out Array nodeIds); [notify] void attributesUpdated(out long id, out Array attributes); [notify] void bringToFront(); [notify] void characterDataModified(out long id, out String newValue); [notify] void childNodeCountUpdated(out long id, out int newValue); [notify] void childNodeInserted(out long parentId, out long prevId, out Object node); [notify] void childNodeRemoved(out long parentId, out long id); [notify] void didCommitLoad(); [notify] void evaluateForTestInFrontend(out long testCallId, out String script); [notify] void disconnectFromBackend(); [notify] void domContentEventFired(out double time); [notify] void inspectedURLChanged(out String url); [notify] void loadEventFired(out double time); [notify] void reset(); [notify] void resetProfilesPanel(); [notify] void setChildNodes(out long parentId, out Array nodes); [notify] void setDetachedRoot(out Object root); [notify] void setDocument(out Value root); [notify] void showPanel(out String panel); [notify] void timelineProfilerWasStarted(); [notify] void timelineProfilerWasStopped(); [notify] void updateFocusedNode(out long nodeId); #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER [notify] void addProfileHeader(out Object header); [notify] void attachDebuggerWhenShown(); [notify] void debuggerWasEnabled(); [notify] void debuggerWasDisabled(); [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage); [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType); [notify] void pausedScript(out Object details); [notify] void profilerWasEnabled(); [notify] void profilerWasDisabled(); [notify] void restoredBreakpoint(out String sourceID, out String url, out int line, out boolean enabled, out String condition); [notify] void resumedScript(); [notify] void setRecordingProfile(out boolean isProfiling); [notify] void updatePauseOnExceptionsState(out long state); #endif #if defined(ENABLE_DATABASE) && ENABLE_DATABASE [notify] void addDatabase(out Object database); [notify] void selectDatabase(out int databaseId); #endif #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE [notify] void addDOMStorage(out Object storage); [notify] void updateDOMStorage(out int storageId); [notify] void selectDOMStorage(out int storageId); #endif #if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS [notify] void updateApplicationCacheStatus(out int status); [notify] void updateNetworkState(out boolean isNowOnline); #endif #if defined(ENABLE_WORKERS) && ENABLE_WORKERS [notify] void didCreateWorker(out long id, out String url, out boolean isShared); [notify] void didDestroyWorker(out long id); #endif // This method is going to be broken down into smaller parts. [handler=Controller] void populateScriptObjects(); [handler=Controller] void getInspectorState(out Object state); [handler=Controller] void setSearchingForNode(in boolean enabled, out boolean newState); [handler=Controller] void setMonitoringXHREnabled(in boolean enable, out boolean newState); [handler=Controller] void reloadPage(); [handler=Controller] void startTimelineProfiler(); [handler=Controller] void stopTimelineProfiler(); [handler=Resource] void cachedResources(out Object resources); [handler=Resource] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out String content); [notify] void identifierForInitialRequest(out long identifier, out String url, out Object loader); [notify] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse); [notify] void markResourceAsCached(out long identifier); [notify] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response); [notify] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived); [notify] void didFinishLoading(out long identifier, out double finishTime); [notify] void didFailLoading(out long identifier, out double time, out String localizedDescription); [notify] void didLoadResourceFromMemoryCache(out double time, out Object resource); [notify] void setInitialContent(out long identifier, out String sourceString, out String type); [notify] void didCommitLoadForFrame(out Object frame, out Object loader); [notify] void frameDetachedFromParent(out unsigned long frameId); [notify] void didCreateWebSocket(out unsigned long identifier, out String requestURL); [notify] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request); [notify] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response); [notify] void didCloseWebSocket(out unsigned long identifier, out double time); #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER [handler=Backend] void enableDebugger(in boolean always); [handler=Controller] void disableDebugger(in boolean always); [handler=Debug] void setBreakpoint(in String sourceID, in unsigned int lineNumber, in boolean enabled, in String condition, out boolean success, out unsigned int actualLineNumber); [handler=Debug] void removeBreakpoint(in String sourceID, in unsigned long lineNumber); [handler=Debug] void activateBreakpoints(); [handler=Debug] void deactivateBreakpoints(); [handler=Debug] void pause(); [handler=Debug] void resume(); [handler=Debug] void stepOverStatement(); [handler=Debug] void stepIntoStatement(); [handler=Debug] void stepOutOfFunction(); [handler=Debug] void setPauseOnExceptionsState(in long pauseOnExceptionsState, out long newState); [handler=Debug] void editScriptSource(in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames); [handler=Debug] void getScriptSource(in String sourceID, out String scriptSource); [handler=Controller] void setNativeBreakpoint(in Object breakpoint, out String breakpointId); [handler=Controller] void removeNativeBreakpoint(in String breakpointId); [handler=Controller] void enableProfiler(in boolean always); [handler=Controller] void disableProfiler(in boolean always); [handler=Controller] void startProfiling(); [handler=Controller] void stopProfiling(); [handler=Profiler] void getProfileHeaders(out Array headers); [handler=Profiler] void getProfile(in String type, in unsigned long uid, out Object profile); [handler=Profiler] void removeProfile(in String type, in unsigned long uid); [handler=Profiler] void clearProfiles(); [handler=Profiler] void takeHeapSnapshot(); #endif [handler=Backend] void setInjectedScriptSource(in String scriptSource); [handler=Backend] void dispatchOnInjectedScript(in long injectedScriptId, in String methodName, in String arguments, out Value result, out boolean isException); [handler=Controller] void addScriptToEvaluateOnLoad(in String scriptSource); [handler=Controller] void removeAllScriptsToEvaluateOnLoad(); [handler=DOM] void getChildNodes(in long nodeId); [handler=DOM] void setAttribute(in long elementId, in String name, in String value, out boolean success); [handler=DOM] void removeAttribute(in long elementId, in String name, out boolean success); [handler=DOM] void setTextNodeValue(in long nodeId, in String value, out boolean success); [handler=DOM] void getEventListenersForNode(in long nodeId, out long outNodeId, out Array listenersArray); [handler=DOM] void copyNode(in long nodeId); [handler=DOM] void removeNode(in long nodeId, out long outNodeId); [handler=DOM] void changeTagName(in long nodeId, in String newTagName, out long outNodeId); [handler=DOM] void getOuterHTML(in long nodeId, out String outerHTML); [handler=DOM] void setOuterHTML(in long nodeId, in String outerHTML, out long outNodeId); [handler=DOM] void addInspectedNode(in long nodeId); [handler=DOM] void performSearch(in String query, in boolean runSynchronously); [handler=DOM] void searchCanceled(); [handler=DOM] void pushNodeByPathToFrontend(in String path, out long nodeId); [handler=Controller] void setConsoleMessagesEnabled(in boolean enabled, out boolean newState); [notify] void addConsoleMessage(out Object messageObj); [notify] void updateConsoleMessageExpiredCount(out unsigned long count); [notify] void updateConsoleMessageRepeatCount(out unsigned long count); [handler=Controller] void clearConsoleMessages(); [notify] void consoleMessagesCleared(); [handler=Controller] void highlightDOMNode(in long nodeId); [handler=Controller] void hideDOMNodeHighlight(); [handler=Controller] void openInInspectedWindow(in String url); [handler=Controller] void highlightFrame(in unsigned long frameId); [handler=Controller] void hideFrameHighlight(); [handler=DOM] void getStyles(in long nodeId, in boolean authOnly, out Value styles); [handler=DOM] void getAllStyles(out Array styles); [handler=DOM] void getInlineStyle(in long nodeId, out Value style); [handler=DOM] void getComputedStyle(in long nodeId, out Value style); [handler=DOM] void getStyleSheet(in long styleSheetId, out Object styleSheet); [handler=DOM] void getStyleSourceData(in long styleSheetId, out Object styleSourceData); [handler=DOM] void applyStyleText(in long styleId, in String styleText, in String propertyName, out boolean success, out Value style); [handler=DOM] void setStyleText(in long styleId, in String styleText, out boolean success); [handler=DOM] void setStyleProperty(in long styleId, in String name, in String value, out boolean success); [handler=DOM] void toggleStyleEnabled(in long styleId, in String propertyName, in boolean disabled, out Value style); [handler=DOM] void setRuleSelector(in long ruleId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode); [handler=DOM] void addRule(in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode); [handler=CSS] void getStylesForNode2(in long nodeId, out Value styles); [handler=CSS] void getComputedStyleForNode2(in long nodeId, out Value style); [handler=CSS] void getInlineStyleForNode2(in long nodeId, out Value style); [handler=CSS] void getAllStyles2(out Array styleSheetIds); [handler=CSS] void getStyleSheet2(in String styleSheetId, out Value styleSheet); [handler=CSS] void getStyleSheetText2(in String styleSheetId, out String url, out String text); [handler=CSS] void setStyleSheetText2(in String styleSheetId, in String text, out boolean success); [handler=CSS] void setPropertyText2(in Object styleId, in long propertyIndex, in String text, in boolean overwrite, out Value style); [handler=CSS] void toggleProperty2(in Object styleId, in long propertyIndex, in boolean disable, out Value style); [handler=CSS] void setRuleSelector2(in Object ruleId, in String selector, out Value rule); [handler=CSS] void addRule2(in long contextNodeId, in String selector, out Value rule); [handler=CSS] void getSupportedCSSProperties(out Array cssProperties); [handler=CSS] void querySelectorAll(in long documentId, in String selector, out Array result); [handler=Controller] void getCookies(out Array cookies, out String cookiesString); [handler=Controller] void deleteCookie(in String cookieName, in String domain); #if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS [handler=ApplicationCache] void getApplicationCaches(out Value applicationCaches); #endif #if defined(ENABLE_FILE_SYSTEM) && ENABLE_FILE_SYSTEM [handler=FileSystem] void getFileSystemPathAsync(in unsigned int type, in String origin); [handler=FileSystem] void revealFolderInOS(in String path); [notify] void didGetFileSystemPath(out String root, out int type, out String origin); [notify] void didGetFileSystemError(out int type, out String origin); [notify] void didGetFileSystemDisabled(); #endif [handler=Backend] void releaseWrapperObjectGroup(in long injectedScriptId, in String objectGroup); [handler=Controller] void didEvaluateForTestInFrontend(in long testCallId, in String jsonResult); #if defined(ENABLE_DATABASE) && ENABLE_DATABASE [handler=Backend] void getDatabaseTableNames(in long databaseId, out Array tableNames); [handler=Backend] void executeSQL(in long databaseId, in String query, out boolean success, out long transactionId); [notify] void sqlTransactionSucceeded(out long transactionId, out Value columnNames, out Value values); [notify] void sqlTransactionFailed(out long transactionId, out Value sqlError); #endif #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE [handler=Controller] void getDOMStorageEntries(in long storageId, out Array entries); [handler=Controller] void setDOMStorageItem(in long storageId, in String key, in String value, out boolean success); [handler=Controller] void removeDOMStorageItem(in long storageId, in String key, out boolean success); #endif }; }