| 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 20 matching lines...) Expand all Loading... |
| 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 public: | 42 public: |
| 42 static PassRefPtrWillBeRawPtr<DOMStringList> create() | 43 static PassRefPtrWillBeRawPtr<DOMStringList> create() |
| 43 { | 44 { |
| 44 return adoptRefWillBeNoop(new DOMStringList()); | 45 return adoptRefWillBeNoop(new DOMStringList()); |
| 45 } | 46 } |
| 46 | 47 |
| 47 bool isEmpty() const { return m_strings.isEmpty(); } | 48 bool isEmpty() const { return m_strings.isEmpty(); } |
| 48 void clear() { m_strings.clear(); } | 49 void clear() { m_strings.clear(); } |
| 49 void append(const String& string) { m_strings.append(string); } | 50 void append(const String& string) { m_strings.append(string); } |
| 50 void sort(); | 51 void sort(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 63 { | 64 { |
| 64 ScriptWrappable::init(this); | 65 ScriptWrappable::init(this); |
| 65 } | 66 } |
| 66 | 67 |
| 67 Vector<String> m_strings; | 68 Vector<String> m_strings; |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace blink | 71 } // namespace blink |
| 71 | 72 |
| 72 #endif // DOMStringList_h | 73 #endif // DOMStringList_h |
| 73 | |
| OLD | NEW |