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 /** | 7 /** |
8 * This file defines the <code>PPB_FileChooser_Dev</code> interface. | 8 * This file defines the <code>PPB_FileChooser_Dev</code> interface. |
9 */ | 9 */ |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 interface PPB_FileChooser_Dev { | 32 interface PPB_FileChooser_Dev { |
33 /** | 33 /** |
34 * This function creates a file chooser dialog resource. The chooser is | 34 * This function creates a file chooser dialog resource. The chooser is |
35 * associated with a particular instance, so that it may be positioned on the | 35 * associated with a particular instance, so that it may be positioned on the |
36 * screen relative to the tab containing the instance. | 36 * screen relative to the tab containing the instance. |
37 * | 37 * |
38 * @param[in] instance A <code>PP_Instance</code> identifying one instance | 38 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
39 * of a module. | 39 * of a module. |
40 * @param[in] mode A <code>PP_FileChooserMode_Dev</code> value that controls | 40 * @param[in] mode A <code>PP_FileChooserMode_Dev</code> value that controls |
41 * the behavior of the file chooser dialog. | 41 * the behavior of the file chooser dialog. |
42 * @param[in] accept_mime_types A comma-separated list of MIME types such as | 42 * @param[in] accept_types A comma-separated list of MIME types and file |
43 * "audio/ *,text/plain" (note there should be no space between the '/' and | 43 * extensions such as "audio/ *,text/plain,.html" (note there should be no |
44 * the '*', but one is added to avoid confusing C++ comments). The dialog | 44 * space between the '/' and the '*', but one is added to avoid confusing C++ |
45 * may restrict selectable files to the specified MIME types. An empty string | 45 * comments). The dialog may restrict selectable files to the specified MIME |
46 * or an undefined var may be given to indicate that all types should be | 46 * types and file extensions. If a string in the comma-separated list begins |
47 * accepted. | 47 * with a period (.) then the string is interpreted as a file extension, |
| 48 * otherwise it is interpreted as a MIME-type. An empty string or an undefined |
| 49 * var may be given to indicate that all types should be accepted. |
48 * | 50 * |
49 * @return A <code>PP_Resource</code> containing the file chooser if | 51 * @return A <code>PP_Resource</code> containing the file chooser if |
50 * successful or 0 if it could not be created. | 52 * successful or 0 if it could not be created. |
51 */ | 53 */ |
52 PP_Resource Create( | 54 PP_Resource Create( |
53 [in] PP_Instance instance, | 55 [in] PP_Instance instance, |
54 [in] PP_FileChooserMode_Dev mode, | 56 [in] PP_FileChooserMode_Dev mode, |
55 [in] PP_Var accept_mime_types); | 57 [in] PP_Var accept_types); |
56 | 58 |
57 /** | 59 /** |
58 * Determines if the provided resource is a file chooser. | 60 * Determines if the provided resource is a file chooser. |
59 * | 61 * |
60 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic | 62 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic |
61 * resource. | 63 * resource. |
62 * | 64 * |
63 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given | 65 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given |
64 * resource is a file chooser resource, otherwise <code>PP_FALSE</code>. | 66 * resource is a file chooser resource, otherwise <code>PP_FALSE</code>. |
65 */ | 67 */ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 * | 123 * |
122 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was | 124 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was |
123 * successful, another error code from pp_errors.h on failure. | 125 * successful, another error code from pp_errors.h on failure. |
124 */ | 126 */ |
125 [version=0.6] | 127 [version=0.6] |
126 int32_t Show([in] PP_Resource chooser, | 128 int32_t Show([in] PP_Resource chooser, |
127 [in] PP_ArrayOutput output, | 129 [in] PP_ArrayOutput output, |
128 [in] PP_CompletionCallback callback); | 130 [in] PP_CompletionCallback callback); |
129 }; | 131 }; |
130 | 132 |
OLD | NEW |