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.
7 "namespace": "devtools.panels",
8 "description": "Use the <code>chrome.devtools.panels</code> API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars.",
12 "id": "ElementsPanel",
14 "description": "Represents the Elements panel.",
17 "name": "onSelectionChanged",
18 "description": "Fired when an object is selected in the panel."
23 "name": "createSidebarPane",
25 "description": "Creates a pane within panel's sidebar.",
30 "description": "Text that is displayed in sidebar caption."
35 "description": "A callback invoked when the sidebar is created.",
40 "description": "An ExtensionSidebarPane object for created sidebar pane.",
41 "$ref": "ExtensionSidebarPane"
52 "description": "Represents the Sources panel.",
55 "name": "onSelectionChanged",
56 "description": "Fired when an object is selected in the panel."
61 "name": "createSidebarPane",
63 "description": "Creates a pane within panel's sidebar.",
68 "description": "Text that is displayed in sidebar caption."
73 "description": "A callback invoked when the sidebar is created.",
78 "description": "An ExtensionSidebarPane object for created sidebar pane.",
79 "$ref": "ExtensionSidebarPane"
88 "id": "ExtensionPanel",
90 "description": "Represents a panel created by extension.",
93 "name": "createStatusBarButton",
94 "description": "Appends a button to the status bar of the panel.",
99 "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 when the button is inactive; the right icon is displayed when the button is pressed."
102 "name": "tooltipText",
104 "description": "Text shown as a tooltip when user hovers the mouse over the button."
109 "description": "Whether the button is disabled."
112 "returns": { "$ref": "Button" }
118 "description": "Fired upon a search action (start of a new search, search result navigation, or search being canceled).",
123 "description": "Type of search action being performed."
126 "name": "queryString",
129 "description": "Query string (only for 'performSearch')."
136 "description": "Fired when the user switches to the panel.",
141 "isInstanceOf": "global",
142 "additionalProperties": { "type": "any" },
143 "description": "The JavaScript <code>window</code> object of panel's page."
150 "description": "Fired when the user switches away from the panel."
155 "id": "ExtensionSidebarPane",
157 "description": "A sidebar created by the extension.",
162 "description": "Sets the height of the sidebar.",
167 "description": "A CSS-like size specification, such as <code>'100px'</code> or <code>'12ex'</code>."
172 "name": "setExpression",
174 "description": "Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.",
177 "name": "expression",
179 "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."
185 "description": "An optional title for the root of the expression tree."
191 "description": "A callback invoked after the sidebar pane is updated with the expression evaluation results."
198 "description": "Sets a JSON-compliant object to be displayed in the sidebar pane.",
201 "name": "jsonObject",
203 "description": "An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client)."
209 "description": "An optional title for the root of the expression tree."
215 "description": "A callback invoked after the sidebar is updated with the object."
222 "description": "Sets an HTML page to be displayed in the sidebar pane.",
227 "description": "Relative path of an extension page to display within the sidebar."
236 "description": "Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it.",
241 "isInstanceOf": "global",
242 "additionalProperties": { "type": "any" },
243 "description": "The JavaScript <code>window</code> object of the sidebar page, if one was set with the <code>setPage()</code> method."
250 "description": "Fired when the sidebar pane becomes hidden as a result of the user switching away from the panel that hosts the sidebar pane."
257 "description": "A button created by the extension.",
261 "description": "Updates the attributes of the button. If some of the arguments are omitted or <code>null</code>, the corresponding attributes are not updated.",
267 "description": "Path to the new icon of the button."
270 "name": "tooltipText",
273 "description": "Text shown as a tooltip when user hovers the mouse over the button."
279 "description": "Whether the button is disabled."
288 "description": "Fired when the button is clicked."
295 "$ref": "ElementsPanel",
296 "description": "Elements panel."
299 "$ref": "SourcesPanel",
300 "description": "Sources panel."
307 "description": "Creates an extension panel.",
312 "description": "Title that is displayed next to the extension icon in the Developer Tools toolbar."
317 "description": "Path of the panel's icon relative to the extension directory."
322 "description": "Path of the panel's HTML page relative to the extension directory."
328 "description": "A function that is called when the panel is created.",
332 "description": "An ExtensionPanel object representing the created panel.",
333 "$ref": "ExtensionPanel"
340 "name": "setOpenResourceHandler",
342 "description": "Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.",
348 "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 invalid URL or an XHR, this function is not called.",
352 "$ref": "devtools.inspectedWindow.Resource",
353 "description": "A $(ref:devtools.inspectedWindow.Resource) object for the resource that was clicked."
360 "name": "openResource",
362 "description": "Requests DevTools to open a URL in a Developer Tools panel.",
367 "description": "The URL of the resource to open."
370 "name": "lineNumber",
372 "description": "Specifies the line number to scroll to when the resource is loaded."
378 "description": "A function that is called when the resource has been successfully loaded."