OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
37 #include "wtf/text/WTFString.h" | 37 #include "wtf/text/WTFString.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 class DOMWindow; | 41 class DOMWindow; |
42 class ExceptionState; | 42 class ExceptionState; |
43 class LocalFrame; | 43 class LocalFrame; |
44 class KURL; | 44 class KURL; |
45 | 45 |
46 class Location FINAL : public ScriptWrappable, public RefCounted<Location>, publ
ic DOMWindowProperty { | 46 class Location FINAL : public RefCountedWillBeGarbageCollectedFinalized<Location
>, public ScriptWrappable, public DOMWindowProperty { |
47 public: | 47 public: |
48 static PassRefPtr<Location> create(LocalFrame* frame) { return adoptRef(new
Location(frame)); } | 48 static PassRefPtrWillBeRawPtr<Location> create(LocalFrame* frame) |
| 49 { |
| 50 return adoptRefWillBeNoop(new Location(frame)); |
| 51 } |
49 | 52 |
50 void setHref(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); | 53 void setHref(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); |
51 String href() const; | 54 String href() const; |
52 | 55 |
53 void assign(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String
&); | 56 void assign(DOMWindow* callingWindow, DOMWindow* enteredWindow, const String
&); |
54 void replace(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); | 57 void replace(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); |
55 void reload(DOMWindow* callingWindow); | 58 void reload(DOMWindow* callingWindow); |
56 | 59 |
57 void setProtocol(DOMWindow* callingWindow, DOMWindow* enteredWindow, const S
tring&, ExceptionState&); | 60 void setProtocol(DOMWindow* callingWindow, DOMWindow* enteredWindow, const S
tring&, ExceptionState&); |
58 String protocol() const; | 61 String protocol() const; |
59 void setHost(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); | 62 void setHost(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); |
60 String host() const; | 63 String host() const; |
61 void setHostname(DOMWindow* callingWindow, DOMWindow* enteredWindow, const S
tring&); | 64 void setHostname(DOMWindow* callingWindow, DOMWindow* enteredWindow, const S
tring&); |
62 String hostname() const; | 65 String hostname() const; |
63 void setPort(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); | 66 void setPort(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); |
64 String port() const; | 67 String port() const; |
65 void setPathname(DOMWindow* callingWindow, DOMWindow* enteredWindow, const S
tring&); | 68 void setPathname(DOMWindow* callingWindow, DOMWindow* enteredWindow, const S
tring&); |
66 String pathname() const; | 69 String pathname() const; |
67 void setSearch(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Str
ing&); | 70 void setSearch(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Str
ing&); |
68 String search() const; | 71 String search() const; |
69 void setHash(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); | 72 void setHash(DOMWindow* callingWindow, DOMWindow* enteredWindow, const Strin
g&); |
70 String hash() const; | 73 String hash() const; |
71 String origin() const; | 74 String origin() const; |
72 | 75 |
73 PassRefPtr<DOMStringList> ancestorOrigins() const; | 76 PassRefPtr<DOMStringList> ancestorOrigins() const; |
74 | 77 |
| 78 void trace(Visitor*) { } |
| 79 |
75 private: | 80 private: |
76 explicit Location(LocalFrame*); | 81 explicit Location(LocalFrame*); |
77 | 82 |
78 void setLocation(const String&, DOMWindow* callingWindow, DOMWindow* entered
Window); | 83 void setLocation(const String&, DOMWindow* callingWindow, DOMWindow* entered
Window); |
79 | 84 |
80 const KURL& url() const; | 85 const KURL& url() const; |
81 }; | 86 }; |
82 | 87 |
83 } // namespace WebCore | 88 } // namespace WebCore |
84 | 89 |
85 #endif // Location_h | 90 #endif // Location_h |
OLD | NEW |