| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /* | 5 /* |
| 6 * This file defines the extensions api functions, events and types. It is | 6 * This file defines the extensions api functions, events and types. It is |
| 7 * json-structured list of api "modules". Each module has | 7 * json-structured list of api "modules". Each module has |
| 8 * | 8 * |
| 9 * namespace: "<apiname>", // i.e. "windows" which becomes visible to | 9 * namespace: "<apiname>", // i.e. "windows" which becomes visible to |
| 10 * // extensions as chrome.windows. | 10 * // extensions as chrome.windows. |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 types: [], | 485 types: [], |
| 486 functions: [ | 486 functions: [ |
| 487 { | 487 { |
| 488 name: "get", | 488 name: "get", |
| 489 type: "function", | 489 type: "function", |
| 490 description: "", | 490 description: "", |
| 491 parameters: [ | 491 parameters: [ |
| 492 { | 492 { |
| 493 name: "idOrIdList", | 493 name: "idOrIdList", |
| 494 choice : [ | 494 choice : [ |
| 495 {type: "integer", minimum: 0}, | 495 {type: "string"}, |
| 496 {type: "array", item: {type: "integer", minimum: 0}, minItems: 1} | 496 {type: "array", item: {type: "string"}, minItems: 1} |
| 497 ] | 497 ] |
| 498 }, | 498 }, |
| 499 {type: "function", name: "callback"} | 499 {type: "function", name: "callback"} |
| 500 ] | 500 ] |
| 501 }, | 501 }, |
| 502 { | 502 { |
| 503 name: "getChildren", | 503 name: "getChildren", |
| 504 type: "function", | 504 type: "function", |
| 505 description: "", | 505 description: "", |
| 506 parameters: [ | 506 parameters: [ |
| 507 {type: "integer", name: "id", minimum: 0}, | 507 {type: "string", name: "id"}, |
| 508 {type: "function", name: "callback"} | 508 {type: "function", name: "callback"} |
| 509 ] | 509 ] |
| 510 }, | 510 }, |
| 511 { | 511 { |
| 512 name: "getTree", | 512 name: "getTree", |
| 513 type: "function", | 513 type: "function", |
| 514 description: "", | 514 description: "", |
| 515 parameters: [ | 515 parameters: [ |
| 516 {type: "function", name: "callback"} | 516 {type: "function", name: "callback"} |
| 517 ] | 517 ] |
| 518 }, | 518 }, |
| 519 { | 519 { |
| 520 name: "search", | 520 name: "search", |
| 521 type: "function", | 521 type: "function", |
| 522 description: "", | 522 description: "", |
| 523 parameters: [ | 523 parameters: [ |
| 524 {type: "string", name: "query"}, | 524 {type: "string", name: "query"}, |
| 525 {type: "function", name: "callback"} | 525 {type: "function", name: "callback"} |
| 526 ] | 526 ] |
| 527 }, | 527 }, |
| 528 { | 528 { |
| 529 name: "create", | 529 name: "create", |
| 530 type: "function", | 530 type: "function", |
| 531 description: "", | 531 description: "", |
| 532 parameters: [ | 532 parameters: [ |
| 533 { | 533 { |
| 534 type: "object", | 534 type: "object", |
| 535 name: "bookmark", | 535 name: "bookmark", |
| 536 properties: { | 536 properties: { |
| 537 parentId: {type: "integer", minimum: 0, optional: true}, | 537 parentId: {type: "string"}, |
| 538 index: {type: "integer", minimum: 0, optional: true}, | 538 index: {type: "integer", minimum: 0, optional: true}, |
| 539 title: {type: "string", optional: true}, | 539 title: {type: "string", optional: true}, |
| 540 url: {type: "string", optional: true}, | 540 url: {type: "string", optional: true}, |
| 541 } | 541 } |
| 542 }, | 542 }, |
| 543 {type: "function", name: "callback", optional: true} | 543 {type: "function", name: "callback", optional: true} |
| 544 ] | 544 ] |
| 545 }, | 545 }, |
| 546 { | 546 { |
| 547 name: "move", | 547 name: "move", |
| 548 type: "function", | 548 type: "function", |
| 549 description: "", | 549 description: "", |
| 550 parameters: [ | 550 parameters: [ |
| 551 {type: "integer", name: "id", minimum: 0}, | 551 {type: "string", name: "id"}, |
| 552 { | 552 { |
| 553 type: "object", | 553 type: "object", |
| 554 name: "destination", | 554 name: "destination", |
| 555 properties: { | 555 properties: { |
| 556 parentId: {type: "integer", minimum: 0, optional: true}, | 556 parentId: {type: "string"}, |
| 557 index: {type: "integer", minimum: 0, optional: true} | 557 index: {type: "integer", minimum: 0, optional: true} |
| 558 } | 558 } |
| 559 }, | 559 }, |
| 560 {type: "function", name: "callback", optional: true} | 560 {type: "function", name: "callback", optional: true} |
| 561 ] | 561 ] |
| 562 }, | 562 }, |
| 563 { | 563 { |
| 564 name: "update", | 564 name: "update", |
| 565 type: "function", | 565 type: "function", |
| 566 description: "", | 566 description: "", |
| 567 parameters: [ | 567 parameters: [ |
| 568 {type: "integer", name: "id", minimum: 0}, | 568 {type: "string", name: "id"}, |
| 569 { | 569 { |
| 570 type: "object", | 570 type: "object", |
| 571 name: "changes", | 571 name: "changes", |
| 572 properties: { | 572 properties: { |
| 573 title: {type: "string", optional: true} | 573 title: {type: "string", optional: true} |
| 574 } | 574 } |
| 575 }, | 575 }, |
| 576 {type: "function", name: "callback", optional: true} | 576 {type: "function", name: "callback", optional: true} |
| 577 ] | 577 ] |
| 578 }, | 578 }, |
| 579 { |
| 580 name: "remove", |
| 581 type: "function", |
| 582 description: "", |
| 583 parameters: [ |
| 584 {type: "string", name: "id"}, |
| 585 {type: "function", name: "callback", optional: true} |
| 586 ] |
| 587 }, |
| 588 { |
| 589 name: "removeTree", |
| 590 type: "function", |
| 591 description: "", |
| 592 parameters: [ |
| 593 {type: "string", name: "id"}, |
| 594 {type: "function", name: "callback", optional: true} |
| 595 ] |
| 596 }, |
| 579 ], | 597 ], |
| 580 events: [ | 598 events: [ |
| 581 { | 599 { |
| 582 name: "onAdded", | 600 name: "onAdded", |
| 583 type: "function", | 601 type: "function", |
| 584 description: "", | 602 description: "", |
| 585 parameters: [ | 603 parameters: [ |
| 586 {type: "integer", name: "id", minimum: 0}, | 604 {type: "string", name: "id"}, |
| 587 { | 605 { |
| 588 type: "object", | 606 type: "object", |
| 589 name: "bookmark", | 607 name: "bookmark", |
| 590 } | 608 } |
| 591 ] | 609 ] |
| 592 }, | 610 }, |
| 593 { | 611 { |
| 594 name: "onRemoved", | 612 name: "onRemoved", |
| 595 type: "function", | 613 type: "function", |
| 596 description: "", | 614 description: "", |
| 597 parameters: [ | 615 parameters: [ |
| 598 {type: "integer", name: "id", minimum: 0}, | 616 {type: "string", name: "id"}, |
| 599 { | 617 { |
| 600 type: "object", | 618 type: "object", |
| 601 name: "RemoveInfo", | 619 name: "RemoveInfo", |
| 602 } | 620 } |
| 603 ] | 621 ] |
| 604 }, | 622 }, |
| 605 { | 623 { |
| 606 name: "onChanged", | 624 name: "onChanged", |
| 607 type: "function", | 625 type: "function", |
| 608 description: "", | 626 description: "", |
| 609 parameters: [ | 627 parameters: [ |
| 610 {type: "integer", name: "id", minimum: 0}, | 628 {type: "string", name: "id"}, |
| 611 { | 629 { |
| 612 type: "object", | 630 type: "object", |
| 613 name: "ChangeInfo", | 631 name: "ChangeInfo", |
| 614 } | 632 } |
| 615 ] | 633 ] |
| 616 }, | 634 }, |
| 617 { | 635 { |
| 618 name: "onMoved", | 636 name: "onMoved", |
| 619 type: "function", | 637 type: "function", |
| 620 description: "", | 638 description: "", |
| 621 parameters: [ | 639 parameters: [ |
| 622 {type: "integer", name: "id", minimum: 0}, | 640 {type: "string", name: "id"}, |
| 623 { | 641 { |
| 624 type: "object", | 642 type: "object", |
| 625 name: "MoveInfo", | 643 name: "MoveInfo", |
| 626 } | 644 } |
| 627 ] | 645 ] |
| 628 }, | 646 }, |
| 629 { | 647 { |
| 630 name: "onChildrenReordered", | 648 name: "onChildrenReordered", |
| 631 type: "function", | 649 type: "function", |
| 632 description: "", | 650 description: "", |
| 633 parameters: [ | 651 parameters: [ |
| 634 {type: "integer", name: "id", minimum: 0}, | 652 {type: "string", name: "id"}, |
| 635 { | 653 { |
| 636 type: "object", | 654 type: "object", |
| 637 name: "childIds", | 655 name: "childIds", |
| 638 } | 656 } |
| 639 ] | 657 ] |
| 640 } | 658 } |
| 641 ] | 659 ] |
| 642 } | 660 } |
| 643 ] | 661 ] |
| OLD | NEW |