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

Side by Side Diff: third_party/chrome/idl/file_browser_handler.json

Issue 12261015: Import chrome idl into third_party (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
(Empty)
1 // Copyright (c) 2012 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":"fileBrowserHandler",
8 "platforms": ["chromeos"],
9 "types": [
10 {
11 "id": "FileHandlerExecuteEventDetails",
12 "type": "object",
13 "description": "Event details payload for fileBrowserHandler.onExecute e vent.",
14 "properties": {
15 "entries": {
16 "type": "array",
17 "items": { "type": "any" },
18 "description": "Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser)."
19 },
20 "tab_id" : {
21 "type": "integer",
22 "optional": true,
23 "description": "The ID of the tab that raised this event. Tab IDs ar e unique within a browser session."
24 }
25 }
26 }
27 ],
28
29 "events": [
30 {
31 "name": "onExecute",
32 "type": "function",
33 "description": "Fired when file system action is executed from ChromeOS file browser.",
34 "parameters": [
35 {
36 "name": "id",
37 "type": "string",
38 "description": "File browser action id as specified in the listener component's manifest."
39 },
40 {
41 "name": "details",
42 "$ref": "FileHandlerExecuteEventDetails",
43 "description": "File handler execute event details."
44 }
45 ]
46 },
47 {
48 "name": "onExecuteContentHandler",
49 "type": "function",
50 "description": "Fired when a resource is fetched which matches a mime ty pe handled by this extension. The resource request is cancelled, and the extensi on is expected to handle the request. The event is restricted to a small number of white-listed fileBrowserHandlers.",
51 "parameters": [
52 {
53 "name": "mime_type",
54 "type": "string",
55 "description": "The MIME type of the intercepted URL request."
56 },
57 {
58 "name": "content_url",
59 "type": "string",
60 "description": "The intercepted URL request. The handler should fetc h and handle data referenced by the URL."
61 }
62 ]
63 }
64 ],
65
66 "functions": [
67 {
68 "name": "selectFile",
69 "type": "function",
70 "description": "Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actu ally get created during the function call, so function caller must ensure its ex istence before using it. The function has to be invoked with a user gesture.",
71 "parameters": [
72 {
73 "name": "selectionParams",
74 "type": "object",
75 "description": "Parameters that will be used while selecting the fil e.",
76 "properties": {
77 "suggestedName": {
78 "type": "string",
79 "description": "Suggested name for the file."
80 },
81 "allowedFileExtensions": {
82 "type": "array",
83 "items": { "type": "string" },
84 "optional": true,
85 "description": "List of file extensions that the selected file can have. The list is also used to specify what files to be shown in the select file dialog. Files with the listed extensions are only shown in the dialog. Ext ensions should not include the leading '.'. Example: ['jpg', 'png']"
86 }
87 }
88 },
89 {
90 "name": "callback",
91 "type": "function",
92 "description": "Function called upon completion.",
93 "parameters": [
94 {
95 "name": "result",
96 "description": "Result of the method.",
97 "type": "object",
98 "properties": {
99 "success": {
100 "type": "boolean",
101 "description": "Whether the file has been selected."
102 },
103 "entry": {
104 "type": "object",
105 "constructor": "Entry",
106 "additionalProperties": { "type": "any" },
107 "optional": true,
108 "description": "Selected file entry. It will be null if a fi le hasn't been selected."
109 }
110 }
111 }
112 ]
113 }
114 ]
115 }
116 ]
117 }
118 ]
OLDNEW
« no previous file with comments | « third_party/chrome/idl/extension.json ('k') | third_party/chrome/idl/file_browser_handler_internal.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698