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

Side by Side Diff: extensions/common/api/web_view_internal.json

Issue 541753004: Split web_view_internal_api and move part of it to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 6 years, 3 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
« no previous file with comments | « extensions/common/api/schemas.gypi ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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": "webViewInternal",
8 "description": "none",
9 "compiler_options": {
10 "implemented_in": "extensions/browser/api/web_view/web_view_internal_api.h "
11 },
12 "functions": [
13 {
14 "name": "executeScript",
15 "type": "function",
16 "description": "Injects JavaScript code into a <webview> page.",
17 "parameters": [
18 {
19 "type": "integer",
20 "name": "instanceId",
21 "description": "The instance ID of the guest <webview> process."
22 },
23 {
24 "type": "string",
25 "name": "src",
26 "description": "The src of the guest <webview> tag."
27 },
28 {
29 "$ref": "extensionTypes.InjectDetails",
30 "name": "details",
31 "description": "Details of the script to run."
32 },
33 {
34 "type": "function",
35 "name": "callback",
36 "optional": true,
37 "description": "Called after all the JavaScript has been executed.",
38 "parameters": [
39 {
40 "name": "result",
41 "optional": true,
42 "type": "array",
43 "items": {"type": "any", "minimum": 0},
44 "description": "The result of the script in every injected frame ."
45 }
46 ]
47 }
48 ]
49 },
50 {
51 "name": "insertCSS",
52 "type": "function",
53 "description": "Injects CSS into a <webview> page. For details, see the <a href='/extensions/content_scripts#pi'>programmatic injection</a> section of t he content scripts doc.",
54 "parameters": [
55 {
56 "type": "integer",
57 "name": "instanceId",
58 "description": "The instance ID of the guest <webview> process."
59 },
60 {
61 "type": "string",
62 "name": "src",
63 "description": "The src of the guest <webview> tag."
64 },
65 {
66 "$ref": "extensionTypes.InjectDetails",
67 "name": "details",
68 "description": "Details of the CSS text to insert."
69 },
70 {
71 "type": "function",
72 "name": "callback",
73 "optional": true,
74 "description": "Called when all the CSS has been inserted.",
75 "parameters": []
76 }
77 ]
78 },
79 {
80 "name": "captureVisibleRegion",
81 "type": "function",
82 "description": "Captures the visible area of the currently loaded page i nside <webview>.",
83 "parameters": [
84 {
85 "type": "integer",
86 "name": "instanceId",
87 "description": "The instance ID of the guest <webview> process."
88 },
89 {
90 "$ref": "extensionTypes.ImageDetails",
91 "name": "options",
92 "optional": true
93 },
94 {
95 "type": "function", "name": "callback", "parameters": [
96 {"type": "string", "name": "dataUrl", "description": "A data URL w hich encodes an image of the visible area of the captured tab. May be assigned t o the 'src' property of an HTML Image element for display."}
97 ]
98 }
99 ]
100 },
101 {
102 "name": "setZoom",
103 "type": "function",
104 "parameters": [
105 {
106 "type": "integer",
107 "name": "instanceId",
108 "description": "The instance ID of the guest <webview> process."
109 },
110 {
111 "type": "number",
112 "name": "zoomFactor",
113 "description" : "The new zoom factor."
114 },
115 {
116 "type": "function",
117 "name": "callback",
118 "description": "Called after the zoom message has been sent to the g uest process.",
119 "optional": true,
120 "parameters": []
121 }
122 ]
123 },
124 {
125 "name": "getZoom",
126 "type": "function",
127 "parameters": [
128 {
129 "type": "integer",
130 "name": "instanceId",
131 "description": "The instance ID of the guest <webview> process."
132 },
133 {
134 "type": "function",
135 "name": "callback",
136 "description": "Called after the current zoom factor is retreived.",
137 "parameters": [
138 {
139 "type": "number",
140 "name": "zoomFactor",
141 "description": "The current zoom factor."
142 }
143 ]
144 }
145 ]
146 },
147 {
148 "name": "find",
149 "type": "function",
150 "description": "Initiates a find-in-page request.",
151 "parameters": [
152 {
153 "type": "integer",
154 "name": "instanceId",
155 "description": "The instance ID of the guest <webview> process."
156 },
157 {
158 "type": "string",
159 "name": "searchText",
160 "description": "The string to find in the page."
161 },
162 {
163 "type": "object",
164 "name": "options",
165 "optional": true,
166 "properties": {
167 "backward": {
168 "type": "boolean",
169 "description": "Flag to find matches in reverse order.",
170 "optional": true
171 },
172 "matchCase": {
173 "type": "boolean",
174 "description": "Flag to match |searchText| with case-sensitivity .",
175 "optional": true
176 }
177 }
178 },
179 {
180 "type": "function",
181 "name": "callback",
182 "description": "Called after all find results have been returned for this find request.",
183 "optional": true,
184 "parameters": [
185 {
186 "type": "object",
187 "name": "results",
188 "optional": true,
189 "properties": {
190 "numberOfMatches": {
191 "type": "integer",
192 "description": "The number of times |searchText| was matched on the page."
193 },
194 "activeMatchOrdinal": {
195 "type": "integer",
196 "description": "The ordinal number of the current match."
197 },
198 "selectionRect": {
199 "type": "object",
200 "description": "Describes a rectangle around the active matc h.",
201 "properties": {
202 "left": {
203 "type": "integer"
204 },
205 "top": {
206 "type": "integer"
207 },
208 "width": {
209 "type": "integer"
210 },
211 "height": {
212 "type": "integer"
213 }
214 }
215 },
216 "canceled": {
217 "type": "boolean",
218 "description": "Indicates whether this find request was canc eled."
219 }
220 }
221 }
222 ]
223 }
224 ]
225 },
226 {
227 "name": "stopFinding",
228 "type": "function",
229 "description": "Ends the current find session (clearing all highlighting ) and cancels all find requests in progress.",
230 "parameters": [
231 {
232 "type": "integer",
233 "name": "instanceId",
234 "description": "The instance ID of the guest <webview> process."
235 },
236 {
237 "type": "string",
238 "name": "action",
239 "description": "Determines what to do with the active match after th e find session has ended. 'clear' will clear the highlighting over the active ma tch; 'keep' will keep the active match highlighted; 'activate' will keep the act ive match highlighted and simulate a user click on that match.",
240 "optional": true,
241 "enum": ["clear", "keep", "activate"]
242 }
243 ]
244 },
245 {
246 "name": "go",
247 "type": "function",
248 "parameters": [
249 {
250 "type": "integer",
251 "name": "instanceId"
252 },
253 {
254 "type": "integer",
255 "name": "relativeIndex"
256 }
257 ]
258 },
259 {
260 "name": "overrideUserAgent",
261 "type": "function",
262 "parameters": [
263 {
264 "type": "integer",
265 "name": "instanceId"
266 },
267 {
268 "type": "string",
269 "name": "userAgentOverride"
270 }
271 ]
272 },
273 {
274 "name": "reload",
275 "type": "function",
276 "parameters": [
277 {
278 "type": "integer",
279 "name": "instanceId"
280 }
281 ]
282 },
283 {
284 "name": "setName",
285 "type": "function",
286 "parameters": [
287 {
288 "type": "integer",
289 "name": "instanceId"
290 },
291 {
292 "type": "string",
293 "name": "frameName"
294 }
295 ]
296 },
297 {
298 "name": "setPermission",
299 "type": "function",
300 "parameters": [
301 {
302 "type": "integer",
303 "name": "instanceId"
304 },
305 {
306 "type": "integer",
307 "name": "requestId"
308 },
309 {
310 "type": "string",
311 "name": "action",
312 "enum": ["allow", "deny", "default"]
313 },
314 {
315 "type": "string",
316 "name": "userInput",
317 "optional": true
318 },
319 {
320 "type": "function",
321 "name": "callback",
322 "optional": true,
323 "parameters": [
324 {
325 "name": "allowed",
326 "type": "boolean"
327 }
328 ]
329 }
330 ]
331 },
332 {
333 "name": "navigate",
334 "type": "function",
335 "parameters": [
336 {
337 "type": "integer",
338 "name": "instanceId"
339 },
340 {
341 "type": "string",
342 "name": "src"
343 }
344 ]
345 },
346 {
347 "name": "stop",
348 "type": "function",
349 "parameters": [
350 {
351 "type": "integer",
352 "name": "instanceId"
353 }
354 ]
355 },
356 {
357 "name": "terminate",
358 "type": "function",
359 "parameters": [
360 {
361 "type": "integer",
362 "name": "instanceId"
363 }
364 ]
365 }
366 ]
367 }
368 ]
OLDNEW
« no previous file with comments | « extensions/common/api/schemas.gypi ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698