OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 12 matching lines...) Expand all Loading... | |
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 * | 27 * |
28 */ | 28 */ |
29 | 29 |
30 #ifndef FileChooser_h | 30 #ifndef FileChooser_h |
31 #define FileChooser_h | 31 #define FileChooser_h |
32 | 32 |
33 #include "platform/FileMetadata.h" | |
33 #include "platform/PlatformExport.h" | 34 #include "platform/PlatformExport.h" |
35 #include "platform/weborigin/KURL.h" | |
34 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
35 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
36 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
37 | 39 |
38 namespace blink { | 40 namespace blink { |
39 | 41 |
40 class FileChooser; | 42 class FileChooser; |
41 | 43 |
42 struct FileChooserFileInfo { | 44 struct FileChooserFileInfo { |
43 FileChooserFileInfo(const String& path, const String& displayName = String() ) | 45 FileChooserFileInfo(const String& path, const String& displayName = String() ) |
44 : path(path) | 46 : path(path) |
45 , displayName(displayName) | 47 , displayName(displayName) |
46 { | 48 { |
47 } | 49 } |
48 | 50 |
51 FileChooserFileInfo(const KURL& fileSystemURL, const FileMetadata metadata) : fileSystemURL(fileSystemURL), metadata(metadata) | |
52 { | |
53 } | |
54 | |
49 const String path; | 55 const String path; |
50 const String displayName; | 56 const String displayName; |
57 const KURL fileSystemURL; | |
58 const FileMetadata metadata; | |
tkent
2014/10/17 00:20:22
Please add a comment that |metadata| is available
hirono
2014/10/17 09:30:58
The path and displayName properties are also avail
| |
51 }; | 59 }; |
52 | 60 |
53 struct FileChooserSettings { | 61 struct FileChooserSettings { |
54 bool allowsMultipleFiles; | 62 bool allowsMultipleFiles; |
55 bool allowsDirectoryUpload; | 63 bool allowsDirectoryUpload; |
56 Vector<String> acceptMIMETypes; | 64 Vector<String> acceptMIMETypes; |
57 Vector<String> acceptFileExtensions; | 65 Vector<String> acceptFileExtensions; |
58 Vector<String> selectedFiles; | 66 Vector<String> selectedFiles; |
59 bool useMediaCapture; | 67 bool useMediaCapture; |
60 | 68 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 private: | 102 private: |
95 FileChooser(FileChooserClient*, const FileChooserSettings&); | 103 FileChooser(FileChooserClient*, const FileChooserSettings&); |
96 | 104 |
97 FileChooserClient* m_client; | 105 FileChooserClient* m_client; |
98 FileChooserSettings m_settings; | 106 FileChooserSettings m_settings; |
99 }; | 107 }; |
100 | 108 |
101 } // namespace blink | 109 } // namespace blink |
102 | 110 |
103 #endif // FileChooser_h | 111 #endif // FileChooser_h |
OLD | NEW |