summaryrefslogtreecommitdiff
path: root/Source/WebCore/page/Location.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/page/Location.h')
-rw-r--r--Source/WebCore/page/Location.h39
1 files changed, 16 insertions, 23 deletions
diff --git a/Source/WebCore/page/Location.h b/Source/WebCore/page/Location.h
index b55c5a8f0..c70d9c87b 100644
--- a/Source/WebCore/page/Location.h
+++ b/Source/WebCore/page/Location.h
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -26,15 +26,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Location_h
-#define Location_h
+#pragma once
#include "DOMStringList.h"
#include "DOMWindowProperty.h"
+#include "ExceptionOr.h"
#include "ScriptWrappable.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
namespace WebCore {
@@ -42,47 +39,43 @@ class DOMWindow;
class Frame;
class URL;
-typedef int ExceptionCode;
-
class Location : public ScriptWrappable, public RefCounted<Location>, public DOMWindowProperty {
public:
- static PassRefPtr<Location> create(Frame* frame) { return adoptRef(new Location(frame)); }
+ static Ref<Location> create(Frame* frame) { return adoptRef(*new Location(frame)); }
- void setHref(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setHref(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String href() const;
- void assign(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
- void replace(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void assign(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
+ void replace(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
void reload(DOMWindow& activeWindow);
- void setProtocol(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow, ExceptionCode&);
+ ExceptionOr<void> setProtocol(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String protocol() const;
- void setHost(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setHost(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String host() const;
- void setHostname(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setHostname(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String hostname() const;
- void setPort(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setPort(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String port() const;
- void setPathname(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setPathname(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String pathname() const;
- void setSearch(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setSearch(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String search() const;
- void setHash(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setHash(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
String hash() const;
String origin() const;
String toString() const { return href(); }
- PassRefPtr<DOMStringList> ancestorOrigins() const;
+ Ref<DOMStringList> ancestorOrigins() const;
private:
explicit Location(Frame*);
- void setLocation(const String&, DOMWindow& activeWindow, DOMWindow& firstWindow);
+ void setLocation(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
const URL& url() const;
};
} // namespace WebCore
-
-#endif // Location_h