| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // code churn, Location is implemented as a one-off with some custom lifetime ma
nagement code. Namely, | 50 // code churn, Location is implemented as a one-off with some custom lifetime ma
nagement code. Namely, |
| 51 // it needs a manual call to reset() from DOMWindow::reset() to ensure it doesn'
t retain a stale Frame pointer. | 51 // it needs a manual call to reset() from DOMWindow::reset() to ensure it doesn'
t retain a stale Frame pointer. |
| 52 class CORE_EXPORT Location final : public RefCountedWillBeGarbageCollected<Locat
ion>, public ScriptWrappable { | 52 class CORE_EXPORT Location final : public RefCountedWillBeGarbageCollected<Locat
ion>, public ScriptWrappable { |
| 53 DEFINE_WRAPPERTYPEINFO(); | 53 DEFINE_WRAPPERTYPEINFO(); |
| 54 public: | 54 public: |
| 55 static PassRefPtrWillBeRawPtr<Location> create(Frame* frame) | 55 static PassRefPtrWillBeRawPtr<Location> create(Frame* frame) |
| 56 { | 56 { |
| 57 return adoptRefWillBeNoop(new Location(frame)); | 57 return adoptRefWillBeNoop(new Location(frame)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 Frame* frame() const; | 60 Frame* frame() const { return m_frame.get(); } |
| 61 void reset(); | 61 void reset() { m_frame = nullptr; } |
| 62 | 62 |
| 63 void setHref(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); | 63 void setHref(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); |
| 64 String href() const; | 64 String href() const; |
| 65 | 65 |
| 66 void assign(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, co
nst String&); | 66 void assign(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, co
nst String&); |
| 67 void replace(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); | 67 void replace(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow, c
onst String&); |
| 68 void reload(LocalDOMWindow* callingWindow); | 68 void reload(LocalDOMWindow* callingWindow); |
| 69 | 69 |
| 70 void setProtocol(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindo
w, const String&, ExceptionState&); | 70 void setProtocol(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindo
w, const String&, ExceptionState&); |
| 71 String protocol() const; | 71 String protocol() const; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 99 void setLocation(const String&, LocalDOMWindow* callingWindow, LocalDOMWindo
w* enteredWindow, SetLocation = SetLocation::Normal); | 99 void setLocation(const String&, LocalDOMWindow* callingWindow, LocalDOMWindo
w* enteredWindow, SetLocation = SetLocation::Normal); |
| 100 | 100 |
| 101 const KURL& url() const; | 101 const KURL& url() const; |
| 102 | 102 |
| 103 RawPtrWillBeMember<Frame> m_frame; | 103 RawPtrWillBeMember<Frame> m_frame; |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 } // namespace blink | 106 } // namespace blink |
| 107 | 107 |
| 108 #endif // Location_h | 108 #endif // Location_h |
| OLD | NEW |