Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: ppapi/c/dev/ppb_file_chooser_dev.h

Issue 10414085: Modified the pepper file chooser API to support filtering files by extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/api/dev/ppb_file_chooser_dev.idl ('k') | ppapi/cpp/dev/file_chooser_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 dev/ppb_file_chooser_dev.idl modified Thu Mar 15 09:29:39 2012. */ 6 /* From dev/ppb_file_chooser_dev.idl modified Thu May 17 09:04:27 2012. */
7 7
8 #ifndef PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ 8 #ifndef PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_
9 #define PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ 9 #define PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_
10 10
11 #include "ppapi/c/pp_array_output.h" 11 #include "ppapi/c/pp_array_output.h"
12 #include "ppapi/c/pp_bool.h" 12 #include "ppapi/c/pp_bool.h"
13 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.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"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 struct PPB_FileChooser_Dev_0_6 { 57 struct PPB_FileChooser_Dev_0_6 {
58 /** 58 /**
59 * This function creates a file chooser dialog resource. The chooser is 59 * This function creates a file chooser dialog resource. The chooser is
60 * associated with a particular instance, so that it may be positioned on the 60 * associated with a particular instance, so that it may be positioned on the
61 * screen relative to the tab containing the instance. 61 * screen relative to the tab containing the instance.
62 * 62 *
63 * @param[in] instance A <code>PP_Instance</code> identifying one instance 63 * @param[in] instance A <code>PP_Instance</code> identifying one instance
64 * of a module. 64 * of a module.
65 * @param[in] mode A <code>PP_FileChooserMode_Dev</code> value that controls 65 * @param[in] mode A <code>PP_FileChooserMode_Dev</code> value that controls
66 * the behavior of the file chooser dialog. 66 * the behavior of the file chooser dialog.
67 * @param[in] accept_mime_types A comma-separated list of MIME types such as 67 * @param[in] accept_types A comma-separated list of MIME types and file
68 * "audio/ *,text/plain" (note there should be no space between the '/' and 68 * extensions such as "audio/ *,text/plain,.html" (note there should be no
69 * the '*', but one is added to avoid confusing C++ comments). The dialog 69 * space between the '/' and the '*', but one is added to avoid confusing C++
70 * may restrict selectable files to the specified MIME types. An empty string 70 * comments). The dialog may restrict selectable files to the specified MIME
71 * or an undefined var may be given to indicate that all types should be 71 * types and file extensions. If a string in the comma-separated list begins
72 * accepted. 72 * with a period (.) then the string is interpreted as a file extension,
73 * otherwise it is interpreted as a MIME-type. An empty string or an undefined
74 * var may be given to indicate that all types should be accepted.
73 * 75 *
74 * @return A <code>PP_Resource</code> containing the file chooser if 76 * @return A <code>PP_Resource</code> containing the file chooser if
75 * successful or 0 if it could not be created. 77 * successful or 0 if it could not be created.
76 */ 78 */
77 PP_Resource (*Create)(PP_Instance instance, 79 PP_Resource (*Create)(PP_Instance instance,
78 PP_FileChooserMode_Dev mode, 80 PP_FileChooserMode_Dev mode,
79 struct PP_Var accept_mime_types); 81 struct PP_Var accept_types);
80 /** 82 /**
81 * Determines if the provided resource is a file chooser. 83 * Determines if the provided resource is a file chooser.
82 * 84 *
83 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic 85 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
84 * resource. 86 * resource.
85 * 87 *
86 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given 88 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given
87 * resource is a file chooser resource, otherwise <code>PP_FALSE</code>. 89 * resource is a file chooser resource, otherwise <code>PP_FALSE</code>.
88 */ 90 */
89 PP_Bool (*IsFileChooser)(PP_Resource resource); 91 PP_Bool (*IsFileChooser)(PP_Resource resource);
(...skipping 20 matching lines...) Expand all
110 int32_t (*Show)(PP_Resource chooser, 112 int32_t (*Show)(PP_Resource chooser,
111 struct PP_ArrayOutput output, 113 struct PP_ArrayOutput output,
112 struct PP_CompletionCallback callback); 114 struct PP_CompletionCallback callback);
113 }; 115 };
114 116
115 typedef struct PPB_FileChooser_Dev_0_6 PPB_FileChooser_Dev; 117 typedef struct PPB_FileChooser_Dev_0_6 PPB_FileChooser_Dev;
116 118
117 struct PPB_FileChooser_Dev_0_5 { 119 struct PPB_FileChooser_Dev_0_5 {
118 PP_Resource (*Create)(PP_Instance instance, 120 PP_Resource (*Create)(PP_Instance instance,
119 PP_FileChooserMode_Dev mode, 121 PP_FileChooserMode_Dev mode,
120 struct PP_Var accept_mime_types); 122 struct PP_Var accept_types);
121 PP_Bool (*IsFileChooser)(PP_Resource resource); 123 PP_Bool (*IsFileChooser)(PP_Resource resource);
122 int32_t (*Show)(PP_Resource chooser, struct PP_CompletionCallback callback); 124 int32_t (*Show)(PP_Resource chooser, struct PP_CompletionCallback callback);
123 PP_Resource (*GetNextChosenFile)(PP_Resource chooser); 125 PP_Resource (*GetNextChosenFile)(PP_Resource chooser);
124 }; 126 };
125 /** 127 /**
126 * @} 128 * @}
127 */ 129 */
128 130
129 #endif /* PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ */ 131 #endif /* PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ */
130 132
OLDNEW
« no previous file with comments | « ppapi/api/dev/ppb_file_chooser_dev.idl ('k') | ppapi/cpp/dev/file_chooser_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698