1 /* 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2008 Matt Lilek <webkit (at) mattlilek.com> 4 * Copyright (C) 2009 Google Inc. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: 9 * 10 * * Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * * Redistributions in binary form must reproduce the above 13 * copyright notice, this list of conditions and the following disclaimer 14 * in the documentation and/or other materials provided with the 15 * distribution. 16 * * Neither the name of Google Inc. nor the names of its 17 * contributors may be used to endorse or promote products derived from 18 * this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 module core { 34 interface [Conditional=INSPECTOR] InspectorBackend { 35 void storeLastActivePanel(in DOMString panelName); 36 37 void saveFrontendSettings(in DOMString settings); 38 39 void toggleNodeSearch(); 40 boolean searchingForNode(); 41 42 boolean resourceTrackingEnabled(); 43 void enableResourceTracking(in boolean always); 44 void disableResourceTracking(in boolean always); 45 void getResourceContent(in long callId, in unsigned long identifier); 46 47 void startTimelineProfiler(); 48 void stopTimelineProfiler(); 49 50 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER && !(defined(V8_BINDING) && V8_BINDING) 51 boolean debuggerEnabled(); 52 void enableDebugger(in boolean always); 53 void disableDebugger(in boolean always); 54 55 void addBreakpoint(in DOMString sourceID, in unsigned long lineNumber, in DOMString condition); 56 void updateBreakpoint(in DOMString sourceID, in unsigned long lineNumber, in DOMString condition); 57 void removeBreakpoint(in DOMString sourceID, in unsigned long lineNumber); 58 59 void pauseInDebugger(); 60 void resumeDebugger(); 61 62 void stepOverStatementInDebugger(); 63 void stepIntoStatementInDebugger(); 64 void stepOutOfFunctionInDebugger(); 65 66 long pauseOnExceptionsState(); 67 void setPauseOnExceptionsState(in long pauseOnExceptionsState); 68 #endif 69 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 70 boolean profilerEnabled(); 71 void enableProfiler(in boolean always); 72 void disableProfiler(in boolean always); 73 74 void startProfiling(); 75 void stopProfiling(); 76 77 void getProfileHeaders(in long callId); 78 void getProfile(in long callId, in unsigned long uid); 79 #endif 80 void setInjectedScriptSource(in DOMString scriptSource); 81 void dispatchOnInjectedScript(in long callId, in long injectedScriptId, in DOMString methodName, in DOMString arguments, in boolean async); 82 83 void getChildNodes(in long callId, in long nodeId); 84 void setAttribute(in long callId, in long elementId, in DOMString name, in DOMString value); 85 void removeAttribute(in long callId, in long elementId, in DOMString name); 86 void setTextNodeValue(in long callId, in long nodeId, in DOMString value); 87 void getEventListenersForNode(in long callId, in long nodeId); 88 void copyNode(in long nodeId); 89 void removeNode(in long callId, in long nodeId); 90 void highlightDOMNode(in long nodeId); 91 void hideDOMNodeHighlight(); 92 93 void getCookies(in long callId); 94 void deleteCookie(in DOMString cookieName, in DOMString domain); 95 96 void releaseWrapperObjectGroup(in long injectedScriptId, in DOMString objectGroup); 97 void didEvaluateForTestInFrontend(in long callId, in DOMString jsonResult); 98 99 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE 100 void getDatabaseTableNames(in long callId, in long databaseId); 101 #endif 102 103 #if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE 104 void getDOMStorageEntries(in long callId, in long storageId); 105 void setDOMStorageItem(in long callId, in long storageId, in DOMString key, in DOMString value); 106 void removeDOMStorageItem(in long callId, in long storageId, in DOMString key); 107 #endif 108 }; 109 } 110