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

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

Issue 7720002: Chrome Extensions chrome.experimental.offscreenTabs.* API implementation, docs, and test. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/docs/experimental.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", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 8442 matching lines...) Expand 10 before | Expand all | Expand 10 after
8453 { 8453 {
8454 "name": "callback", 8454 "name": "callback",
8455 "type": "function", 8455 "type": "function",
8456 "description": "Called when the browser's passwords have been cleare d.", 8456 "description": "Called when the browser's passwords have been cleare d.",
8457 "optional": true, 8457 "optional": true,
8458 "parameters": [] 8458 "parameters": []
8459 } 8459 }
8460 ] 8460 ]
8461 } 8461 }
8462 ] 8462 ]
8463 },
8464 {
8465 "namespace": "experimental.offscreenTabs",
8466 "types": [
8467 {
8468 "id": "OffscreenTab",
8469 "type": "object",
8470 "properties": {
8471 "id": {
8472 "type": "integer",
8473 "minimum": 0,
8474 "description": "The ID of the offscreen tab. Tab IDs are unique with in a browser session."
8475 },
8476 "url": {
8477 "type":
8478 "string",
8479 "description": "URL of the offscreen tab."
8480 },
8481 "width": {
8482 "type": "integer",
8483 "minimum": 0,
8484 "description": "Width of the window."
8485 },
8486 "height": {
8487 "type": "integer",
8488 "minimum": 0,
8489 "description": "Height of the window."
8490 }
8491 }
8492 }
8493 ],
8494 "functions": [
8495 {
8496 "name": "create",
8497 "type": "function",
8498 "description": "Creates a new offscreen tab.",
8499 "parameters": [
8500 {
8501 "name": "createProperties",
8502 "type": "object",
8503 "properties": {
8504 "url": {
8505 "type": "string",
8506 "description": "The URL to navigate the offscreen tab to initial ly. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', no t 'www.google.com'). Relative URLs will be relative to the current page within t he extension."
8507 },
8508 "width": {
8509 "type": "integer",
8510 "optional": true,
8511 "minimum": 0,
8512 "description": "Width of the offscreen tab. Defaults to width of the current tab."
8513 },
8514 "height": {
8515 "type": "integer",
8516 "optional": true,
8517 "minimum": 0,
8518 "description": "Height of the offscreen tab. Defaults to height of the current tab."
8519 }
8520 }
8521 },
8522 {
8523 "name": "callback",
8524 "type": "function",
8525 "optional": true,
8526 "parameters": [
8527 {
8528 "name": "offscreenTab",
8529 "$ref": "OffscreenTab",
8530 "optional": true,
8531 "description": "Details of the offscreen tab."
8532 }
8533 ]
8534 }
8535 ]
8536 },
8537 {
8538 "name": "get",
8539 "type": "function",
8540 "description": "Gets details about the specified offscreen tab.",
8541 "parameters": [
8542 {
8543 "name": "offscreenTabId",
8544 "type": "integer",
8545 "minimum": 0,
8546 "description": "ID of the offscreen tab."
8547 },
8548 {
8549 "name": "callback",
8550 "type": "function",
8551 "parameters": [
8552 {
8553 "name": "offscreenTab",
8554 "$ref": "OffscreenTab",
8555 "description": "Details of the offscreen tab."
8556 }
8557 ]
8558 }
8559 ]
8560 },
8561 {
8562 "name": "getAll",
8563 "type": "function",
8564 "description": "Gets an array of all offscreen tabs.",
8565 "parameters": [
8566 {
8567 "name": "callback",
8568 "type": "function",
8569 "parameters": [
8570 {
8571 "name": "offscreenTabs",
8572 "type": "array",
8573 "items": {
8574 "$ref": "OffscreenTab"
8575 }
8576 }
8577 ]
8578 }
8579 ]
8580 },
8581 {
8582 "name": "remove",
8583 "type": "function",
8584 "description": "Removes an offscreen tab.",
8585 "parameters": [
8586 {
8587 "name": "offscreenTabId",
8588 "type": "integer",
8589 "minimum": 0,
8590 "description": "ID of the offscreen tab."
8591 },
8592 {
8593 "name": "callback",
8594 "type": "function",
8595 "optional": true
8596 }
8597 ]
8598 },
8599 {
8600 "name": "sendMouseEvent",
8601 "type": "function",
8602 "description": "Dispatches a mouse event in the offscreen tab.",
8603 "parameters": [
8604 {
8605 "name": "offscreenTabId",
8606 "type": "integer",
8607 "minimum": 0,
8608 "description": "ID of the offscreen tab."
8609 },
8610 {
8611 "name": "mouseEvent",
8612 "type": "any",
8613 "description": "A JavaScript MouseEvent object. Supported event type s: <i>mousedown</i>, <i>mouseup</i>, <i>click</i>, <i>mousemove</i>, <i>mousewhe el</i>."
8614 },
8615 {
8616 "name": "x",
8617 "type": "integer",
8618 "optional": true,
8619 "minimum": 0,
8620 "description": "X position of where the mouse event should be dispat ched on the offscreen web page. Not required in the case of a mousewheel event."
8621 },
8622 {
8623 "name": "y",
8624 "type": "integer",
8625 "optional": true,
8626 "minimum": 0,
8627 "description": "Y position of where the mouse event should be dispat ched on the offscreen web page. Not required in the case of a mousewheel event."
8628 },
8629 {
8630 "name": "callback",
8631 "type": "function",
8632 "optional": true,
8633 "parameters": [
8634 {
8635 "name": "offscreenTab",
8636 "$ref": "OffscreenTab",
8637 "description": "Details of the offscreen tab."
8638 }
8639 ]
8640 }
8641 ]
8642 },
8643 {
8644 "name": "sendKeyboardEvent",
8645 "type": "function",
8646 "description": "Dispatches a keyboard event in the offscreen tab.",
8647 "parameters": [
8648 {
8649 "name": "offscreenTabId",
8650 "type": "integer",
8651 "minimum": 0,
8652 "description": "ID of the offscreen tab."
8653 },
8654 {
8655 "name": "keyboardEvent",
8656 "type": "any",
8657 "description": "A JavaScript KeyboardEvent object. Supported event t ypes: <i>keydown</i>, <i>keyup</i>, <i>keypress</i>. Note, only <i>keypress</i> produces a visible result on screen."
8658 },
8659 {
8660 "name": "callback",
8661 "type": "function",
8662 "optional": true,
8663 "parameters": [
8664 {
8665 "name": "offscreenTab",
8666 "$ref": "OffscreenTab",
8667 "description": "Details of the offscreen tab."
8668 }
8669 ]
8670 }
8671 ]
8672 },
8673 {
8674 "name": "toDataUrl",
8675 "type": "function",
8676 "description": "Captures the visible area of an offscreen tab. ",
8677 "parameters": [
8678 {
8679 "name": "offscreenTabId",
8680 "type": "integer",
8681 "minimum": 0,
8682 "description": "The ID of the offscreen tab."
8683 },
8684 {
8685 "name": "options",
8686 "type": "object",
8687 "optional": true,
8688 "description": "Set parameters of image capture, such as the format of the resulting image.",
8689 "properties": {
8690 "format": {
8691 "type": "string",
8692 "optional": true,
8693 "enum": ["jpeg", "png"],
8694 "description": "The format of the resulting image. Default is jp eg."
8695 },
8696 "quality": {
8697 "type": "integer",
8698 "optional": true,
8699 "minimum": 0,
8700 "maximum": 100,
8701 "description": "When format is 'jpeg', controls the quality of t he resulting image. This value is ignored for PNG images. As quality is decrease d, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease."
8702 }
8703 }
8704 },
8705 {
8706 "name": "callback",
8707 "type": "function",
8708 "parameters": [
8709 {
8710 "name": "dataUrl",
8711 "type": "string",
8712 "description": "A data URL which encodes an image of the visible area of the captured offscreen tab. May be assigned to the 'src' property of an HTML Image element or WebGL texture source for display."
8713 }
8714 ]
8715 }
8716 ]
8717 },
8718 {
8719 "name": "update",
8720 "type": "function",
8721 "description": "Modifies the properties of an offscreen tab. Properties that are not specified in updateProperties are not modified.",
8722 "parameters": [
8723 {
8724 "name": "offscreenTabId",
8725 "type": "integer",
8726 "minimum": 0,
8727 "description": "The ID of the offscreen tab."
8728 },
8729 {
8730 "name": "updateProperties",
8731 "type": "object",
8732 "properties": {
8733 "url": {
8734 "type": "string",
8735 "optional": true,
8736 "description": "The URL the offscreen tab is displaying."
8737 },
8738 "width": {
8739 "type": "integer",
8740 "optional": true,
8741 "minimum": 0,
8742 "description": "Width of the window."
8743 },
8744 "height": {
8745 "type": "integer",
8746 "optional": true,
8747 "minimum": 0,
8748 "description": "Height of the window."
8749 }
8750 }
8751 },
8752 {
8753 "name": "callback",
8754 "type": "function",
8755 "optional": true,
8756 "parameters": [
8757 {
8758 "name": "offscreenTab",
8759 "$ref": "OffscreenTab",
8760 "description": "Details of the offscreen tab."
8761 }
8762 ]
8763 }
8764 ]
8765 }
8766 ],
8767 "events": [
8768 {
8769 "name": "onUpdated",
8770 "type": "function",
8771 "description": "Fires when an offscreen tab is updated. ",
8772 "parameters": [
8773 {
8774 "name": "offscreenTabId",
8775 "type": "integer",
8776 "minimum": 0,
8777 "description": "ID of the updated offscreen tab"
8778 },
8779 {
8780 "name": "changeInfo",
8781 "type": "object",
8782 "description": "Lists the changes to the state of the offscreen tab that was updated.",
8783 "properties": {
8784 "url": {
8785 "type": "string",
8786 "optional": true,
8787 "description": "The offscreen tab's URL if it has changed."
8788 }
8789 }
8790 },
8791 {
8792 "name": "offscreenTab",
8793 "$ref": "OffscreenTab",
8794 "description": "Details of the offscreen tab."
8795 }
8796 ]
8797 }
8798 ]
8463 } 8799 }
8464 ] 8800 ]
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/docs/experimental.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698