| /* |
| * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| * 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 addConsoleMessage(out Object messageObj); |
| [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 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 inspectedURLChanged(out String url); |
| [notify] void monitoringXHRWasEnabled(); |
| [notify] void monitoringXHRWasDisabled(); |
| [notify] void removeResource(out unsigned long identifier); |
| [notify] void reset(); |
| [notify] void resetProfilesPanel(); |
| [notify] void resourceTrackingWasEnabled(); |
| [notify] void resourceTrackingWasDisabled(); |
| [notify] void searchingForNodeWasEnabled(); |
| [notify] void searchingForNodeWasDisabled(); |
| [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 updateConsoleMessageExpiredCount(out unsigned long count); |
| [notify] void updateConsoleMessageRepeatCount(out unsigned long count); |
| [notify] void updateFocusedNode(out long nodeId); |
| [notify] void updateResource(out Value resource); |
| [notify] void consoleMessagesCleared(); |
| |
| #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 getSettings(out Object settings); |
| [handler=Controller] void storeLastActivePanel(in String panelName); |
| |
| [handler=Controller] void saveApplicationSettings(in String settings); |
| [handler=Controller] void saveSessionSettings(in String settings); |
| |
| [handler=Controller] void enableSearchingForNode(); |
| [handler=Controller] void disableSearchingForNode(); |
| |
| [handler=Controller] void enableMonitoringXHR(); |
| [handler=Controller] void disableMonitoringXHR(); |
| |
| [handler=Controller] void enableResourceTracking(in boolean always); |
| [handler=Controller] void disableResourceTracking(in boolean always); |
| [handler=Controller] void getResourceContent(in unsigned long identifier, out String content); |
| [handler=Controller] void reloadPage(); |
| |
| [handler=Controller] void startTimelineProfiler(); |
| [handler=Controller] void stopTimelineProfiler(); |
| |
| #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); |
| |
| [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 enableProfiler(in boolean always); |
| [handler=Controller] void disableProfiler(in boolean always); |
| |
| [handler=Profiler] void startProfiling(); |
| [handler=Profiler] 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=DOM] void setDOMBreakpoint(in long nodeId, in long type); |
| [handler=DOM] void removeDOMBreakpoint(in long nodeId, in long type); |
| |
| [handler=Controller] void clearConsoleMessages(); |
| [handler=Controller] void highlightDOMNode(in long nodeId); |
| [handler=Controller] void hideDOMNodeHighlight(); |
| [handler=Controller] void openInInspectedWindow(in String url); |
| |
| [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 getRuleRanges(in long styleSheetId, out Value ranges); |
| [handler=DOM] void applyStyleText(in long styleId, in String styleText, in String propertyName, out boolean success, out Value style, out Array changedProperties); |
| [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=DOM] void getSupportedCSSProperties(out Array cssProperties); |
| |
| [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 |
| |
| [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 |
| }; |
| } |