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"
50 "id": "ExtensionPanel",
52 "description": "Represents a panel created by extension.",
55 "name": "createStatusBarButton",
56 "description": "Appends a button to the status bar of the panel.",
61 "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."
64 "name": "tooltipText",
66 "description": "Text shown as a tooltip when user hovers the mouse over the button."
71 "description": "Whether the button is disabled."
74 "returns": { "$ref": "Button" }
80 "description": "Fired upon a search action (start of a new search, search result navigation, or search being canceled).",
85 "description": "Type of search action being performed."
88 "name": "queryString",
91 "description": "Query string (only for 'performSearch')."
98 "description": "Fired when the user switches to the panel.",
103 "isInstanceOf": "global",
104 "additionalProperties": { "type": "any" },
105 "description": "The JavaScript <code>window</code> object of panel's page."
112 "description": "Fired when the user switches away from the panel."
117 "id": "ExtensionSidebarPane",
119 "description": "A sidebar created by the extension.",
124 "description": "Sets the height of the sidebar.",
129 "description": "A CSS-like size specification, such as <code>'100px'</code> or <code>'12ex'</code>."
134 "name": "setExpression",
136 "description": "Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.",
139 "name": "expression",
141 "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."
147 "description": "An optional title for the root of the expression tree."
153 "description": "A callback invoked after the sidebar pane is updated with the expression evaluation results."
160 "description": "Sets a JSON-compliant object to be displayed in the sidebar pane.",
163 "name": "jsonObject",
165 "description": "An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client)."
171 "description": "An optional title for the root of the expression tree."
177 "description": "A callback invoked after the sidebar is updated with the object."
184 "description": "Sets an HTML page to be displayed in the sidebar pane.",
189 "description": "Relative path of an extension page to display within the sidebar."
198 "description": "Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it.",
203 "isInstanceOf": "global",
204 "additionalProperties": { "type": "any" },
205 "description": "The JavaScript <code>window</code> object of the sidebar page, if one was set with the <code>setPage()</code> method."
212 "description": "Fired when the sidebar pane becomes hidden as a result of the user switching away from the panel that hosts the sidebar pane."
219 "description": "A button created by the extension.",
223 "description": "Updates the attributes of the button. If some of the arguments are omitted or <code>null</code>, the corresponding attributes are not updated.",
229 "description": "Path to the new icon of the button."
232 "name": "tooltipText",
235 "description": "Text shown as a tooltip when user hovers the mouse over the button."
241 "description": "Whether the button is disabled."
250 "description": "Fired when the button is clicked."
257 "$ref": "ElementsPanel",
258 "description": "Elements panel."
265 "description": "Creates an extension panel.",
270 "description": "Title that is displayed next to the extension icon in the Developer Tools toolbar."
275 "description": "Path of the panel's icon relative to the extension directory."
280 "description": "Path of the panel's HTML page relative to the extension directory."
286 "description": "A function that is called when the panel is created.",
290 "description": "An ExtensionPanel object representing the created panel.",
291 "$ref": "ExtensionPanel"
298 "name": "setOpenResourceHandler",
300 "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.",
306 "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.",
310 "$ref": "devtools.inspectedWindow.Resource",
311 "description": "A $(ref:devtools.inspectedWindow.Resource) object for the resource that was clicked."