OLD | NEW |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 /* From trusted/ppb_file_chooser_trusted.idl modified Tue Oct 11 11:43:26 2011.
*/ | 6 /* From trusted/ppb_file_chooser_trusted.idl modified Wed Oct 12 17:01:17 2011.
*/ |
7 | 7 |
8 #ifndef PPAPI_C_TRUSTED_PPB_FILE_CHOOSER_TRUSTED_H_ | 8 #ifndef PPAPI_C_TRUSTED_PPB_FILE_CHOOSER_TRUSTED_H_ |
9 #define PPAPI_C_TRUSTED_PPB_FILE_CHOOSER_TRUSTED_H_ | 9 #define PPAPI_C_TRUSTED_PPB_FILE_CHOOSER_TRUSTED_H_ |
10 | 10 |
11 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
13 #include "ppapi/c/pp_macros.h" | 13 #include "ppapi/c/pp_macros.h" |
14 #include "ppapi/c/pp_resource.h" | 14 #include "ppapi/c/pp_resource.h" |
15 #include "ppapi/c/pp_stdint.h" | 15 #include "ppapi/c/pp_stdint.h" |
16 #include "ppapi/c/pp_var.h" | 16 #include "ppapi/c/pp_var.h" |
17 | 17 |
18 #define PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5 "PPB_FileChooserTrusted;0.5" | 18 #define PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5 "PPB_FileChooserTrusted;0.5" |
19 #define PPB_FILECHOOSER_TRUSTED_INTERFACE PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5 | 19 #define PPB_FILECHOOSER_TRUSTED_INTERFACE PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5 |
20 | 20 |
21 /** | 21 /** |
22 * @file | 22 * @file |
23 * This file defines the <code>PPB_FileChooser_Trusted</code> interface. | 23 * This file defines the <code>PPB_FileChooser_Trusted</code> interface. |
24 */ | 24 */ |
25 | 25 |
26 | 26 |
27 /** | 27 /** |
28 * @addtogroup Interfaces | 28 * @addtogroup Interfaces |
29 * @{ | 29 * @{ |
30 */ | 30 */ |
31 struct PPB_FileChooserTrusted { | 31 struct PPB_FileChooserTrusted_0_5 { |
32 /** | 32 /** |
33 * This function displays a previously created file chooser resource as a | 33 * This function displays a previously created file chooser resource as a |
34 * dialog box, prompting the user to choose a file or files to open, or a | 34 * dialog box, prompting the user to choose a file or files to open, or a |
35 * single file for saving. The callback is called with PP_OK on successful | 35 * single file for saving. The callback is called with PP_OK on successful |
36 * completion with a file (or files) selected or PP_ERROR_USERCANCEL if the | 36 * completion with a file (or files) selected or PP_ERROR_USERCANCEL if the |
37 * user selected no file. | 37 * user selected no file. |
38 * | 38 * |
39 * @param[in] chooser The file chooser resource. | 39 * @param[in] chooser The file chooser resource. |
40 * @param[in] save_as A <code>PP_Bool</code> value indicating if this dialog | 40 * @param[in] save_as A <code>PP_Bool</code> value indicating if this dialog |
41 * is choosing a file for saving. | 41 * is choosing a file for saving. |
42 * @param[in] suggested_file_name If saving, the suggested name for the | 42 * @param[in] suggested_file_name If saving, the suggested name for the |
43 * file, otherwise, null or undefined. | 43 * file, otherwise, null or undefined. |
44 * @param[in] callback A <code>CompletionCallback</code> to be called after | 44 * @param[in] callback A <code>CompletionCallback</code> to be called after |
45 * the user has closed the file chooser dialog. | 45 * the user has closed the file chooser dialog. |
46 * | 46 * |
47 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was | 47 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was |
48 * successful, another error code from pp_errors.h on failure. | 48 * successful, another error code from pp_errors.h on failure. |
49 */ | 49 */ |
50 int32_t (*ShowWithoutUserGesture)(PP_Resource chooser, | 50 int32_t (*ShowWithoutUserGesture)(PP_Resource chooser, |
51 PP_Bool save_as, | 51 PP_Bool save_as, |
52 struct PP_Var suggested_file_name, | 52 struct PP_Var suggested_file_name, |
53 struct PP_CompletionCallback callback); | 53 struct PP_CompletionCallback callback); |
54 }; | 54 }; |
| 55 |
| 56 typedef struct PPB_FileChooserTrusted_0_5 PPB_FileChooserTrusted; |
55 /** | 57 /** |
56 * @} | 58 * @} |
57 */ | 59 */ |
58 | 60 |
59 #endif /* PPAPI_C_TRUSTED_PPB_FILE_CHOOSER_TRUSTED_H_ */ | 61 #endif /* PPAPI_C_TRUSTED_PPB_FILE_CHOOSER_TRUSTED_H_ */ |
60 | 62 |
OLD | NEW |