summaryrefslogtreecommitdiffstats
path: root/WebCore/inspector/Inspector.idl
blob: 9d3d102fb70ea3be0fc212845495808e40dd4bf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/*
 * 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 close();
        [notify] void didCommitLoad();
        [notify] void evaluateForTestInFrontend(out long testCallId, out String script);
        [notify] void inspectedPageDestroyed();
        [notify] void inspectedURLChanged(out String url);
        [notify] void monitoringXHRWasEnabled();
        [notify] void monitoringXHRWasDisabled();
        [notify] void populateApplicationSettings(out String settings);
        [notify] void populateInterface();
        [notify] void populateSessionSettings(out String settings);
        [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);

#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 Value callFrames);
        [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

        [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 long callId, 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 long callId, 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 long callId, in String sourceID, in String newContent, out boolean success, out String result, out Value newCallFrames);
        [handler=Debug] void getScriptSource(in long callId, in String sourceID, out String scriptSource);

        [handler=Controller] void enableProfiler(in boolean always);
        [handler=Controller] void disableProfiler(in boolean always);

        [handler=Controller] void startProfiling();
        [handler=Controller] void stopProfiling();

        [handler=Controller] void getProfileHeaders(in long callId, out Array headers);
        [handler=Controller] void getProfile(in long callId, in unsigned long uid, out Object profile);

        [handler=Controller] void removeProfile(in unsigned long uid);
        [handler=Controller] void clearProfiles();

        [handler=Backend] void takeHeapSnapshot();
        [handler=Backend] void getProfilerLogLines(in long callId, in long inPosition, out long outPosition, out String log);
#endif
        [handler=Backend] void setInjectedScriptSource(in String scriptSource);
        [handler=Backend] void dispatchOnInjectedScript(in long callId, 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 callId, in long nodeId);
        [handler=DOM] void setAttribute(in long callId, in long elementId, in String name, in String value, out boolean success);
        [handler=DOM] void removeAttribute(in long callId, in long elementId, in String name, out boolean success);
        [handler=DOM] void setTextNodeValue(in long callId, in long nodeId, in String value, out boolean success);
        [handler=DOM] void getEventListenersForNode(in long callId, in long nodeId, out long outNodeId, out Array listenersArray);
        [handler=DOM] void copyNode(in long nodeId);
        [handler=DOM] void removeNode(in long callId, in long nodeId, out long outNodeId);
        [handler=DOM] void changeTagName(in long callId, in long nodeId, in String newTagName, out long outNodeId);
        [handler=DOM] void getOuterHTML(in long callId, in long nodeId, out String outerHTML);
        [handler=DOM] void setOuterHTML(in long callId, 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 long callId, in String path, out long nodeId);

        [handler=Backend] void clearConsoleMessages(in long callId);

        [handler=Controller] void highlightDOMNode(in long nodeId);
        [handler=Controller] void hideDOMNodeHighlight();

        [handler=DOM] void getStyles(in long callId, in long nodeId, in boolean authOnly, out Value styles);
        [handler=DOM] void getAllStyles(in long callId, out Array styles);
        [handler=DOM] void getInlineStyle(in long callId, in long nodeId, out Value style);
        [handler=DOM] void getComputedStyle(in long callId, in long nodeId, out Value style);
        [handler=DOM] void getStyleSheet(in long callId, in long styleSheetId, out Object styleSheet);
        [handler=DOM] void getRuleRanges(in long callId, in long styleSheetId, out Value ranges);
        [handler=DOM] void applyStyleText(in long callId, in long styleId, in String styleText, in String propertyName, out boolean success, out Value style, out Array changedProperties);
        [handler=DOM] void setStyleText(in long callId, in long styleId, in String styleText, out boolean success);
        [handler=DOM] void setStyleProperty(in long callId, in long styleId, in String name, in String value, out boolean success);
        [handler=DOM] void toggleStyleEnabled(in long callId, in long styleId, in String propertyName, in boolean disabled, out Value style);
        [handler=DOM] void setRuleSelector(in long callId, in long ruleId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);
        [handler=DOM] void addRule(in long callId, in String selector, in long selectedNodeId, out Value rule, out boolean selectorAffectsNode);

        [handler=Controller] void getCookies(in long callId, 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(in long callId, 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 callId, in long databaseId, out Array tableNames);
        [handler=Backend] void executeSQL(in long callId, 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 callId, in long storageId, out Array entries);
        [handler=Controller] void setDOMStorageItem(in long callId, in long storageId, in String key, in String value, out boolean success);
        [handler=Controller] void removeDOMStorageItem(in long callId, in long storageId, in String key, out boolean success);
#endif

    };
}