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

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

Issue 6749021: Added new fileBrowserPrivate and fileHandler extension APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
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 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 }, 2827 },
2828 "checked": { 2828 "checked": {
2829 "type": "boolean", 2829 "type": "boolean",
2830 "optional": true, 2830 "optional": true,
2831 "description": "The initial state of a checkbox or radio item: t rue for selected and false for unselected. Only one radio item can be selected a t a time in a given group of radio items." 2831 "description": "The initial state of a checkbox or radio item: t rue for selected and false for unselected. Only one radio item can be selected a t a time in a given group of radio items."
2832 }, 2832 },
2833 "contexts": { 2833 "contexts": {
2834 "type": "array", 2834 "type": "array",
2835 "items": { 2835 "items": {
2836 "type": "string", 2836 "type": "string",
2837 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio"] 2837 "enum": ["all", "page", "frame", "selection", "link", "editabl e", "image", "video", "audio", "file"]
2838 }, 2838 },
2839 "minItems": 1, 2839 "minItems": 1,
2840 "optional": true, 2840 "optional": true,
2841 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified." 2841 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
2842 }, 2842 },
2843 "onclick": { 2843 "onclick": {
2844 "type": "function", 2844 "type": "function",
2845 "optional": true, 2845 "optional": true,
2846 "description": "A function that will be called back when the men u item is clicked.", 2846 "description": "A function that will be called back when the men u item is clicked.",
2847 "parameters": [ 2847 "parameters": [
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
4495 }, 4495 },
4496 { 4496 {
4497 "name": "onDisabled", 4497 "name": "onDisabled",
4498 "description": "Fired when an app or extension has been disabled", 4498 "description": "Fired when an app or extension has been disabled",
4499 "type": "function", 4499 "type": "function",
4500 "parameters": [{"name": "info", "$ref":"ExtensionInfo"}] 4500 "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
4501 } 4501 }
4502 ] 4502 ]
4503 }, 4503 },
4504 { 4504 {
4505 "namespace":"fileBrowserPrivate", 4505 "namespace":"fileSystem",
4506 "nodoc": "true", 4506 "nodoc": "true",
4507 "functions": [ 4507 "functions": [
4508 { 4508 {
4509 "name": "resolveLocalFileSystemURL",
4510 "description": "Allows the user to look up the Entry for a file or direc tory referred to by a local URL. ",
4511 "parameters": [
4512 {
4513 "name": "url",
4514 "type": "string",
4515 "description": "A URL referring to a local file in a filesystem."
4516 },
4517 {
4518 "name": "callback",
4519 "type": "function",
4520 "optional": "false",
4521 "parameters": [
4522 {
4523 "name" : "entry",
4524 "type": "object",
4525 "optional": "true",
4526 "description": "An Entry as a response to a file resolution requ est. It will have value of null if the request failed."
4527 }
4528 ]
4529 }
4530 ]
4531 }
4532 ]
4533 },
4534
4535 {
4536 "namespace":"fileBrowserPrivate",
4537 "nodoc": "true",
4538 "types": [
4539 {
4540 "id": "FileBrowserTask",
4541 "type": "object",
4542 "description": "Represents information about available browser tasks. A task is an abstraction of an operation that the file browser can perform over a selected file set.",
4543 "properties": {
4544 "taskId": {"type": "string", "description": "The unique identifier of the task."},
4545 "title": {"type": "string", "description": "Task title."},
4546 "iconUrl": {"type": "string", "description": "Task icon url (from chro me://extension-icon/...)"}
4547 }
4548 }
4549 ],
4550 "functions": [
4551 {
4509 "name": "requestLocalFileSystem", 4552 "name": "requestLocalFileSystem",
4510 "description": "Requests access to local file system", 4553 "description": "Requests access to local file system",
4511 "parameters": [ 4554 "parameters": [
4512 { 4555 {
4513 "name": "callback", 4556 "name": "callback",
4514 "type": "function", 4557 "type": "function",
4515 "optional": "false", 4558 "optional": "false",
4516 "parameters": [ 4559 "parameters": [
4517 { 4560 {
4561 "name" : "fileSystem",
4518 "type": "object", 4562 "type": "object",
4519 "isInstanceOf": "DOMFileSystem" 4563 "optional": "true",
4564 "description": "A DOMFileSystem instance for local file system a ccess. null if the caller has no appropriate permissions."
4565 }
4566 ]
4567 }
4568 ]
4569 },
4570 {
4571 "name": "getFileTasks",
4572 "description": "Gets the of tasks that can be performed over selected fi les.",
4573 "parameters": [
4574 {
4575 "name": "fileURLs",
4576 "type": "array",
4577 "description": "Array of selected file URLs",
4578 "items": { "type": "string" }
4579 },
4580 {
4581 "name": "callback",
4582 "type": "function",
4583 "optional": "false",
4584 "parameters": [
4585 {
4586 "name": "tasks",
4587 "type": "array",
4588 "items": {"$ref": "FileBrowserTask"},
4589 "description": "The list of available tasks that can be performe d on all of the passed file paths."
4590 }
4591 ]
4592 }
4593 ]
4594 },
4595 {
4596 "name": "executeTask",
4597 "description": "Executes file browser task over selected files",
4598 "parameters": [
4599 {
4600 "name": "taskId",
4601 "type": "string",
4602 "description": "The unique identifier of task to execute."
4603 },
4604 {
4605 "name": "fileURLs",
4606 "type": "array",
4607 "description": "Array of file URLs",
4608 "items": { "type": "string" }
4609 },
4610 {
4611 "name": "callback",
4612 "type": "function",
4613 "optional": "false",
4614 "parameters": [
4615 {
4616 "name": "success",
4617 "type": "boolean",
4618 "optional": "true",
4619 "description": "True of task execution was successfully initiate d."
4520 } 4620 }
4521 ] 4621 ]
4522 } 4622 }
4523 ] 4623 ]
4524 }, 4624 },
4525 { 4625 {
4526 "name": "selectFiles", 4626 "name": "selectFiles",
4527 "type": "function", 4627 "type": "function",
4528 "description": "Select multiple files.", 4628 "description": "Select multiple files.",
4529 "parameters": [ 4629 "parameters": [
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
5019 { 5119 {
5020 "type": "integer", 5120 "type": "integer",
5021 "name": "tabId", 5121 "name": "tabId",
5022 "description": "The id of the tab that was detached." 5122 "description": "The id of the tab that was detached."
5023 } 5123 }
5024 ] 5124 ]
5025 } 5125 }
5026 ] 5126 ]
5027 } 5127 }
5028 ] 5128 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698