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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/FileSystemDirectoryEntry.h

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef DirectoryEntry_h 31 #ifndef FileSystemDirectoryEntry_h
32 #define DirectoryEntry_h 32 #define FileSystemDirectoryEntry_h
33 33
34 #include "modules/ModulesExport.h" 34 #include "modules/ModulesExport.h"
35 #include "modules/filesystem/Entry.h" 35 #include "modules/filesystem/FileSystemEntry.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/text/WTFString.h" 37 #include "wtf/text/WTFString.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class DOMFileSystemBase;
42 class DirectoryReader;
43 class EntryCallback;
44 class ErrorCallback; 41 class ErrorCallback;
42 class FileSystemBase;
43 class FileSystemDirectoryReader;
44 class FileSystemEntryCallback;
45 class FileSystemFlags; 45 class FileSystemFlags;
46 class VoidCallback; 46 class VoidCallback;
47 47
48 class MODULES_EXPORT DirectoryEntry final : public Entry { 48 class MODULES_EXPORT FileSystemDirectoryEntry final : public FileSystemEntry {
49 DEFINE_WRAPPERTYPEINFO(); 49 DEFINE_WRAPPERTYPEINFO();
50 50
51 public: 51 public:
52 static DirectoryEntry* create(DOMFileSystemBase* fileSystem, 52 static FileSystemDirectoryEntry* create(FileSystemBase* fileSystem,
53 const String& fullPath) { 53 const String& fullPath) {
54 return new DirectoryEntry(fileSystem, fullPath); 54 return new FileSystemDirectoryEntry(fileSystem, fullPath);
55 } 55 }
56 bool isDirectory() const override { return true; } 56 bool isDirectory() const override { return true; }
57 57
58 DirectoryReader* createReader(); 58 FileSystemDirectoryReader* createReader();
59 void getFile(const String& path, 59 void getFile(const String& path,
60 const FileSystemFlags&, 60 const FileSystemFlags&,
61 EntryCallback* = nullptr, 61 FileSystemEntryCallback* = nullptr,
62 ErrorCallback* = nullptr); 62 ErrorCallback* = nullptr);
63 void getDirectory(const String& path, 63 void getDirectory(const String& path,
64 const FileSystemFlags&, 64 const FileSystemFlags&,
65 EntryCallback* = nullptr, 65 FileSystemEntryCallback* = nullptr,
66 ErrorCallback* = nullptr); 66 ErrorCallback* = nullptr);
67 void removeRecursively(VoidCallback* successCallback = nullptr, 67 void removeRecursively(VoidCallback* successCallback = nullptr,
68 ErrorCallback* = nullptr) const; 68 ErrorCallback* = nullptr) const;
69 69
70 DECLARE_VIRTUAL_TRACE(); 70 DECLARE_VIRTUAL_TRACE();
71 71
72 private: 72 private:
73 DirectoryEntry(DOMFileSystemBase*, const String& fullPath); 73 FileSystemDirectoryEntry(FileSystemBase*, const String& fullPath);
74 }; 74 };
75 75
76 DEFINE_TYPE_CASTS(DirectoryEntry, 76 DEFINE_TYPE_CASTS(FileSystemDirectoryEntry,
77 Entry, 77 FileSystemEntry,
78 entry, 78 entry,
79 entry->isDirectory(), 79 entry->isDirectory(),
80 entry.isDirectory()); 80 entry.isDirectory());
81 81
82 } // namespace blink 82 } // namespace blink
83 83
84 #endif // DirectoryEntry_h 84 #endif // FileSystemDirectoryEntry_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698