OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "core/fileapi/Blob.h" | 29 #include "core/fileapi/Blob.h" |
30 #include "wtf/PassRefPtr.h" | 30 #include "wtf/PassRefPtr.h" |
31 #include "wtf/text/WTFString.h" | 31 #include "wtf/text/WTFString.h" |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 struct FileMetadata; | 35 struct FileMetadata; |
36 class KURL; | 36 class KURL; |
37 | 37 |
38 class File : public Blob { | 38 class File FINAL : public Blob { |
39 public: | 39 public: |
40 // AllContentTypes should only be used when the full path/name are trusted;
otherwise, it could | 40 // AllContentTypes should only be used when the full path/name are trusted;
otherwise, it could |
41 // allow arbitrary pages to determine what applications an user has installe
d. | 41 // allow arbitrary pages to determine what applications an user has installe
d. |
42 enum ContentTypeLookupPolicy { | 42 enum ContentTypeLookupPolicy { |
43 WellKnownContentTypes, | 43 WellKnownContentTypes, |
44 AllContentTypes, | 44 AllContentTypes, |
45 }; | 45 }; |
46 | 46 |
47 static PassRefPtr<File> create(const String& path, ContentTypeLookupPolicy p
olicy = WellKnownContentTypes) | 47 static PassRefPtr<File> create(const String& path, ContentTypeLookupPolicy p
olicy = WellKnownContentTypes) |
48 { | 48 { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 const double m_snapshotModificationTime; | 128 const double m_snapshotModificationTime; |
129 | 129 |
130 String m_relativePath; | 130 String m_relativePath; |
131 }; | 131 }; |
132 | 132 |
133 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); | 133 DEFINE_TYPE_CASTS(File, Blob, blob, blob->isFile(), blob.isFile()); |
134 | 134 |
135 } // namespace WebCore | 135 } // namespace WebCore |
136 | 136 |
137 #endif // File_h | 137 #endif // File_h |
OLD | NEW |