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

Unified Diff: chrome/common/extensions/api/devtools_api.json

Issue 10797039: Extensions Docs Server: devtools API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move parsing logic into utils 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/devtools/panels.json ('k') | chrome/common/extensions/docs/build/build.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/devtools_api.json
diff --git a/chrome/common/extensions/api/devtools_api.json b/chrome/common/extensions/api/devtools_api.json
deleted file mode 100644
index f10e0c813fd76bd036846912792322c0ba70eff2..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/api/devtools_api.json
+++ /dev/null
@@ -1,859 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "devtools.inspectedWindow",
- "nocompile": true,
- "types": [
- {
- "id": "Resource",
- "type": "object",
- "description": "A resource within the inspected page, such as a document, a script, or an image.",
- "properties": {
- "url": {
- "type": "string",
- "description": "The URL of the resource."
- }
- },
- "functions": [
- {
- "name": "getContent",
- "type": "function",
- "description": "Gets the content of the resource.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "description": "A function that receives resource content when the request completes.",
- "parameters": [
- {
- "name": "content",
- "type": "string",
- "description": "Content of the resource (potentially encoded)."
- },
- {
- "name": "encoding",
- "type": "string",
- "description": "Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported."
- }
- ]
- }
- ]
- },
- {
- "name": "setContent",
- "type": "function",
- "description": "Sets the content of the resource.",
- "parameters": [
- {
- "name": "content",
- "type": "string",
- "description": "New content of the resource. Only resources with the text type are currently supported."
- },
- {
- "name": "commit",
- "type": "boolean",
- "description": "True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource."
- },
- {
- "name": "callback",
- "type": "function",
- "description": "A function called upon request completion.",
- "optional": true,
- "parameters": [
- {
- "name": "error",
- "type": "object",
- "optional": true,
- "description": "Set to undefined if the resource content was set successfully; describes error otherwise."
- }
- ]
- }
- ]
- }
- ]
- }
- ],
- "properties": {
- "tabId": {
- "description": "The ID of the tab being inspected. This ID may be used with chrome.tabs.* API.",
- "type": "integer"
- }
- },
- "functions": [
- {
- "name": "eval",
- "type": "function",
- "description": "Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown.",
- "parameters": [
- {
- "name": "expression",
- "type": "string",
- "description": "An expression to evaluate."
- },
- {
- "name": "callback",
- "type": "function",
- "description": "A function called when evaluation completes.",
- "optional": true,
- "parameters": [
- {
- "name": "result",
- "type": "object",
- "description": "The result of evaluation."
- },
- {
- "name": "isException",
- "type": "boolean",
- "description": "Set if an exception was caught while evaluating the expression."
- }
- ]
- }
- ]
- },
- {
- "name": "reload",
- "type": "function",
- "description": "Reloads the inspected page.",
- "parameters": [
- {
- "type": "object",
- "name": "reloadOptions",
- "optional": true,
- "properties": {
- "ignoreCache": {
- "type": "boolean",
- "optional": true,
- "description": "When true, the loader will ignore the cache for all inspected page resources loaded before the <code>load</code> event is fired. The effect is similar to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools window."
- },
- "userAgent": {
- "type": "string",
- "optional": true,
- "description": "If specified, the string will override the value of the <code>User-Agent</code> HTTP header that's sent while loading the resources of the inspected page. The string will also override the value of the <code>navigator.userAgent</code> property that's returned to any scripts that are running within the inspected page."
- },
- "injectedScript": {
- "type": "string",
- "optional": true,
- "description": "If specified, the script will be injected into every frame of the inspected page immediately upon load, before any of the frame's scripts. The script will not be injected after subsequent reloads&mdash;for example, if the user presses Ctrl+R."
- }
- }
- }
- ]
- },
- {
- "name": "getResources",
- "type": "function",
- "description": "Retrieves the list of resources from the inspected page.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "description": "A function that receives the list of resources when the request completes.",
- "parameters": [
- {
- "name": "resources",
- "type": "array",
- "items": { "$ref": "Resource" },
- "description": "The resources within the page."
- }
- ]
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onResourceAdded",
- "description": "Fired when a new resource is added to the inspected page.",
- "parameters": [
- {
- "name": "resource",
- "$ref": "Resource"
- }
- ]
- },
- {
- "name": "onResourceContentCommitted",
- "description": "Fired when a new revision of the resource is committed (e.g. user saves an edited version of the resource in the Developer Tools).",
- "parameters": [
- {
- "name": "resource",
- "$ref": "Resource"
- },
- {
- "name": "content",
- "type": "string",
- "description": "New content of the resource."
- }
- ]
- }
- ]
- },
- {
- "namespace": "devtools.panels",
- "nocompile": true,
- "types": [
- {
- "id": "ElementsPanel",
- "type": "object",
- "description": "Represents the Elements panel.",
- "events": [
- {
- "name": "onSelectionChanged",
- "description": "Fired when an object is selected in the panel."
- }
- ],
- "functions": [
- {
- "name": "createSidebarPane",
- "type": "function",
- "description": "Creates a pane within panel's sidebar.",
- "parameters": [
- {
- "name": "title",
- "type": "string",
- "description": "Text that is displayed in sidebar caption."
- },
- {
- "name": "callback",
- "type": "function",
- "description": "A callback invoked when the sidebar is created.",
- "optional": true,
- "parameters": [
- {
- "name": "result",
- "description": "An ExtensionSidebarPane object for created sidebar pane.",
- "$ref": "ExtensionSidebarPane"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "id": "ExtensionPanel",
- "type": "object",
- "description": "Represents a panel created by extension.",
- "functions": [
- {
- "name": "createStatusBarButton",
- "description": "Appends a button to the status bar of the panel.",
- "parameters": [
- {
- "name": "iconPath",
- "type": "string",
- "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."
- },
- {
- "name": "tooltipText",
- "type": "string",
- "description": "Text shown as a tooltip when user hovers the mouse over the button."
- },
- {
- "name": "disabled",
- "type": "boolean",
- "description": "Whether the button is disabled."
- }
- ],
- "returns": { "$ref": "Button" }
- }
- ],
- "events": [
- {
- "name": "onSearch",
- "description": "Fired upon a search action (start of a new search, search result navigation, or search being canceled).",
- "parameters": [
- {
- "name": "action",
- "type": "string",
- "description": "Type of search action being performed."
- },
- {
- "name": "queryString",
- "type": "string",
- "optional": true,
- "description": "Query string (only for 'performSearch')."
- }
- ]
- },
- {
- "name": "onShown",
- "type": "function",
- "description": "Fired when the user switches to the panel.",
- "parameters": [
- {
- "name": "window",
- "type": "Window",
- "description": "The <code>window</code> object of panel's page."
- }
- ]
- },
- {
- "name": "onHidden",
- "type": "function",
- "description": "Fired when the user switches away from the panel."
- }
- ]
- },
- {
- "id": "ExtensionSidebarPane",
- "type": "object",
- "description": "A sidebar created by the extension.",
- "functions": [
- {
- "name": "setHeight",
- "type": "function",
- "description": "Sets the height of the sidebar.",
- "parameters": [
- {
- "name": "height",
- "type": "string",
- "description": "A CSS-like size specification, such as <code>'100px'</code> or <code>'12ex'</code>."
- }
- ]
- },
- {
- "name": "setExpression",
- "type": "function",
- "description": "Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.",
- "parameters": [
- {
- "name": "expression",
- "type": "string",
- "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."
- },
- {
- "name": "rootTitle",
- "type": "string",
- "optional": true,
- "description": "An optional title for the root of the expression tree."
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "description": "A callback invoked after the sidebar pane is updated with the expression evaluation results."
- }
- ]
- },
- {
- "name": "setObject",
- "type": "function",
- "description": "Sets a JSON-compliant object to be displayed in the sidebar pane.",
- "parameters": [
- {
- "name": "jsonObject",
- "type": "string",
- "description": "An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client)."
- },
- {
- "name": "rootTitle",
- "type": "string",
- "optional": true,
- "description": "An optional title for the root of the expression tree."
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "description": "A callback invoked after the sidebar is updated with the object."
- }
- ]
- },
- {
- "name": "setPage",
- "type": "function",
- "description": "Sets an HTML page to be displayed in the sidebar pane.",
- "parameters": [
- {
- "name": "path",
- "type": "string",
- "description": "Relative path of an extension page to display within the sidebar."
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onShown",
- "type": "function",
- "description": "Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it.",
- "parameters": [
- {
- "name": "window",
- "type": "Window",
- "optional": true,
- "description": "The <code>window</code> object of the sidebar page, if one was set with the <code>setPage()</code> method."
- }
- ]
- },
- {
- "name": "onHidden",
- "type": "function",
- "description": "Fired when the sidebar pane becomes hidden as a result of the user switching away from the panel that hosts the sidebar pane."
- }
- ]
- },
- {
- "id": "Button",
- "type": "object",
- "description": "A button created by the extension.",
- "functions": [
- {
- "name": "update",
- "description": "Updates the attributes of the button. If some of the arguments are omitted or <code>null</code>, the corresponding attributes are not updated.",
- "parameters": [
- {
- "name": "iconPath",
- "type": "string",
- "optional": true,
- "description": "Path to the new icon of the button."
- },
- {
- "name": "tooltipText",
- "type": "string",
- "optional": true,
- "description": "Text shown as a tooltip when user hovers the mouse over the button."
- },
- {
- "name": "disabled",
- "type": "boolean",
- "optional": true,
- "description": "Whether the button is disabled."
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onClicked",
- "type": "function",
- "description": "Fired when the button is clicked."
- }
- ]
- }
- ],
- "properties": {
- "elements": {
- "$ref": "ElementsPanel",
- "description": "Elements panel."
- }
- },
- "functions": [
- {
- "name": "create",
- "type": "function",
- "description": "Creates an extension panel.",
- "parameters": [
- {
- "name": "title",
- "type": "string",
- "description": "Title that is displayed next to the extension icon in the Developer Tools toolbar."
- },
- {
- "name": "iconPath",
- "type": "string",
- "description": "Path of the panel's icon relative to the extension directory."
- },
- {
- "name": "pagePath",
- "type": "string",
- "description": "Path of the panel's HTML page relative to the extension directory."
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "description": "A function that is called when the panel is created.",
- "parameters": [
- {
- "name": "panel",
- "description": "An ExtensionPanel object representing the created panel.",
- "$ref": "ExtensionPanel"
- }
- ]
- }
- ]
- },
- {
- "name": "setOpenResourceHandler",
- "type": "function",
- "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.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "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.",
- "parameters": [
- {
- "name": "devtools.inspectedWindow.Resource",
- "type": "object",
- "description": "A <a href=\"devtools.inspectedWindow.html#type-Resource\">Resource</a> object for the resource that was clicked."
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "namespace": "devtools.network",
- "nocompile": true,
- "types": [
- {
- "id": "Request",
- "type": "object",
- "description": "Represents a network request for a document resource (script, image and so on). See HAR Specification for reference.",
- "functions": [
- {
- "name": "getContent",
- "type": "function",
- "description": "Returns content of the response body.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "description": "A function that receives the response body when the request completes.",
- "parameters": [
- {
- "name": "content",
- "type": "string",
- "description": "Content of the response body (potentially encoded)."
- },
- {
- "name": "encoding",
- "type": "string",
- "description": "Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported."
- }
- ]
- }
- ]
- }
- ]
- }
- ],
- "functions": [
- {
- "name": "getHAR",
- "type": "function",
- "description": "Returns HAR log that contains all known network requests.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "description": "A function that receives the HAR log when the request completes.",
- "parameters": [
- {
- "name": "harLog",
- "type": "object",
- "description": "A HAR log. See HAR specification for details."
- }
- ]
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onRequestFinished",
- "type": "function",
- "description": "Fired when a network request is finished and all request data are available.",
- "parameters": [
- { "name": "request", "$ref": "Request", "description": "Description of a network request in the form of a HAR entry. See HAR specification for details." }
- ]
- },
- {
- "name": "onNavigated",
- "type": "function",
- "description": "Fired when the inspected window navigates to a new page.",
- "parameters": [
- {
- "name": "url",
- "type": "string",
- "description": "URL of the new page."
- }
- ]
- }
- ]
- },
- {
- "namespace": "experimental.devtools.console",
- "nocompile": true,
- "functions": [
- {
- "name": "addMessage",
- "type": "function",
- "description": "Adds a message to the console.",
- "parameters": [
- { "name": "severity", "$ref": "Severity", "description": "The severity of the message." },
- { "name": "text", "type": "string", "description": "The text of the message." }
- ]
- },
- {
- "name": "getMessages",
- "type": "function",
- "description": "Retrieves console messages.",
- "parameters": [
- {
- "name": "callback",
- "type": "function",
- "description": "A function that receives console messages when the request completes.",
- "parameters": [
- {
- "name": "messages",
- "type": "array",
- "items": { "$ref": "ConsoleMessage" },
- "description": "Console messages."
- }
- ]
- }
- ]
- }
- ],
- "types": [
- {
- "id": "ConsoleMessage",
- "type": "object",
- "description": "A console message.",
- "properties": {
- "severity": {
- "$ref": "Severity",
- "description": "Message severity."
- },
- "text": {
- "type": "string",
- "description": "The text of the console message, as represented by the first argument to the console.log() or a similar method (no parameter substitution performed)."
- },
- "url": {
- "type": "string",
- "optional": true,
- "description": "The URL of the script that originated the message, if available."
- },
- "line": {
- "type": "number",
- "optional": true,
- "description": "The number of the line where the message originated, if available."
- }
- }
- },
- {
- "id": "Severity",
- "type": "object",
- "properties": {
- "Tip": {
- "type": "string"
- },
- "Debug": {
- "type": "string"
- },
- "Log": {
- "type": "string"
- },
- "Warning": {
- "type": "string"
- },
- "Error": {
- "type": "string"
- }
- }
- }
- ],
- "events": [
- {
- "name": "onMessageAdded",
- "type": "function",
- "description": "Fired when a new message is added to the console.",
- "parameters": [
- { "name": "message", "$ref": "ConsoleMessage" }
- ]
- }
- ]
- },
- {
- "namespace": "experimental.devtools.audits",
- "nocompile": true,
- "functions": [
- {
- "name": "addCategory",
- "type": "function",
- "description": "Adds an audit category.",
- "parameters": [
- { "name": "displayName", "type": "string", "description": "A display name for the category." },
- { "name": "resultCount", "type": "number", "description": "The expected number of audit results in the category." }
- ],
- "returns": {
- "$ref": "AuditCategory"
- }
- }
- ],
- "types": [
- {
- "id": "AuditCategory",
- "type": "object",
- "description": "A group of logically related audit checks.",
- "events": [
- {
- "name": "onAuditStarted",
- "type": "function",
- "description": "If the category is enabled, this event is fired when the audit is started. The event handler is expected to initiate execution of the audit logic that will populate the <code>results</code> collection.",
- "parameters": [
- { "name": "results", "$ref": "AuditResults" }
- ]
- }
- ]
- },
- {
- "id": "FormattedValue",
- "type": "object",
- "description": "A value returned from one of the formatters (a URL, code snippet etc), to be passed to <code>createResult()</code> or <code>addChild()</code>. See <a href=\"#method-AuditResults-createSnippet\"><code>createSnippet()</code></a> and <a href=\"#method-AuditResults-createURL\"><code>createURL()</code></a>."
- },
- {
- "id": "AuditResults",
- "type": "object",
- "description": "A collection of audit results for the current run of the audit category.",
- "functions": [
- {
- "name": "addResult",
- "type": "function",
- "description": "Adds an audit result. The results are rendered as bulleted items under the audit category assoicated with the <code>AuditResults</code> object.",
- "parameters": [
- {
- "name": "displayName",
- "type": "string",
- "description": "A concise, high-level description of the result."
- },
- {
- "name": "description",
- "type": "string",
- "description": "A detailed description of what the displayName means."
- },
- {
- "name": "severity",
- "$ref": "AuditResultSeverity"
- },
- {
- "name": "details",
- "$ref": "AuditResultNode",
- "optional": true,
- "description": "A subtree that appears under the added result that may provide additional details on the violations found."
- }
- ]
- },
- {
- "name": "createResult",
- "type": "function",
- "description": "Creates a result node that may be used as the <code>details</code> parameters to the <code>addResult()</code> method.",
- "parameters": [
- {
- "name": "content ...",
- "choices": [
- { "type": "string" },
- { "$ref": "FormattedValue" }
- ],
- "description": "Either string or formatted values returned by one of the AuditResult formatters (a URL, a snippet etc). If multiple arguments are passed, these will be concatenated into a single node."
- }
- ],
- "returns": {
- "$ref": "AuditResultNode"
- }
- },
- {
- "name": "done",
- "type": "function",
- "description": "Signals the DevTools Audits panel that the run of this category is over. The audit run also completes automatically when the number of added top-level results is equal to that declared when AuditCategory was created."
- },
- {
- "name": "createURL",
- "type": "function",
- "description": "Render passed value as a URL in the Audits panel.",
- "parameters": [
- { "name": "href", "type": "string", "description": "A URL that appears as the href value on the resulting link." },
- { "name": "displayText", "type": "string", "description": "Text that appears to the user.", "optional": true }
- ],
- "returns": { "$ref": "FormattedValue" }
- },
- {
- "name": "createSnippet",
- "type": "function",
- "description": "Render passed text as a code snippet in the Audits panel.",
- "parameters": [
- { "name": "text", "type": "string", "description": "Snippet text." }
- ],
- "returns": { "$ref": "FormattedValue" }
- }
- ],
- "properties": {
- "Severity": {
- "$ref": "AuditResultSeverity",
- "description": "A class that contains possible values for the audit result severities."
- },
- "text": {
- "type": "string",
- "description": "The contents of the node."
- },
- "children": {
- "optional": true,
- "type": "array",
- "items": { "$ref": "AuditResultNode" },
- "description": "Children of this node."
- },
- "expanded": {
- "optional": "true",
- "type": "boolean",
- "description": "Whether the node is expanded by default."
- }
- }
- },
- {
- "id": "AuditResultNode",
- "type": "object",
- "description": "A node in the audit result tree. Displays content and may optionally have children nodes.",
- "functions": [
- {
- "name": "addChild",
- "description": "Adds a child node to this node.",
- "parameters": [
- {
- "name": "content ...",
- "choices": [
- { "type": "string" },
- { "$ref": "FormattedValue" }
- ],
- "description": "Either string or formatted values returned by one of the AuditResult formatters (URL, snippet etc). If multiple arguments are passed, these will be concatenated into a single node."
- }
- ],
- "returns": {
- "$ref": "AuditResultNode"
- }
- }
- ],
- "properties": {
- "expanded": {
- "type": "boolean",
- "description": "If set, the subtree will always be expanded."
- }
- }
- },
- {
- "id": "AuditResultSeverity",
- "type": "object",
- "description": "This type contains possible values for a result severity. The results of different severities are distinguished by colored bullets near the result's display name.",
- "properties": {
- "Info": {
- "type": "string"
- },
- "Warning": {
- "type": "string"
- },
- "Severe": {
- "type": "string"
- }
- }
- }
- ]
- }
-]
« no previous file with comments | « chrome/common/extensions/api/devtools/panels.json ('k') | chrome/common/extensions/docs/build/build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698