#ifndef Location_h
#define Location_h
#include "DOMStringList.h"
#include "DOMWindowProperty.h"
#include "ScriptWrappable.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class DOMWindow;
class Frame;
class URL;
typedef int ExceptionCode;
class Location : public ScriptWrappable, public RefCounted<Location>, public DOMWindowProperty {
public:
static Ref<Location> create(Frame* frame) { return adoptRef(*new Location(frame)); }
void setHref(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String href() const;
void assign(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
void replace(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
void reload(DOMWindow& activeWindow);
void setProtocol(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&, ExceptionCode&);
String protocol() const;
void setHost(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String host() const;
void setHostname(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String hostname() const;
void setPort(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String port() const;
void setPathname(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String pathname() const;
void setSearch(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String search() const;
void setHash(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String hash() const;
String origin() const;
String toString() const { return href(); }
Ref<DOMStringList> ancestorOrigins() const;
private:
explicit Location(Frame*);
void setLocation(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
const URL& url() const;
};
}
#endif // Location_h