Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: chrome/common/extensions/api/devtools/panels.json

Issue 10797039: Extensions Docs Server: devtools API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 [
6 {
7 "namespace": "devtools.panels",
8 "nocompile": true,
9 "types": [
10 {
11 "id": "ElementsPanel",
12 "type": "object",
13 "description": "Represents the Elements panel.",
14 "events": [
15 {
16 "name": "onSelectionChanged",
17 "description": "Fired when an object is selected in the panel."
18 }
19 ],
20 "functions": [
21 {
22 "name": "createSidebarPane",
23 "type": "function",
24 "description": "Creates a pane within panel's sidebar.",
25 "parameters": [
26 {
27 "name": "title",
28 "type": "string",
29 "description": "Text that is displayed in sidebar caption."
30 },
31 {
32 "name": "callback",
33 "type": "function",
34 "description": "A callback invoked when the sidebar is created." ,
35 "optional": true,
36 "parameters": [
37 {
38 "name": "result",
39 "description": "An ExtensionSidebarPane object for created s idebar pane.",
40 "$ref": "ExtensionSidebarPane"
41 }
42 ]
43 }
44 ]
45 }
46 ]
47 },
48 {
49 "id": "ExtensionPanel",
50 "type": "object",
51 "description": "Represents a panel created by extension.",
52 "functions": [
53 {
54 "name": "createStatusBarButton",
55 "description": "Appends a button to the status bar of the panel.",
56 "parameters": [
57 {
58 "name": "iconPath",
59 "type": "string",
60 "description": "Path to the icon of the button. The file should contain a 64x24-pixel image composed of two 32x24 icons. The left icon is used w hen the button is inactive; the right icon is displayed when the button is press ed."
61 },
62 {
63 "name": "tooltipText",
64 "type": "string",
65 "description": "Text shown as a tooltip when user hovers the mou se over the button."
66 },
67 {
68 "name": "disabled",
69 "type": "boolean",
70 "description": "Whether the button is disabled."
71 }
72 ],
73 "returns": { "$ref": "Button" }
74 }
75 ],
76 "events": [
77 {
78 "name": "onSearch",
79 "description": "Fired upon a search action (start of a new search, s earch result navigation, or search being canceled).",
80 "parameters": [
81 {
82 "name": "action",
83 "type": "string",
84 "description": "Type of search action being performed."
85 },
86 {
87 "name": "queryString",
88 "type": "string",
89 "optional": true,
90 "description": "Query string (only for 'performSearch')."
91 }
92 ]
93 },
94 {
95 "name": "onShown",
96 "type": "function",
97 "description": "Fired when the user switches to the panel.",
98 "parameters": [
99 {
100 "name": "window",
101 "type": "Window",
102 "description": "The <code>window</code> object of panel's page."
103 }
104 ]
105 },
106 {
107 "name": "onHidden",
108 "type": "function",
109 "description": "Fired when the user switches away from the panel."
110 }
111 ]
112 },
113 {
114 "id": "ExtensionSidebarPane",
115 "type": "object",
116 "description": "A sidebar created by the extension.",
117 "functions": [
118 {
119 "name": "setHeight",
120 "type": "function",
121 "description": "Sets the height of the sidebar.",
122 "parameters": [
123 {
124 "name": "height",
125 "type": "string",
126 "description": "A CSS-like size specification, such as <code>'10 0px'</code> or <code>'12ex'</code>."
127 }
128 ]
129 },
130 {
131 "name": "setExpression",
132 "type": "function",
133 "description": "Sets an expression that is evaluated within the insp ected page. The result is displayed in the sidebar pane.",
134 "parameters": [
135 {
136 "name": "expression",
137 "type": "string",
138 "description": "An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch."
139 },
140 {
141 "name": "rootTitle",
142 "type": "string",
143 "optional": true,
144 "description": "An optional title for the root of the expression tree."
145 },
146 {
147 "name": "callback",
148 "type": "function",
149 "optional": true,
150 "description": "A callback invoked after the sidebar pane is upd ated with the expression evaluation results."
151 }
152 ]
153 },
154 {
155 "name": "setObject",
156 "type": "function",
157 "description": "Sets a JSON-compliant object to be displayed in the sidebar pane.",
158 "parameters": [
159 {
160 "name": "jsonObject",
161 "type": "string",
162 "description": "An object to be displayed in context of the insp ected page. Evaluated in the context of the caller (API client)."
163 },
164 {
165 "name": "rootTitle",
166 "type": "string",
167 "optional": true,
168 "description": "An optional title for the root of the expression tree."
169 },
170 {
171 "name": "callback",
172 "type": "function",
173 "optional": true,
174 "description": "A callback invoked after the sidebar is updated with the object."
175 }
176 ]
177 },
178 {
179 "name": "setPage",
180 "type": "function",
181 "description": "Sets an HTML page to be displayed in the sidebar pan e.",
182 "parameters": [
183 {
184 "name": "path",
185 "type": "string",
186 "description": "Relative path of an extension page to display wi thin the sidebar."
187 }
188 ]
189 }
190 ],
191 "events": [
192 {
193 "name": "onShown",
194 "type": "function",
195 "description": "Fired when the sidebar pane becomes visible as a res ult of user switching to the panel that hosts it.",
196 "parameters": [
197 {
198 "name": "window",
199 "type": "Window",
200 "optional": true,
201 "description": "The <code>window</code> object of the sidebar pa ge, if one was set with the <code>setPage()</code> method."
202 }
203 ]
204 },
205 {
206 "name": "onHidden",
207 "type": "function",
208 "description": "Fired when the sidebar pane becomes hidden as a resu lt of the user switching away from the panel that hosts the sidebar pane."
209 }
210 ]
211 },
212 {
213 "id": "Button",
214 "type": "object",
215 "description": "A button created by the extension.",
216 "functions": [
217 {
218 "name": "update",
219 "description": "Updates the attributes of the button. If some of the arguments are omitted or <code>null</code>, the corresponding attributes are no t updated.",
220 "parameters": [
221 {
222 "name": "iconPath",
223 "type": "string",
224 "optional": true,
225 "description": "Path to the new icon of the button."
226 },
227 {
228 "name": "tooltipText",
229 "type": "string",
230 "optional": true,
231 "description": "Text shown as a tooltip when user hovers the mou se over the button."
232 },
233 {
234 "name": "disabled",
235 "type": "boolean",
236 "optional": true,
237 "description": "Whether the button is disabled."
238 }
239 ]
240 }
241 ],
242 "events": [
243 {
244 "name": "onClicked",
245 "type": "function",
246 "description": "Fired when the button is clicked."
247 }
248 ]
249 }
250 ],
251 "properties": {
252 "elements": {
253 "$ref": "ElementsPanel",
254 "description": "Elements panel."
255 }
256 },
257 "functions": [
258 {
259 "name": "create",
260 "type": "function",
261 "description": "Creates an extension panel.",
262 "parameters": [
263 {
264 "name": "title",
265 "type": "string",
266 "description": "Title that is displayed next to the extension icon i n the Developer Tools toolbar."
267 },
268 {
269 "name": "iconPath",
270 "type": "string",
271 "description": "Path of the panel's icon relative to the extension d irectory."
272 },
273 {
274 "name": "pagePath",
275 "type": "string",
276 "description": "Path of the panel's HTML page relative to the extens ion directory."
277 },
278 {
279 "name": "callback",
280 "type": "function",
281 "optional": true,
282 "description": "A function that is called when the panel is created. ",
283 "parameters": [
284 {
285 "name": "panel",
286 "description": "An ExtensionPanel object representing the create d panel.",
287 "$ref": "ExtensionPanel"
288 }
289 ]
290 }
291 ]
292 },
293 {
294 "name": "setOpenResourceHandler",
295 "type": "function",
296 "description": "Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either cal l the method with no parameters or pass null as the parameter.",
297 "parameters": [
298 {
299 "name": "callback",
300 "type": "function",
301 "optional": true,
302 "description": "A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an i nvalid URL or an XHR, this function is not called.",
303 "parameters": [
304 {
305 "name": "resource",
306 "$ref": "devtools.inspectedWindow.Resource",
307 "description": "A <a href=\"devtools.inspectedWindow.html#type-R esource\">Resource</a> object for the resource that was clicked."
308 }
309 ]
310 }
311 ]
312 }
313 ]
314 }
315 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698