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

Unified Diff: chrome/common/extensions/api/devtools/inspected_window.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
Index: chrome/common/extensions/api/devtools/inspected_window.json
diff --git a/chrome/common/extensions/api/devtools/inspected_window.json b/chrome/common/extensions/api/devtools/inspected_window.json
new file mode 100644
index 0000000000000000000000000000000000000000..48346f84e3f46584ed95ef056bdcf5945dc88a2f
--- /dev/null
+++ b/chrome/common/extensions/api/devtools/inspected_window.json
@@ -0,0 +1,196 @@
+// 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",
+ "additionalProperties": {"type": "any"},
+ "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",
+ "additionalProperties": {"type": "any"},
+ "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."
+ }
+ ]
+ }
+ ]
+ }
+]
« no previous file with comments | « chrome/common/extensions/api/devtools/experimental_console.json ('k') | chrome/common/extensions/api/devtools/network.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698