OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #include "config.h" | 26 #include "config.h" |
27 #include "core/fileapi/FileList.h" | 27 #include "core/fileapi/FileList.h" |
28 | 28 |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 FileList::FileList() | 32 FileList::FileList() |
33 { | 33 { |
34 ScriptWrappable::init(this); | |
35 } | 34 } |
36 | 35 |
37 File* FileList::item(unsigned index) const | 36 File* FileList::item(unsigned index) const |
38 { | 37 { |
39 if (index >= m_files.size()) | 38 if (index >= m_files.size()) |
40 return 0; | 39 return 0; |
41 return m_files[index].get(); | 40 return m_files[index].get(); |
42 } | 41 } |
43 | 42 |
44 Vector<String> FileList::pathsForUserVisibleFiles() const | 43 Vector<String> FileList::pathsForUserVisibleFiles() const |
45 { | 44 { |
46 Vector<String> paths; | 45 Vector<String> paths; |
47 for (unsigned i = 0; i < m_files.size(); ++i) { | 46 for (unsigned i = 0; i < m_files.size(); ++i) { |
48 if (m_files[i]->userVisibility() == File::IsUserVisible) | 47 if (m_files[i]->userVisibility() == File::IsUserVisible) |
49 paths.append(m_files[i]->path()); | 48 paths.append(m_files[i]->path()); |
50 } | 49 } |
51 | 50 |
52 return paths; | 51 return paths; |
53 } | 52 } |
54 | 53 |
55 void FileList::trace(Visitor* visitor) | 54 void FileList::trace(Visitor* visitor) |
56 { | 55 { |
57 visitor->trace(m_files); | 56 visitor->trace(m_files); |
58 } | 57 } |
59 | 58 |
60 } // namespace blink | 59 } // namespace blink |
OLD | NEW |