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 22 matching lines...) Expand all Loading... |
33 #include "core/dom/DOMStringList.h" | 33 #include "core/dom/DOMStringList.h" |
34 #include "core/frame/DOMWindowProperty.h" | 34 #include "core/frame/DOMWindowProperty.h" |
35 #include "wtf/PassRefPtr.h" | 35 #include "wtf/PassRefPtr.h" |
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 blink { | 39 namespace blink { |
40 | 40 |
41 class LocalDOMWindow; | 41 class LocalDOMWindow; |
42 class ExceptionState; | 42 class ExceptionState; |
43 class LocalFrame; | 43 class Frame; |
44 class KURL; | 44 class KURL; |
45 | 45 |
46 class Location final : public RefCountedWillBeGarbageCollected<Location>, public
ScriptWrappable, public DOMWindowProperty { | 46 class Location final : public RefCountedWillBeGarbageCollected<Location>, public
ScriptWrappable, public DOMWindowProperty { |
47 DEFINE_WRAPPERTYPEINFO(); | 47 DEFINE_WRAPPERTYPEINFO(); |
48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Location); | 48 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Location); |
49 public: | 49 public: |
50 static PassRefPtrWillBeRawPtr<Location> create(LocalFrame* frame) | 50 static PassRefPtrWillBeRawPtr<Location> create(Frame* frame) |
51 { | 51 { |
52 return adoptRefWillBeNoop(new Location(frame)); | 52 return adoptRefWillBeNoop(new Location(frame)); |
53 } | 53 } |
54 | 54 |
55 void setHref(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); | 55 void setHref(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); |
56 String href() const; | 56 String href() const; |
57 | 57 |
58 void assign(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, co
nst String&); | 58 void assign(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, co
nst String&); |
59 void replace(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); | 59 void replace(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); |
60 void reload(LocalDOMWindow* callingWindow); | 60 void reload(LocalDOMWindow* callingWindow); |
(...skipping 12 matching lines...) Expand all Loading... |
73 String search() const; | 73 String search() const; |
74 void setHash(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); | 74 void setHash(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); |
75 String hash() const; | 75 String hash() const; |
76 String origin() const; | 76 String origin() const; |
77 | 77 |
78 PassRefPtrWillBeRawPtr<DOMStringList> ancestorOrigins() const; | 78 PassRefPtrWillBeRawPtr<DOMStringList> ancestorOrigins() const; |
79 | 79 |
80 virtual void trace(Visitor*) override; | 80 virtual void trace(Visitor*) override; |
81 | 81 |
82 private: | 82 private: |
83 explicit Location(LocalFrame*); | 83 explicit Location(Frame*); |
84 | 84 |
85 enum class SetLocation { Normal, ReplaceThisFrame }; | 85 enum class SetLocation { Normal, ReplaceThisFrame }; |
86 void setLocation(const String&, LocalDOMWindow* callingWindow, LocalDOMWindo
w* enteredWindow, SetLocation = SetLocation::Normal); | 86 void setLocation(const String&, LocalDOMWindow* callingWindow, LocalDOMWindo
w* enteredWindow, SetLocation = SetLocation::Normal); |
87 | 87 |
88 const KURL& url() const; | 88 const KURL& url() const; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace blink | 91 } // namespace blink |
92 | 92 |
93 #endif // Location_h | 93 #endif // Location_h |
OLD | NEW |