| 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 10 matching lines...) Expand all Loading... |
| 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 DOMFileSystemSync_h | 31 #ifndef FileSystemSync_h |
| 32 #define DOMFileSystemSync_h | 32 #define FileSystemSync_h |
| 33 | 33 |
| 34 #include "bindings/core/v8/ScriptWrappable.h" | 34 #include "bindings/core/v8/ScriptWrappable.h" |
| 35 #include "modules/filesystem/DOMFileSystemBase.h" | 35 #include "modules/filesystem/FileSystemBase.h" |
| 36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class DirectoryEntrySync; | 40 class ExceptionState; |
| 41 class File; | 41 class File; |
| 42 class FileEntrySync; | 42 class FileSystemDirectoryEntrySync; |
| 43 class FileSystemFileEntrySync; |
| 43 class FileWriterSync; | 44 class FileWriterSync; |
| 44 class ExceptionState; | |
| 45 | 45 |
| 46 class DOMFileSystemSync final : public DOMFileSystemBase, | 46 class FileSystemSync final : public FileSystemBase, public ScriptWrappable { |
| 47 public ScriptWrappable { | |
| 48 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
| 49 | 48 |
| 50 public: | 49 public: |
| 51 static DOMFileSystemSync* create(ExecutionContext* context, | 50 static FileSystemSync* create(ExecutionContext* context, |
| 52 const String& name, | 51 const String& name, |
| 53 FileSystemType type, | 52 FileSystemType type, |
| 54 const KURL& rootURL) { | 53 const KURL& rootURL) { |
| 55 return new DOMFileSystemSync(context, name, type, rootURL); | 54 return new FileSystemSync(context, name, type, rootURL); |
| 56 } | 55 } |
| 57 | 56 |
| 58 static DOMFileSystemSync* create(DOMFileSystemBase*); | 57 static FileSystemSync* create(FileSystemBase*); |
| 59 | 58 |
| 60 ~DOMFileSystemSync() override; | 59 ~FileSystemSync() override; |
| 61 | 60 |
| 62 void reportError(ErrorCallbackBase*, FileError::ErrorCode) override; | 61 void reportError(ErrorCallbackBase*, FileError::ErrorCode) override; |
| 63 | 62 |
| 64 DirectoryEntrySync* root(); | 63 FileSystemDirectoryEntrySync* root(); |
| 65 | 64 |
| 66 File* createFile(const FileEntrySync*, ExceptionState&); | 65 File* createFile(const FileSystemFileEntrySync*, ExceptionState&); |
| 67 FileWriterSync* createWriter(const FileEntrySync*, ExceptionState&); | 66 FileWriterSync* createWriter(const FileSystemFileEntrySync*, ExceptionState&); |
| 68 | 67 |
| 69 DECLARE_VIRTUAL_TRACE(); | 68 DECLARE_VIRTUAL_TRACE(); |
| 70 | 69 |
| 71 private: | 70 private: |
| 72 DOMFileSystemSync(ExecutionContext*, | 71 FileSystemSync(ExecutionContext*, |
| 73 const String& name, | 72 const String& name, |
| 74 FileSystemType, | 73 FileSystemType, |
| 75 const KURL& rootURL); | 74 const KURL& rootURL); |
| 76 Member<DirectoryEntrySync> m_rootEntry; | 75 Member<FileSystemDirectoryEntrySync> m_rootEntry; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 } // namespace blink | 78 } // namespace blink |
| 80 | 79 |
| 81 #endif // DOMFileSystemSync_h | 80 #endif // FileSystemSync_h |
| OLD | NEW |