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.
18 [macro
="PPB_FILECHOOSER_TRUSTED_INTERFACE"]
19 interface PPB_FileChooserTrusted
{
21 * This function displays a previously created file chooser resource as a
22 * dialog box, prompting the user to choose a file or files to open, or a
23 * single file for saving. The callback is called with PP_OK on successful
24 * completion with a file (or files) selected or PP_ERROR_USERCANCEL if the
25 * user selected no file.
27 * @param[in] chooser The file chooser resource.
28 * @param[in] save_as A <code>PP_Bool</code> value indicating if this dialog
29 * is choosing a file for saving.
30 * @param[in] suggested_file_name If saving, the suggested name for the
31 * file, otherwise, null or undefined.
32 * @param[in] callback A <code>CompletionCallback</code> to be called after
33 * the user has closed the file chooser dialog.
35 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was
36 * successful, another error code from pp_errors.h on failure.
39 int32_t ShowWithoutUserGesture
(
40 [in] PP_Resource chooser
,
42 [in] PP_Var suggested_file_name
,
43 [in] PP_CompletionCallback
callback);
46 * This function displays a previously created file chooser resource as a
47 * dialog box, prompting the user to choose a file or files to open, or a
48 * single file for saving. The callback is called with PP_OK on successful
49 * completion with a file (or files) selected or PP_ERROR_USERCANCEL if the
50 * user selected no file.
52 * @param[in] chooser The file chooser resource.
53 * @param[in] save_as A <code>PP_Bool</code> value indicating if this dialog
54 * is choosing a file for saving.
55 * @param[in] suggested_file_name If saving, the suggested name for the
56 * file, otherwise, null or undefined.
57 * @param[in] callback A <code>CompletionCallback</code> to be called after
58 * the user has closed the file chooser dialog.
60 * @return PP_OK_COMPLETIONPENDING if request to show the dialog was
61 * successful, another error code from pp_errors.h on failure.
64 int32_t ShowWithoutUserGesture
(
65 [in] PP_Resource chooser
,
67 [in] PP_Var suggested_file_name
,
68 [in] PP_ArrayOutput output
,
69 [in] PP_CompletionCallback
callback);