Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 | 5 |
| 6 /* | 6 /* |
| 7 * This file defines the <code>PPB_DirectoryReader_Dev</code> interface. | 7 * This file defines the <code>PPB_DirectoryReader_Dev</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 label Chrome { | 10 label Chrome { |
| 11 M13 = 0.5 | 11 M13 = 0.5, |
| 12 M26 = 0.6 | |
| 12 }; | 13 }; |
| 13 | 14 |
| 14 [assert_size(8)] | 15 [assert_size(8)] |
| 15 struct PP_DirectoryEntry_Dev { | 16 struct PP_DirectoryEntry_Dev { |
| 16 PP_Resource file_ref; | 17 PP_Resource file_ref; |
| 17 PP_FileType file_type; | 18 PP_FileType file_type; |
| 18 }; | 19 }; |
| 19 | 20 |
| 20 interface PPB_DirectoryReader_Dev { | 21 interface PPB_DirectoryReader_Dev { |
| 21 // Creates a DirectoryReader for the given directory. Upon success, the | 22 // Creates a DirectoryReader for the given directory. Upon success, the |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 38 // | 39 // |
| 39 // PP_Resource reader = reader_funcs->Create(dir_ref); | 40 // PP_Resource reader = reader_funcs->Create(dir_ref); |
| 40 // PP_DirectoryEntry entry = {0}; | 41 // PP_DirectoryEntry entry = {0}; |
| 41 // while ((reader_funcs->GetNextEntry(reader, &entry, | 42 // while ((reader_funcs->GetNextEntry(reader, &entry, |
| 42 // PP_BlockUntilComplete()) == PP_OK) && | 43 // PP_BlockUntilComplete()) == PP_OK) && |
| 43 // entry->file_ref) { | 44 // entry->file_ref) { |
| 44 // ProcessDirectoryEntry(entry); | 45 // ProcessDirectoryEntry(entry); |
| 45 // } | 46 // } |
| 46 // core_funcs->ReleaseResource(reader); | 47 // core_funcs->ReleaseResource(reader); |
| 47 // | 48 // |
| 49 [deprecate=0.6] | |
| 48 int32_t GetNextEntry([in] PP_Resource directory_reader, | 50 int32_t GetNextEntry([in] PP_Resource directory_reader, |
| 49 [out] PP_DirectoryEntry_Dev entry, | 51 [out] PP_DirectoryEntry_Dev entry, |
| 50 [in] PP_CompletionCallback callback); | 52 [in] PP_CompletionCallback callback); |
|
dmichael (off chromium)
2013/01/18 17:10:18
Since nobody is using this API right now, let's re
| |
| 53 | |
| 54 // Reads all entries in the directory. | |
| 55 // | |
| 56 // @param[in] directory_reader A <code>PP_Resource</code> corresponding to a | |
| 57 // directory reader resource. | |
| 58 // @param[in] output An output array which will receive | |
| 59 // <code>PP_DirectoryEntry_Dev</code> objects on success. | |
| 60 // @param[in] callback A <code>PP_CompletionCallback</code> to run on | |
| 61 // completion. | |
| 62 // | |
| 63 // @return An error code from <code>pp_errors.h</code>. | |
| 64 // | |
| 65 [version=0.6] | |
| 66 int32_t ReadEntries([in] PP_Resource directory_reader, | |
| 67 [in] PP_ArrayOutput output, | |
|
darin (slow to review)
2013/01/18 06:26:19
Most operating systems don't provide APIs like thi
| |
| 68 [in] PP_CompletionCallback callback); | |
| 51 }; | 69 }; |
| OLD | NEW |