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
3 * found in the LICENSE file.
8 * This file defines the <code>PPB_FileChooser_Trusted</code> interface.
16 [macro
="PPB_FILECHOOSER_TRUSTED_INTERFACE"]
17 interface PPB_FileChooserTrusted
{
19 * This function displays a previously created file chooser resource as a
20 * dialog box, prompting the user to choose a file or files to open, or a
21 * single file for saving. The callback is called with PP_OK on successful
22 * completion with a file (or files) selected or PP_ERROR_USERCANCEL if the
23 * user selected no file.
25 * @param[in] chooser The file chooser resource.
26 * @param[in] save_as A <code>PP_Bool</code> value indicating if this dialog
27 * is choosing a file for saving.
28 * @param[in] suggested_file_name If saving, the suggested name for the
29 * file, otherwise, null or undefined.
30 * @param[in] callback A <code>CompletionCallback</code> to be called after
31 * the user has closed the file chooser dialog.
33 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was
34 * successful, another error code from pp_errors.h on failure.
37 int32_t ShowWithoutUserGesture
(
38 [in] PP_Resource chooser
,
40 [in] PP_Var suggested_file_name
,
41 [in] PP_CompletionCallback
callback);
44 * This function displays a previously created file chooser resource as a
45 * dialog box, prompting the user to choose a file or files to open, or a
46 * single file for saving. The callback is called with PP_OK on successful
47 * completion with a file (or files) selected or PP_ERROR_USERCANCEL if the
48 * user selected no file.
50 * @param[in] chooser The file chooser resource.
51 * @param[in] save_as A <code>PP_Bool</code> value indicating if this dialog
52 * is choosing a file for saving.
53 * @param[in] suggested_file_name If saving, the suggested name for the
54 * file, otherwise, null or undefined.
55 * @param[in] callback A <code>CompletionCallback</code> to be called after
56 * the user has closed the file chooser dialog.
58 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was
59 * successful, another error code from pp_errors.h on failure.
62 int32_t ShowWithoutUserGesture
(
63 [in] PP_Resource chooser
,
65 [in] PP_Var suggested_file_name
,
66 [in] PP_ArrayOutput output
,
67 [in] PP_CompletionCallback
callback);