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