OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ | 5 #ifndef PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ |
6 #define PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ | 6 #define PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ |
7 | 7 |
8 #include "ppapi/c/pp_bool.h" | 8 #include "ppapi/c/pp_bool.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
11 | 11 |
12 struct PP_CompletionCallback; | 12 struct PP_CompletionCallback; |
13 | 13 |
14 typedef enum { | 14 typedef enum { |
15 PP_FILECHOOSERMODE_OPEN, | 15 PP_FILECHOOSERMODE_OPEN, |
16 PP_FILECHOOSERMODE_OPENMULTIPLE | 16 PP_FILECHOOSERMODE_OPENMULTIPLE |
17 // TODO(darin): Should there be a way to choose a directory? | 17 // TODO(darin): Should there be a way to choose a directory? |
18 } PP_FileChooserMode_Dev; | 18 } PP_FileChooserMode_Dev; |
| 19 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileChooserMode_Dev, 4); |
19 | 20 |
20 struct PP_FileChooserOptions_Dev { | 21 struct PP_FileChooserOptions_Dev { |
21 PP_FileChooserMode_Dev mode; | 22 PP_FileChooserMode_Dev mode; |
22 | 23 |
23 // A comma-separated list of MIME types such as audio/*,text/plain. The | 24 // A comma-separated list of MIME types such as audio/*,text/plain. The |
24 // dialog may restrict selectable files to the specified MIME types. | 25 // dialog may restrict selectable files to the specified MIME types. |
25 // TODO(darin): What if the mime type is unknown to the system? The plugin | 26 // TODO(darin): What if the mime type is unknown to the system? The plugin |
26 // may wish to describe the mime type and provide a matching file extension. | 27 // may wish to describe the mime type and provide a matching file extension. |
27 // It is more webby to use mime types here instead of file extensions. | 28 // It is more webby to use mime types here instead of file extensions. |
28 const char* accept_mime_types; | 29 const char* accept_mime_types; |
(...skipping 27 matching lines...) Expand all Loading... |
56 // chosen files. It should be called in a loop until it returns 0. | 57 // chosen files. It should be called in a loop until it returns 0. |
57 // Depending on the PP_ChooseFileMode requested when the FileChooser was | 58 // Depending on the PP_ChooseFileMode requested when the FileChooser was |
58 // created, the file refs will either be readable or writable. Their file | 59 // created, the file refs will either be readable or writable. Their file |
59 // system type will be PP_FileSystemType_External. If the user chose no | 60 // system type will be PP_FileSystemType_External. If the user chose no |
60 // files or cancelled the dialog, then this method will simply return 0 | 61 // files or cancelled the dialog, then this method will simply return 0 |
61 // the first time it is called. | 62 // the first time it is called. |
62 PP_Resource (*GetNextChosenFile)(PP_Resource chooser); | 63 PP_Resource (*GetNextChosenFile)(PP_Resource chooser); |
63 }; | 64 }; |
64 | 65 |
65 #endif // PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ | 66 #endif // PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ |
OLD | NEW |