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

Side by Side 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, 4 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.inspectedWindow",
8 "nocompile": true,
9 "types": [
10 {
11 "id": "Resource",
12 "type": "object",
13 "description": "A resource within the inspected page, such as a document , a script, or an image.",
14 "properties": {
15 "url": {
16 "type": "string",
17 "description": "The URL of the resource."
18 }
19 },
20 "functions": [
21 {
22 "name": "getContent",
23 "type": "function",
24 "description": "Gets the content of the resource.",
25 "parameters": [
26 {
27 "name": "callback",
28 "type": "function",
29 "description": "A function that receives resource content when t he request completes.",
30 "parameters": [
31 {
32 "name": "content",
33 "type": "string",
34 "description": "Content of the resource (potentially encoded )."
35 },
36 {
37 "name": "encoding",
38 "type": "string",
39 "description": "Empty if content is not encoded, encoding na me otherwise. Currently, only base64 is supported."
40 }
41 ]
42 }
43 ]
44 },
45 {
46 "name": "setContent",
47 "type": "function",
48 "description": "Sets the content of the resource.",
49 "parameters": [
50 {
51 "name": "content",
52 "type": "string",
53 "description": "New content of the resource. Only resources with the text type are currently supported."
54 },
55 {
56 "name": "commit",
57 "type": "boolean",
58 "description": "True if the user has finished editing the resour ce, 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."
59 },
60 {
61 "name": "callback",
62 "type": "function",
63 "description": "A function called upon request completion.",
64 "optional": true,
65 "parameters": [
66 {
67 "name": "error",
68 "type": "object",
69 "additionalProperties": {"type": "any"},
70 "optional": true,
71 "description": "Set to undefined if the resource content was set successfully; describes error otherwise."
72 }
73 ]
74 }
75 ]
76 }
77 ]
78 }
79 ],
80 "properties": {
81 "tabId": {
82 "description": "The ID of the tab being inspected. This ID may be used w ith chrome.tabs.* API.",
83 "type": "integer"
84 }
85 },
86 "functions": [
87 {
88 "name": "eval",
89 "type": "function",
90 "description": "Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-complia nt object, otherwise an exception is thrown.",
91 "parameters": [
92 {
93 "name": "expression",
94 "type": "string",
95 "description": "An expression to evaluate."
96 },
97 {
98 "name": "callback",
99 "type": "function",
100 "description": "A function called when evaluation completes.",
101 "optional": true,
102 "parameters": [
103 {
104 "name": "result",
105 "type": "object",
106 "additionalProperties": {"type": "any"},
107 "description": "The result of evaluation."
108 },
109 {
110 "name": "isException",
111 "type": "boolean",
112 "description": "Set if an exception was caught while evaluating the expression."
113 }
114 ]
115 }
116 ]
117 },
118 {
119 "name": "reload",
120 "type": "function",
121 "description": "Reloads the inspected page.",
122 "parameters": [
123 {
124 "type": "object",
125 "name": "reloadOptions",
126 "optional": true,
127 "properties": {
128 "ignoreCache": {
129 "type": "boolean",
130 "optional": true,
131 "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 withi n the Developer Tools window."
132 },
133 "userAgent": {
134 "type": "string",
135 "optional": true,
136 "description": "If specified, the string will override the value of the <code>User-Agent</code> HTTP header that's sent while loading the resour ces 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 runn ing within the inspected page."
137 },
138 "injectedScript": {
139 "type": "string",
140 "optional": true,
141 "description": "If specified, the script will be injected into e very 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 ex ample, if the user presses Ctrl+R."
142 }
143 }
144 }
145 ]
146 },
147 {
148 "name": "getResources",
149 "type": "function",
150 "description": "Retrieves the list of resources from the inspected page. ",
151 "parameters": [
152 {
153 "name": "callback",
154 "type": "function",
155 "description": "A function that receives the list of resources when the request completes.",
156 "parameters": [
157 {
158 "name": "resources",
159 "type": "array",
160 "items": { "$ref": "Resource" },
161 "description": "The resources within the page."
162 }
163 ]
164 }
165 ]
166 }
167 ],
168 "events": [
169 {
170 "name": "onResourceAdded",
171 "description": "Fired when a new resource is added to the inspected page .",
172 "parameters": [
173 {
174 "name": "resource",
175 "$ref": "Resource"
176 }
177 ]
178 },
179 {
180 "name": "onResourceContentCommitted",
181 "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).",
182 "parameters": [
183 {
184 "name": "resource",
185 "$ref": "Resource"
186 },
187 {
188 "name": "content",
189 "type": "string",
190 "description": "New content of the resource."
191 }
192 ]
193 }
194 ]
195 }
196 ]
OLDNEW
« 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