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

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 165323: Add chrome.extension to extension_api.json and docs (Closed)
Patch Set: precommit Created 11 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
« no previous file with comments | « chrome/common/common_resources.grd ('k') | chrome/common/extensions/docs/api_index.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension",
4 "types": [
5 {
6 "id": "Port",
7 "type": "object",
8 "properties": {
9 "name": {"type": "string"},
10 "onDisconnect": {"type": "object"},
11 "onMessage": {"type": "object"},
12 "postMessage": {"type": "function"}
13 }
14 }
15 ],
16 "functions": [
17 {
18 "name": "connect",
19 "type": "function",
20 "description": "Attempts to connect to other listeners within the extens ion (listeners may be toolstrips or the extension's background page). This is pr imarily useful for content scripts connecting to their extension processes. Exte nsions may connect to content scripts embedded in tabs via <a href='broken'><var >chrome.tabs.connectToTab</var></a>.",
21 "parameters": [
22 {
23 "name": "name",
24 "type": "string",
25 "description": "Will be passed into onConnect for extension processe s that are listening for the connection event.",
26 "optional": true
27 }
28 ],
29 "returns": {
30 "$ref": "Port",
31 "description": "Port through which messages can be sent and received w ith the extension."
32 }
33 }
34 ],
35 "events": [
36 {
37 "name": "onConnect",
38 "type": "function",
39 "description": "Fired when a connection is made from either an extension process or a content script.",
40 "parameters": [
41 {"$ref": "Port", "name": "port"}
42 ]
43 }
44 ]
45 },
46 {
3 "namespace": "self", 47 "namespace": "self",
4 "types": [ 48 "types": [
5 ], 49 ],
6 "functions": [ 50 "functions": [
7 { 51 {
8 "name": "getViews", 52 "name": "getViews",
9 "type": "function", 53 "type": "function",
10 "description": "Returns an array of the global JavaScript objects for ea ch of the views running inside the current extension. This includes toolstrips, background pages, and tabs.", 54 "description": "Returns an array of the global JavaScript objects for ea ch of the views running inside the current extension. This includes toolstrips, background pages, and tabs.",
11 "parameters": [], 55 "parameters": [],
12 "returns": { 56 "returns": {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 "type": "object", 248 "type": "object",
205 "properties": { 249 "properties": {
206 "id": {"type": "integer", "minimum": 0}, 250 "id": {"type": "integer", "minimum": 0},
207 "index": {"type": "integer", "minimum": 0}, 251 "index": {"type": "integer", "minimum": 0},
208 "windowId": {"type": "integer", "minimum": 0}, 252 "windowId": {"type": "integer", "minimum": 0},
209 "selected": {"type": "boolean"}, 253 "selected": {"type": "boolean"},
210 "url": {"type": "string"}, 254 "url": {"type": "string"},
211 "title": {"type": "string", "optional": true}, 255 "title": {"type": "string", "optional": true},
212 "favIconUrl": {"type": "string", "optional": true} 256 "favIconUrl": {"type": "string", "optional": true}
213 } 257 }
214 },
215 {
216 "id": "Port",
217 "type": "object",
218 "properties": {
219 "name": {"type": "string"},
220 "onDisconnect": {"type": "object"},
221 "onMessage": {"type": "object"}
222 }
223 } 258 }
224 ], 259 ],
225 "functions": [ 260 "functions": [
226 { 261 {
227 "name": "get", 262 "name": "get",
228 "type": "function", 263 "type": "function",
229 "description": "", 264 "description": "",
230 "parameters": [ 265 "parameters": [
231 {"type": "integer", "name": "tabId", "minimum": 0}, 266 {"type": "integer", "name": "tabId", "minimum": 0},
232 { 267 {
(...skipping 18 matching lines...) Expand all
251 "$ref": "Port" 286 "$ref": "Port"
252 } 287 }
253 }, 288 },
254 { 289 {
255 "name": "getSelected", 290 "name": "getSelected",
256 "type": "function", 291 "type": "function",
257 "description": "", 292 "description": "",
258 "parameters": [ 293 "parameters": [
259 {"type": "integer", "name": "windowId", "minimum": 0, "optional": true }, 294 {"type": "integer", "name": "windowId", "minimum": 0, "optional": true },
260 { 295 {
261 "type": "function", 296 "type": "function",
262 "name": "callback", 297 "name": "callback",
263 "parameters": [ 298 "parameters": [
264 {"name": "tab", "$ref": "Tab"} 299 {"name": "tab", "$ref": "Tab"}
265 ] 300 ]
266 } 301 }
267 ] 302 ]
268 }, 303 },
269 { 304 {
270 "name": "getAllInWindow", 305 "name": "getAllInWindow",
271 "type": "function", 306 "type": "function",
272 "description": "", 307 "description": "",
273 "parameters": [ 308 "parameters": [
274 {"type": "integer", "name": "windowId", "minimum": 0, "optional": true }, 309 {"type": "integer", "name": "windowId", "minimum": 0, "optional": true },
275 { 310 {
276 "type": "function", 311 "type": "function",
277 "name": "callback", 312 "name": "callback",
278 "parameters": [ 313 "parameters": [
279 {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } } 314 {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } }
280 ] 315 ]
281 } 316 }
282 ] 317 ]
283 }, 318 },
284 { 319 {
285 "name": "create", 320 "name": "create",
286 "type": "function", 321 "type": "function",
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 "name": "get", 565 "name": "get",
531 "type": "function", 566 "type": "function",
532 "description": "Retrieves the specified BookmarkTreeNode(s).", 567 "description": "Retrieves the specified BookmarkTreeNode(s).",
533 "parameters": [ 568 "parameters": [
534 { 569 {
535 "name": "idOrIdList", 570 "name": "idOrIdList",
536 "description": "A single string-valued id, or an array of string-val ued ids", 571 "description": "A single string-valued id, or an array of string-val ued ids",
537 "choices": [ 572 "choices": [
538 {"type": "string"}, 573 {"type": "string"},
539 {"type": "array", "items": {"type": "string"}, "minItems": 1} 574 {"type": "array", "items": {"type": "string"}, "minItems": 1}
540 ] 575 ]
541 }, 576 },
542 { 577 {
543 "type": "function", 578 "type": "function",
544 "name": "callback", 579 "name": "callback",
545 "parameters": [ 580 "parameters": [
546 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} } 581 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} }
547 ] 582 ]
548 } 583 }
549 ] 584 ]
550 }, 585 },
551 { 586 {
552 "name": "getChildren", 587 "name": "getChildren",
553 "type": "function", 588 "type": "function",
554 "description": "Retrieves the children of the specified BookmarkTreeNode id.", 589 "description": "Retrieves the children of the specified BookmarkTreeNode id.",
555 "parameters": [ 590 "parameters": [
556 {"type": "string", "name": "id"}, 591 {"type": "string", "name": "id"},
557 { 592 {
558 "type": "function", 593 "type": "function",
559 "name": "callback", 594 "name": "callback",
560 "parameters": [ 595 "parameters": [
561 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} } 596 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} }
562 ] 597 ]
563 } 598 }
564 ] 599 ]
565 }, 600 },
566 { 601 {
567 "name": "getTree", 602 "name": "getTree",
568 "type": "function", 603 "type": "function",
569 "description": "Retrieves the entire Bookmarks hierarchy.", 604 "description": "Retrieves the entire Bookmarks hierarchy.",
570 "parameters": [ 605 "parameters": [
571 { 606 {
572 "type": "function", 607 "type": "function",
573 "name": "callback", 608 "name": "callback",
574 "parameters": [ 609 "parameters": [
575 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} } 610 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} }
576 ] 611 ]
577 } 612 }
578 ] 613 ]
579 }, 614 },
580 { 615 {
581 "name": "search", 616 "name": "search",
582 "type": "function", 617 "type": "function",
583 "description": "Seaches for BookmarkTreeNodes matching the given query." , 618 "description": "Seaches for BookmarkTreeNodes matching the given query." ,
584 "parameters": [ 619 "parameters": [
585 {"type": "string", "name": "query"}, 620 {"type": "string", "name": "query"},
586 { 621 {
587 "type": "function", 622 "type": "function",
588 "name": "callback", 623 "name": "callback",
589 "parameters": [ 624 "parameters": [
590 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} } 625 {"name": "results", "type": "array", "items": { "$ref": "BookmarkT reeNode"} }
591 ] 626 ]
592 } 627 }
593 ] 628 ]
594 }, 629 },
595 { 630 {
596 "name": "create", 631 "name": "create",
597 "type": "function", 632 "type": "function",
598 "description": "", 633 "description": "",
599 "parameters": [ 634 "parameters": [
600 { 635 {
601 "type": "object", 636 "type": "object",
602 "name": "bookmark", 637 "name": "bookmark",
603 "properties": { 638 "properties": {
604 "parentId": {"type": "string"}, 639 "parentId": {"type": "string"},
605 "index": {"type": "integer", "minimum": 0, "optional": true}, 640 "index": {"type": "integer", "minimum": 0, "optional": true},
606 "title": {"type": "string", "optional": true}, 641 "title": {"type": "string", "optional": true},
607 "url": {"type": "string", "optional": true} 642 "url": {"type": "string", "optional": true}
608 } 643 }
609 }, 644 },
610 { 645 {
611 "type": "function", 646 "type": "function",
612 "name": "callback", 647 "name": "callback",
613 "optional": true, 648 "optional": true,
614 "parameters": [ 649 "parameters": [
615 {"name": "result", "$ref": "BookmarkTreeNode" } 650 {"name": "result", "$ref": "BookmarkTreeNode" }
616 ] 651 ]
617 } 652 }
618 ] 653 ]
619 }, 654 },
620 { 655 {
621 "name": "move", 656 "name": "move",
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 "description": "", 805 "description": "",
771 "parameters": [ 806 "parameters": [
772 {"type": "string", "name": "url", "optional": true}, 807 {"type": "string", "name": "url", "optional": true},
773 {"type": "function", "name": "callback", "optional": true, "parameters ": []} 808 {"type": "function", "name": "callback", "optional": true, "parameters ": []}
774 ] 809 ]
775 } 810 }
776 ], 811 ],
777 "events": [] 812 "events": []
778 } 813 }
779 ] 814 ]
OLDNEW
« no previous file with comments | « chrome/common/common_resources.grd ('k') | chrome/common/extensions/docs/api_index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698