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

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

Issue 5674004: Add compile assertions to enforce the sizes of all structs and enums in the C... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ 5 #ifndef PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_
6 #define PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ 6 #define PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_macros.h"
10 #include "ppapi/c/pp_resource.h" 11 #include "ppapi/c/pp_resource.h"
11 12
12 struct PP_CompletionCallback; 13 struct PP_CompletionCallback;
13 14
14 typedef enum { 15 typedef enum {
15 PP_FILECHOOSERMODE_OPEN, 16 PP_FILECHOOSERMODE_OPEN,
16 PP_FILECHOOSERMODE_OPENMULTIPLE 17 PP_FILECHOOSERMODE_OPENMULTIPLE
17 // TODO(darin): Should there be a way to choose a directory? 18 // TODO(darin): Should there be a way to choose a directory?
18 } PP_FileChooserMode_Dev; 19 } PP_FileChooserMode_Dev;
20 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileChooserMode_Dev, 4);
19 21
20 struct PP_FileChooserOptions_Dev { 22 struct PP_FileChooserOptions_Dev {
21 PP_FileChooserMode_Dev mode; 23 PP_FileChooserMode_Dev mode;
22 24
23 // A comma-separated list of MIME types such as audio/*,text/plain. The 25 // A comma-separated list of MIME types such as audio/*,text/plain. The
24 // dialog may restrict selectable files to the specified MIME types. 26 // dialog may restrict selectable files to the specified MIME types.
25 // TODO(darin): What if the mime type is unknown to the system? The plugin 27 // TODO(darin): What if the mime type is unknown to the system? The plugin
26 // may wish to describe the mime type and provide a matching file extension. 28 // may wish to describe the mime type and provide a matching file extension.
27 // It is more webby to use mime types here instead of file extensions. 29 // It is more webby to use mime types here instead of file extensions.
28 const char* accept_mime_types; 30 const char* accept_mime_types;
(...skipping 27 matching lines...) Expand all
56 // chosen files. It should be called in a loop until it returns 0. 58 // chosen files. It should be called in a loop until it returns 0.
57 // Depending on the PP_ChooseFileMode requested when the FileChooser was 59 // Depending on the PP_ChooseFileMode requested when the FileChooser was
58 // created, the file refs will either be readable or writable. Their file 60 // created, the file refs will either be readable or writable. Their file
59 // system type will be PP_FileSystemType_External. If the user chose no 61 // system type will be PP_FileSystemType_External. If the user chose no
60 // files or cancelled the dialog, then this method will simply return 0 62 // files or cancelled the dialog, then this method will simply return 0
61 // the first time it is called. 63 // the first time it is called.
62 PP_Resource (*GetNextChosenFile)(PP_Resource chooser); 64 PP_Resource (*GetNextChosenFile)(PP_Resource chooser);
63 }; 65 };
64 66
65 #endif // PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_ 67 #endif // PPAPI_C_DEV_PPB_FILE_CHOOSER_DEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698