| 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 20 matching lines...) Expand all Loading... |
| 31 #ifndef FileEntry_h | 31 #ifndef FileEntry_h |
| 32 #define FileEntry_h | 32 #define FileEntry_h |
| 33 | 33 |
| 34 #include "modules/ModulesExport.h" | 34 #include "modules/ModulesExport.h" |
| 35 #include "modules/filesystem/Entry.h" | 35 #include "modules/filesystem/Entry.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 DOMFileSystemBase; | 40 class DOMFileSystemBase; |
| 41 class FileCallback; | 41 class BlobCallback; |
| 42 class FileWriterCallback; | 42 class FileWriterCallback; |
| 43 | 43 |
| 44 class MODULES_EXPORT FileEntry final : public Entry { | 44 class MODULES_EXPORT FileEntry final : public Entry { |
| 45 DEFINE_WRAPPERTYPEINFO(); | 45 DEFINE_WRAPPERTYPEINFO(); |
| 46 public: | 46 public: |
| 47 static FileEntry* create(DOMFileSystemBase* fileSystem, const String& fullPa
th) | 47 static FileEntry* create(DOMFileSystemBase* fileSystem, const String& fullPa
th) |
| 48 { | 48 { |
| 49 return new FileEntry(fileSystem, fullPath); | 49 return new FileEntry(fileSystem, fullPath); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void createWriter(FileWriterCallback*, ErrorCallback* = nullptr); | 52 void createWriter(FileWriterCallback*, ErrorCallback* = nullptr); |
| 53 void file(FileCallback*, ErrorCallback* = nullptr); | 53 void file(BlobCallback*, ErrorCallback* = nullptr); |
| 54 | 54 |
| 55 bool isFile() const override { return true; } | 55 bool isFile() const override { return true; } |
| 56 | 56 |
| 57 DECLARE_VIRTUAL_TRACE(); | 57 DECLARE_VIRTUAL_TRACE(); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 FileEntry(DOMFileSystemBase*, const String& fullPath); | 60 FileEntry(DOMFileSystemBase*, const String& fullPath); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 DEFINE_TYPE_CASTS(FileEntry, Entry, entry, entry->isFile(), entry.isFile()); | 63 DEFINE_TYPE_CASTS(FileEntry, Entry, entry, entry->isFile(), entry.isFile()); |
| 64 | 64 |
| 65 } // namespace blink | 65 } // namespace blink |
| 66 | 66 |
| 67 #endif // FileEntry_h | 67 #endif // FileEntry_h |
| OLD | NEW |