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 | 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 19 matching lines...) Expand all Loading... |
30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
31 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
32 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
33 #include "wtf/Vector.h" | 33 #include "wtf/Vector.h" |
34 #include "wtf/text/WTFString.h" | 34 #include "wtf/text/WTFString.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 // FIXME: Some consumers of this class may benefit from lazily fetching items ra
ther | 38 // FIXME: Some consumers of this class may benefit from lazily fetching items ra
ther |
39 // than creating the list statically as is currently the only option. | 39 // than creating the list statically as is currently the only option. |
40 class DOMStringList FINAL : public RefCountedWillBeGarbageCollectedFinalized<DOM
StringList>, public ScriptWrappable { | 40 class DOMStringList final : public RefCountedWillBeGarbageCollectedFinalized<DOM
StringList>, public ScriptWrappable { |
41 DEFINE_WRAPPERTYPEINFO(); | 41 DEFINE_WRAPPERTYPEINFO(); |
42 public: | 42 public: |
43 static PassRefPtrWillBeRawPtr<DOMStringList> create() | 43 static PassRefPtrWillBeRawPtr<DOMStringList> create() |
44 { | 44 { |
45 return adoptRefWillBeNoop(new DOMStringList()); | 45 return adoptRefWillBeNoop(new DOMStringList()); |
46 } | 46 } |
47 | 47 |
48 bool isEmpty() const { return m_strings.isEmpty(); } | 48 bool isEmpty() const { return m_strings.isEmpty(); } |
49 void clear() { m_strings.clear(); } | 49 void clear() { m_strings.clear(); } |
50 void append(const String& string) { m_strings.append(string); } | 50 void append(const String& string) { m_strings.append(string); } |
(...skipping 10 matching lines...) Expand all Loading... |
61 | 61 |
62 private: | 62 private: |
63 DOMStringList() { } | 63 DOMStringList() { } |
64 | 64 |
65 Vector<String> m_strings; | 65 Vector<String> m_strings; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
69 | 69 |
70 #endif // DOMStringList_h | 70 #endif // DOMStringList_h |
OLD | NEW |