| 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_macros.h" | 10 #include "ppapi/c/pp_macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 PP_FileChooserMode_Dev mode; | 23 PP_FileChooserMode_Dev mode; |
| 24 | 24 |
| 25 // A comma-separated list of MIME types such as audio/*,text/plain. The | 25 // A comma-separated list of MIME types such as audio/*,text/plain. The |
| 26 // dialog may restrict selectable files to the specified MIME types. | 26 // dialog may restrict selectable files to the specified MIME types. |
| 27 // TODO(darin): What if the mime type is unknown to the system? The plugin | 27 // TODO(darin): What if the mime type is unknown to the system? The plugin |
| 28 // may wish to describe the mime type and provide a matching file extension. | 28 // may wish to describe the mime type and provide a matching file extension. |
| 29 // It is more webby to use mime types here instead of file extensions. | 29 // It is more webby to use mime types here instead of file extensions. |
| 30 const char* accept_mime_types; | 30 const char* accept_mime_types; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 #define PPB_FILECHOOSER_DEV_INTERFACE "PPB_FileChooser(Dev);0.2" | 33 #define PPB_FILECHOOSER_DEV_INTERFACE "PPB_FileChooser(Dev);0.3" |
| 34 | 34 |
| 35 struct PPB_FileChooser_Dev { | 35 struct PPB_FileChooser_Dev { |
| 36 // Creates a file chooser dialog with the specified options. The chooser is | 36 // Creates a file chooser dialog with the specified options. The chooser is |
| 37 // associated with a particular instance, so that it may be positioned on the | 37 // associated with a particular instance, so that it may be positioned on the |
| 38 // screen relative to the tab containing the instance. Returns 0 if passed | 38 // screen relative to the tab containing the instance. Returns 0 if passed |
| 39 // an invalid instance. | 39 // an invalid instance. |
| 40 // | 40 // |
| 41 // A PPB_FileChooser_Dev instance can be used to select a single file | 41 // A PPB_FileChooser_Dev instance can be used to select a single file |
| 42 // (PP_FILECHOOSERMODE_OPEN) or multiple files | 42 // (PP_FILECHOOSERMODE_OPEN) or multiple files |
| 43 // (PP_FILECHOOSERMODE_OPENMULTIPLE). Unlike the HTML5 <input type="file"> | 43 // (PP_FILECHOOSERMODE_OPENMULTIPLE). Unlike the HTML5 <input type="file"> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 59 // Depending on the PP_ChooseFileMode requested when the FileChooser was | 59 // Depending on the PP_ChooseFileMode requested when the FileChooser was |
| 60 // created, the file refs will either be readable or writable. Their file | 60 // created, the file refs will either be readable or writable. Their file |
| 61 // system type will be PP_FileSystemType_External. If the user chose no | 61 // system type will be PP_FileSystemType_External. If the user chose no |
| 62 // files or cancelled the dialog, then this method will simply return 0 | 62 // files or cancelled the dialog, then this method will simply return 0 |
| 63 // the first time it is called. | 63 // the first time it is called. |
| 64 PP_Resource (*GetNextChosenFile)(PP_Resource chooser); | 64 PP_Resource (*GetNextChosenFile)(PP_Resource chooser); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 #endif /* PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ */ | 67 #endif /* PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ */ |
| 68 | 68 |
| OLD | NEW |