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 |
11 label Chrome { | 11 label Chrome { |
12 M16 = 0.5 | 12 M16 = 0.5, |
| 13 M19 = 0.6 |
13 }; | 14 }; |
14 | 15 |
15 /** | 16 /** |
16 * This enumeration contains constants to control the behavior of the file | 17 * This enumeration contains constants to control the behavior of the file |
17 * chooser dialog. | 18 * chooser dialog. |
18 */ | 19 */ |
19 [assert_size(4)] | 20 [assert_size(4)] |
20 enum PP_FileChooserMode_Dev { | 21 enum PP_FileChooserMode_Dev { |
21 /** | 22 /** |
22 * Mode for choosing a single existing file. | 23 * Mode for choosing a single existing file. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 * with a file (or files) selected, PP_ERROR_USERCANCEL if the user selected | 74 * with a file (or files) selected, PP_ERROR_USERCANCEL if the user selected |
74 * no file, or another error code from pp_errors.h on failure. | 75 * no file, or another error code from pp_errors.h on failure. |
75 * | 76 * |
76 * @param[in] chooser The file chooser resource. | 77 * @param[in] chooser The file chooser resource. |
77 * @param[in] callback A <code>CompletionCallback</code> to be called after | 78 * @param[in] callback A <code>CompletionCallback</code> to be called after |
78 * the user has closed the file chooser dialog. | 79 * the user has closed the file chooser dialog. |
79 * | 80 * |
80 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was | 81 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was |
81 * successful, another error code from pp_errors.h on failure. | 82 * successful, another error code from pp_errors.h on failure. |
82 */ | 83 */ |
| 84 [deprecate=0.6] |
83 int32_t Show( | 85 int32_t Show( |
84 [in] PP_Resource chooser, | 86 [in] PP_Resource chooser, |
85 [in] PP_CompletionCallback callback); | 87 [in] PP_CompletionCallback callback); |
86 | 88 |
87 /** | 89 /** |
88 * After a successful completion callback call from Show, this method may be | 90 * After a successful completion callback call from Show, this method may be |
89 * used to query the chosen files. It should be called in a loop until it | 91 * used to query the chosen files. It should be called in a loop until it |
90 * returns 0. Their file system type will be PP_FileSystemType_External. If | 92 * returns 0. Their file system type will be PP_FileSystemType_External. If |
91 * the user chose no files or canceled the dialog, then this method will | 93 * the user chose no files or canceled the dialog, then this method will |
92 * simply return 0 the first time it is called. | 94 * simply return 0 the first time it is called. |
93 * | 95 * |
94 * @param[in] chooser The file chooser resource. | 96 * @param[in] chooser The file chooser resource. |
95 * | 97 * |
96 * @return A <code>PP_Resource</code> containing the next file chosen by the | 98 * @return A <code>PP_Resource</code> containing the next file chosen by the |
97 * user, or 0 if there are no more files. | 99 * user, or 0 if there are no more files. |
98 */ | 100 */ |
| 101 [deprecate=0.6] |
99 PP_Resource GetNextChosenFile( | 102 PP_Resource GetNextChosenFile( |
100 [in] PP_Resource chooser); | 103 [in] PP_Resource chooser); |
| 104 |
| 105 /** |
| 106 * This function displays a previously created file chooser resource as a |
| 107 * dialog box, prompting the user to choose a file or files. This function |
| 108 * must be called in response to a user gesture, such as a mouse click or |
| 109 * touch event. The callback is called with PP_OK on successful completion |
| 110 * with a file (or files) selected, PP_ERROR_USERCANCEL if the user selected |
| 111 * no file, or another error code from pp_errors.h on failure. |
| 112 * |
| 113 * @param[in] chooser The file chooser resource. |
| 114 * |
| 115 * @param[in] output An output array which will receive PP_Resource(s) |
| 116 * identifying the <code>PPB_FileRef</code> objects that the user selected on |
| 117 * success. |
| 118 * |
| 119 * @param[in] callback A <code>CompletionCallback</code> to be called after |
| 120 * the user has closed the file chooser dialog. |
| 121 * |
| 122 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was |
| 123 * successful, another error code from pp_errors.h on failure. |
| 124 */ |
| 125 [version=0.6] |
| 126 int32_t Show([in] PP_Resource chooser, |
| 127 [in] PP_ArrayOutput output, |
| 128 [in] PP_CompletionCallback callback); |
101 }; | 129 }; |
102 | 130 |
OLD | NEW |