OLD | NEW |
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 17 matching lines...) Expand all Loading... |
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 #include "modules/filesystem/DirectoryEntry.h" | 31 #include "modules/filesystem/DirectoryEntry.h" |
32 | 32 |
33 #include "core/fileapi/FileError.h" | 33 #include "core/fileapi/FileError.h" |
34 #include "core/html/VoidCallback.h" | 34 #include "core/html/VoidCallback.h" |
35 #include "modules/filesystem/DirectoryReader.h" | 35 #include "modules/filesystem/DirectoryReader.h" |
36 #include "modules/filesystem/EntryCallback.h" | 36 #include "modules/filesystem/EntryCallback.h" |
37 #include "modules/filesystem/ErrorCallback.h" | 37 #include "modules/filesystem/ErrorCallback.h" |
| 38 #include "modules/filesystem/FileSystemCallbacks.h" |
38 #include "modules/filesystem/FileSystemFlags.h" | 39 #include "modules/filesystem/FileSystemFlags.h" |
39 | 40 |
40 namespace blink { | 41 namespace blink { |
41 | 42 |
42 DirectoryEntry::DirectoryEntry(DOMFileSystemBase* fileSystem, const String& full
Path) | 43 DirectoryEntry::DirectoryEntry(DOMFileSystemBase* fileSystem, const String& full
Path) |
43 : Entry(fileSystem, fullPath) | 44 : Entry(fileSystem, fullPath) |
44 { | 45 { |
45 } | 46 } |
46 | 47 |
47 DirectoryReader* DirectoryEntry::createReader() | 48 DirectoryReader* DirectoryEntry::createReader() |
48 { | 49 { |
49 return DirectoryReader::create(m_fileSystem, m_fullPath); | 50 return DirectoryReader::create(m_fileSystem, m_fullPath); |
50 } | 51 } |
51 | 52 |
52 void DirectoryEntry::getFile(const String& path, const FileSystemFlags& options,
EntryCallback* successCallback, ErrorCallback* errorCallback) | 53 void DirectoryEntry::getFile(const String& path, const FileSystemFlags& options,
EntryCallback* successCallback, ErrorCallback* errorCallback) |
53 { | 54 { |
54 m_fileSystem->getFile(this, path, options, successCallback, errorCallback); | 55 m_fileSystem->getFile(this, path, options, successCallback, ScriptErrorCallb
ack::wrap(errorCallback)); |
55 } | 56 } |
56 | 57 |
57 void DirectoryEntry::getDirectory(const String& path, const FileSystemFlags& opt
ions, EntryCallback* successCallback, ErrorCallback* errorCallback) | 58 void DirectoryEntry::getDirectory(const String& path, const FileSystemFlags& opt
ions, EntryCallback* successCallback, ErrorCallback* errorCallback) |
58 { | 59 { |
59 m_fileSystem->getDirectory(this, path, options, successCallback, errorCallba
ck); | 60 m_fileSystem->getDirectory(this, path, options, successCallback, ScriptError
Callback::wrap(errorCallback)); |
60 } | 61 } |
61 | 62 |
62 void DirectoryEntry::removeRecursively(VoidCallback* successCallback, ErrorCallb
ack* errorCallback) const | 63 void DirectoryEntry::removeRecursively(VoidCallback* successCallback, ErrorCallb
ack* errorCallback) const |
63 { | 64 { |
64 m_fileSystem->removeRecursively(this, successCallback, errorCallback); | 65 m_fileSystem->removeRecursively(this, successCallback, ScriptErrorCallback::
wrap(errorCallback)); |
65 } | 66 } |
66 | 67 |
67 DEFINE_TRACE(DirectoryEntry) | 68 DEFINE_TRACE(DirectoryEntry) |
68 { | 69 { |
69 Entry::trace(visitor); | 70 Entry::trace(visitor); |
70 } | 71 } |
71 | 72 |
72 } // namespace blink | 73 } // namespace blink |
OLD | NEW |