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 15 matching lines...) Expand all Loading... |
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 DirectoryReaderBase_h | 31 #ifndef DirectoryReaderBase_h |
32 #define DirectoryReaderBase_h | 32 #define DirectoryReaderBase_h |
33 | 33 |
34 #include "modules/filesystem/DOMFileSystemBase.h" | 34 #include "modules/filesystem/DOMFileSystemBase.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 #include "wtf/RefCounted.h" | |
37 #include "wtf/text/WTFString.h" | 36 #include "wtf/text/WTFString.h" |
38 | 37 |
39 namespace WebCore { | 38 namespace WebCore { |
40 | 39 |
41 class DirectoryReaderBase : public RefCountedWillBeGarbageCollectedFinalized<Dir
ectoryReaderBase> { | 40 class DirectoryReaderBase : public GarbageCollectedFinalized<DirectoryReaderBase
> { |
42 public: | 41 public: |
43 DOMFileSystemBase* filesystem() const { return m_fileSystem.get(); } | 42 DOMFileSystemBase* filesystem() const { return m_fileSystem.get(); } |
44 void setHasMoreEntries(bool hasMoreEntries) { m_hasMoreEntries = hasMoreEntr
ies; } | 43 void setHasMoreEntries(bool hasMoreEntries) { m_hasMoreEntries = hasMoreEntr
ies; } |
45 | 44 |
46 virtual ~DirectoryReaderBase() { } | 45 virtual ~DirectoryReaderBase() { } |
47 | 46 |
48 virtual void trace(Visitor* visitor) | 47 virtual void trace(Visitor* visitor) |
49 { | 48 { |
50 visitor->trace(m_fileSystem); | 49 visitor->trace(m_fileSystem); |
51 } | 50 } |
52 | 51 |
53 protected: | 52 protected: |
54 DirectoryReaderBase(PassRefPtrWillBeRawPtr<DOMFileSystemBase> fileSystem, co
nst String& fullPath) | 53 DirectoryReaderBase(DOMFileSystemBase* fileSystem, const String& fullPath) |
55 : m_fileSystem(fileSystem) | 54 : m_fileSystem(fileSystem) |
56 , m_fullPath(fullPath) | 55 , m_fullPath(fullPath) |
57 , m_hasMoreEntries(true) | 56 , m_hasMoreEntries(true) |
58 { | 57 { |
59 } | 58 } |
60 | 59 |
61 RefPtrWillBeMember<DOMFileSystemBase> m_fileSystem; | 60 Member<DOMFileSystemBase> m_fileSystem; |
62 | 61 |
63 // This is a virtual path. | 62 // This is a virtual path. |
64 String m_fullPath; | 63 String m_fullPath; |
65 | 64 |
66 bool m_hasMoreEntries; | 65 bool m_hasMoreEntries; |
67 }; | 66 }; |
68 | 67 |
69 } // namespace WebCore | 68 } // namespace WebCore |
70 | 69 |
71 #endif // DirectoryReaderBase_h | 70 #endif // DirectoryReaderBase_h |
OLD | NEW |