* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DOMStringList_h
-#define DOMStringList_h
+#pragma once
-#include "PlatformString.h"
-#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
+#include <wtf/text/WTFString.h>
namespace WebCore {
// than creating the list statically as is currently the only option.
class DOMStringList : public RefCounted<DOMStringList> {
public:
- static PassRefPtr<DOMStringList> create()
+ static Ref<DOMStringList> create()
{
- return adoptRef(new DOMStringList());
+ return adoptRef(*new DOMStringList);
}
bool isEmpty() const { return m_strings.isEmpty(); }
String item(unsigned index) const;
bool contains(const String& str) const;
+ operator const Vector<String>&() const { return m_strings; }
+
private:
DOMStringList() { }
};
} // namespace WebCore
-
-#endif // DOMStringList_h
-