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 #ifndef PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ |
6 #define PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ | 6 #define PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ppapi/c/dev/ppb_file_chooser_dev.h" | 10 #include "ppapi/c/dev/ppb_file_chooser_dev.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 /// This function creates a file chooser dialog resource. The chooser is | 27 /// This function creates a file chooser dialog resource. The chooser is |
28 /// associated with a particular instance, so that it may be positioned on the | 28 /// associated with a particular instance, so that it may be positioned on the |
29 /// screen relative to the tab containing the instance. Returns 0 if passed | 29 /// screen relative to the tab containing the instance. Returns 0 if passed |
30 /// an invalid instance. | 30 /// an invalid instance. |
31 /// | 31 /// |
32 /// @param mode A PPB_FileChooser_Dev instance can be used to select a single | 32 /// @param mode A PPB_FileChooser_Dev instance can be used to select a single |
33 /// file (PP_FILECHOOSERMODE_OPEN) or multiple files | 33 /// file (PP_FILECHOOSERMODE_OPEN) or multiple files |
34 /// (PP_FILECHOOSERMODE_OPENMULTIPLE). Unlike the HTML5 <input type="file"> | 34 /// (PP_FILECHOOSERMODE_OPENMULTIPLE). Unlike the HTML5 <input type="file"> |
35 /// tag, a PPB_FileChooser_Dev instance cannot be used to select a directory. | 35 /// tag, a PPB_FileChooser_Dev instance cannot be used to select a directory. |
36 /// In order to get the list of files in a directory, the | 36 /// In order to get the list of files in a directory, the |
37 /// PPB_DirectoryReader_Dev interface must be used. | 37 /// PPB_FileRef::ReadDirectoryEntries interface must be used. |
38 /// | 38 /// |
39 /// @param accept_types A comma-separated list of MIME types and file | 39 /// @param accept_types A comma-separated list of MIME types and file |
40 /// extensions such as "audio/ *,text/plain,.html" (note there should be | 40 /// extensions such as "audio/ *,text/plain,.html" (note there should be |
41 /// no space between the '/' and the '*', but one is added to avoid confusing | 41 /// no space between the '/' and the '*', but one is added to avoid confusing |
42 /// C++ comments). The dialog may restrict selectable files to the specified | 42 /// C++ comments). The dialog may restrict selectable files to the specified |
43 /// MIME types and file extensions. If a string in the comma-separated list | 43 /// MIME types and file extensions. If a string in the comma-separated list |
44 /// begins with a period (.) then the string is interpreted as a file | 44 /// begins with a period (.) then the string is interpreted as a file |
45 /// extension, otherwise it is interpreted as a MIME-type. An empty string or | 45 /// extension, otherwise it is interpreted as a MIME-type. An empty string or |
46 /// an undefined var may be given to indicate that all types should be | 46 /// an undefined var may be given to indicate that all types should be |
47 /// accepted. | 47 /// accepted. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // the caller is expecting. | 91 // the caller is expecting. |
92 // | 92 // |
93 // This takes a heap-allocated ChooseCallbackData0_5 struct passed as the | 93 // This takes a heap-allocated ChooseCallbackData0_5 struct passed as the |
94 // user data and deletes it when the call completes. | 94 // user data and deletes it when the call completes. |
95 static void CallbackConverter(void* user_data, int32_t result); | 95 static void CallbackConverter(void* user_data, int32_t result); |
96 }; | 96 }; |
97 | 97 |
98 } // namespace pp | 98 } // namespace pp |
99 | 99 |
100 #endif // PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ | 100 #endif // PPAPI_CPP_DEV_FILE_CHOOSER_DEV_H_ |
OLD | NEW |