15af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke/* 25af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * Copyright (C) 2010 Google Inc. All rights reserved. 35af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * 45af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * Redistribution and use in source and binary forms, with or without 55af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * modification, are permitted provided that the following conditions are 65af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * met: 75af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * 85af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * * Redistributions of source code must retain the above copyright 95af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * notice, this list of conditions and the following disclaimer. 105af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * * Redistributions in binary form must reproduce the above 115af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * copyright notice, this list of conditions and the following disclaimer 125af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * in the documentation and/or other materials provided with the 135af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * distribution. 145af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * * Neither the name of Google Inc. nor the names of its 155af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * contributors may be used to endorse or promote products derived from 165af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * this software without specific prior written permission. 175af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * 185af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 195af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 205af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 215af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 225af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 235af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 245af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 255af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 265af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 275af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 285af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 295af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke */ 305af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 315af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#ifndef WebDOMStringList_h 325af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#define WebDOMStringList_h 335af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 345af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#include "WebCommon.h" 355af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#include "WebPrivatePtr.h" 365af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#include "WebString.h" 375af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 385af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkenamespace WebCore { class DOMStringList; } 395af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#if WEBKIT_IMPLEMENTATION 405af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkenamespace WTF { template <typename T> class PassRefPtr; } 415af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#endif 425af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 435af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkenamespace WebKit { 445af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 455af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkeclass WebDOMStringList { 465af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkepublic: 475af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke ~WebDOMStringList() { reset(); } 485af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 49db14019a23d96bc8a444b6576a5da8bd1cfbc8b0Steve Block WEBKIT_API WebDOMStringList(); 505af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WebDOMStringList(const WebDOMStringList& l) { assign(l); } 515af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WebDOMStringList& operator=(const WebDOMStringList& l) 525af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke { 535af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke assign(l); 545af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke return *this; 555af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke } 565af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 575af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WEBKIT_API void reset(); 585af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WEBKIT_API void assign(const WebDOMStringList&); 595af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 605af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WEBKIT_API void append(const WebString&); 615af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WEBKIT_API unsigned length() const; 625af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WEBKIT_API WebString item(unsigned) const; 635af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 645af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#if WEBKIT_IMPLEMENTATION 655af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WebDOMStringList(const WTF::PassRefPtr<WebCore::DOMStringList>&); 665af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WebDOMStringList& operator=(const WTF::PassRefPtr<WebCore::DOMStringList>&); 675af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke operator WTF::PassRefPtr<WebCore::DOMStringList>() const; 685af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#endif 695af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 705af96e2c7b73ebc627c6894727826a7576d31758Leon Clarkeprivate: 715af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke WebPrivatePtr<WebCore::DOMStringList> m_private; 725af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke}; 735af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 745af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke} // namespace WebKit 755af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke 765af96e2c7b73ebc627c6894727826a7576d31758Leon Clarke#endif 77