Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: Source/core/fileapi/FileList.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/fileapi/FileError.cpp ('k') | Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/fileapi/FileError.cpp ('k') | Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698