diff options
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/c/dev/ppb_directory_reader_dev.h | 7 | ||||
-rw-r--r-- | ppapi/c/dev/ppb_file_chooser_dev.h | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/ppapi/c/dev/ppb_directory_reader_dev.h b/ppapi/c/dev/ppb_directory_reader_dev.h index 2b86b9b..a4b6558 100644 --- a/ppapi/c/dev/ppb_directory_reader_dev.h +++ b/ppapi/c/dev/ppb_directory_reader_dev.h @@ -31,7 +31,7 @@ struct PPB_DirectoryReader_Dev { // DirectoryReader. PP_Bool (*IsDirectoryReader)(PP_Resource resource); - // Reads the next entry in the directory. Return PP_OK and sets + // Reads the next entry in the directory. Returns PP_OK and sets // entry->file_ref to 0 to indicate reaching the end of the directory. If // entry->file_ref is non-zero when passed to GetNextEntry, it will be // released before the next file_ref is stored. @@ -40,8 +40,9 @@ struct PPB_DirectoryReader_Dev { // // PP_Resource reader = reader_funcs->Create(dir_ref); // PP_DirectoryEntry entry = {0}; - // while (reader_funcs->GetNextEntry(reader, &entry, - // PP_BlockUntilComplete()) == PP_OK) { + // while ((reader_funcs->GetNextEntry(reader, &entry, + // PP_BlockUntilComplete()) == PP_OK) && + // entry->file_ref) { // ProcessDirectoryEntry(entry); // } // core_funcs->ReleaseResource(reader); diff --git a/ppapi/c/dev/ppb_file_chooser_dev.h b/ppapi/c/dev/ppb_file_chooser_dev.h index c1cef4e..cc2bafe 100644 --- a/ppapi/c/dev/ppb_file_chooser_dev.h +++ b/ppapi/c/dev/ppb_file_chooser_dev.h @@ -35,6 +35,13 @@ struct PPB_FileChooser_Dev { // associated with a particular instance, so that it may be positioned on the // screen relative to the tab containing the instance. Returns 0 if passed // an invalid instance. + // + // A PPB_FileChooser_Dev instance can be used to select a single file + // (PP_FILECHOOSERMODE_OPEN) or multiple files + // (PP_FILECHOOSERMODE_OPENMULTIPLE). Unlike the HTML5 <input type="file"> + // tag, a PPB_FileChooser_Dev instance cannot be used to select a directory. + // In order to get the list of files in a directory, the + // PPB_DirectoryReader_Dev interface must be used. PP_Resource (*Create)(PP_Instance instance, const struct PP_FileChooserOptions_Dev* options); |