| 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 14 matching lines...) Expand all Loading... |
| 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 EntryArraySync_h | 31 #ifndef EntryArraySync_h |
| 32 #define EntryArraySync_h | 32 #define EntryArraySync_h |
| 33 | 33 |
| 34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
| 35 #include "modules/filesystem/EntriesCallback.h" |
| 35 #include "modules/filesystem/EntrySync.h" | 36 #include "modules/filesystem/EntrySync.h" |
| 36 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
| 37 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
| 38 | 39 |
| 39 namespace WebCore { | 40 namespace WebCore { |
| 40 | 41 |
| 41 class EntryArray; | |
| 42 | |
| 43 class EntryArraySync : public RefCounted<EntryArraySync>, public ScriptWrappable
{ | 42 class EntryArraySync : public RefCounted<EntryArraySync>, public ScriptWrappable
{ |
| 44 public: | 43 public: |
| 45 static PassRefPtr<EntryArraySync> create() | 44 static PassRefPtr<EntryArraySync> create() |
| 46 { | 45 { |
| 47 return adoptRef(new EntryArraySync()); | 46 return adoptRef(new EntryArraySync()); |
| 48 } | 47 } |
| 49 | 48 |
| 50 static PassRefPtr<EntryArraySync> create(EntryArray*); | 49 static PassRefPtr<EntryArraySync> create(const EntryVector&); |
| 51 | 50 |
| 52 unsigned length() const { return m_entries.size(); } | 51 unsigned length() const { return m_entries.size(); } |
| 53 EntrySync* item(unsigned index) const; | 52 EntrySync* item(unsigned index) const; |
| 54 | 53 |
| 55 bool isEmpty() const { return m_entries.isEmpty(); } | 54 bool isEmpty() const { return m_entries.isEmpty(); } |
| 56 void clear() { m_entries.clear(); } | 55 void clear() { m_entries.clear(); } |
| 57 void append(PassRefPtr<EntrySync> entry) { m_entries.append(entry); } | 56 void append(PassRefPtr<EntrySync> entry) { m_entries.append(entry); } |
| 58 | 57 |
| 59 private: | 58 private: |
| 60 EntryArraySync(); | 59 EntryArraySync(); |
| 61 | 60 |
| 62 Vector<RefPtr<EntrySync> > m_entries; | 61 Vector<RefPtr<EntrySync> > m_entries; |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } | 64 } |
| 66 | 65 |
| 67 #endif // EntryArraySync_h | 66 #endif // EntryArraySync_h |
| OLD | NEW |