#ifndef Location_h
#define Location_h
#include "bindings/v8/ScriptWrappable.h"
#include "core/dom/DOMStringList.h"
#include "core/frame/DOMWindowProperty.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
class DOMWindow;
class ExceptionState;
class LocalFrame;
class KURL;
class Location FINAL : public RefCountedWillBeGarbageCollectedFinalized<Location>, public ScriptWrappable, public DOMWindowProperty {
public:
static PassRefPtrWillBeRawPtr<Location> create(LocalFrame* frame)
{
return adoptRefWillBeNoop(new Location(frame));
}
void setHref(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String href() const;
void assign(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
void replace(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
void reload(DOMWindow* callingWindow);
void setProtocol(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&, ExceptionState&);
String protocol() const;
void setHost(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String host() const;
void setHostname(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String hostname() const;
void setPort(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String port() const;
void setPathname(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String pathname() const;
void setSearch(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String search() const;
void setHash(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String&);
String hash() const;
String origin() const;
PassRefPtr<DOMStringList> ancestorOrigins() const;
void trace(Visitor*) { }
private:
explicit Location(LocalFrame*);
void setLocation(const String&, DOMWindow* callingWindow, DOMWindow* enteredWindow);
const KURL& url() const;
};
}
#endif