| 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 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #ifndef Location_h | 29 #ifndef Location_h |
| 30 #define Location_h | 30 #define Location_h |
| 31 | 31 |
| 32 #include "bindings/core/v8/ScriptValue.h" |
| 32 #include "bindings/core/v8/ScriptWrappable.h" | 33 #include "bindings/core/v8/ScriptWrappable.h" |
| 33 #include "core/dom/DOMStringList.h" | 34 #include "core/dom/DOMStringList.h" |
| 34 #include "core/frame/DOMWindowProperty.h" | 35 #include "core/frame/DOMWindowProperty.h" |
| 35 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
| 36 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
| 37 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 class LocalDOMWindow; | 42 class LocalDOMWindow; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void setPathname(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindo
w, const String&); | 77 void setPathname(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindo
w, const String&); |
| 77 String pathname() const; | 78 String pathname() const; |
| 78 void setSearch(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow,
const String&); | 79 void setSearch(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow,
const String&); |
| 79 String search() const; | 80 String search() const; |
| 80 void setHash(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); | 81 void setHash(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); |
| 81 String hash() const; | 82 String hash() const; |
| 82 String origin() const; | 83 String origin() const; |
| 83 | 84 |
| 84 PassRefPtrWillBeRawPtr<DOMStringList> ancestorOrigins() const; | 85 PassRefPtrWillBeRawPtr<DOMStringList> ancestorOrigins() const; |
| 85 | 86 |
| 87 // Just return the |this| object the way the normal valueOf function on the
Object prototype would. |
| 88 // The valueOf function is only added to make sure that it cannot be overwri
tten on location |
| 89 // objects, since that would provide a hook to change the string conversion
behavior of location objects. |
| 90 ScriptValue valueOf(const ScriptValue& thisObject) { return thisObject; } |
| 91 |
| 86 DECLARE_VIRTUAL_TRACE(); | 92 DECLARE_VIRTUAL_TRACE(); |
| 87 | 93 |
| 88 private: | 94 private: |
| 89 explicit Location(Frame*); | 95 explicit Location(Frame*); |
| 90 | 96 |
| 91 enum class SetLocation { Normal, ReplaceThisFrame }; | 97 enum class SetLocation { Normal, ReplaceThisFrame }; |
| 92 void setLocation(const String&, LocalDOMWindow* callingWindow, LocalDOMWindo
w* enteredWindow, SetLocation = SetLocation::Normal); | 98 void setLocation(const String&, LocalDOMWindow* callingWindow, LocalDOMWindo
w* enteredWindow, SetLocation = SetLocation::Normal); |
| 93 | 99 |
| 94 const KURL& url() const; | 100 const KURL& url() const; |
| 95 | 101 |
| 96 RawPtrWillBeMember<Frame> m_frame; | 102 RawPtrWillBeMember<Frame> m_frame; |
| 97 }; | 103 }; |
| 98 | 104 |
| 99 } // namespace blink | 105 } // namespace blink |
| 100 | 106 |
| 101 #endif // Location_h | 107 #endif // Location_h |
| OLD | NEW |