| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/dom/ExceptionCode.h" | 35 #include "core/dom/ExceptionCode.h" |
| 36 #include "core/frame/LocalDOMWindow.h" | 36 #include "core/frame/LocalDOMWindow.h" |
| 37 #include "core/frame/LocalFrame.h" | 37 #include "core/frame/LocalFrame.h" |
| 38 #include "platform/weborigin/KURL.h" | 38 #include "platform/weborigin/KURL.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 Location::Location(LocalFrame* frame) | 42 Location::Location(LocalFrame* frame) |
| 43 : DOMWindowProperty(frame) | 43 : DOMWindowProperty(frame) |
| 44 { | 44 { |
| 45 ScriptWrappable::init(this); | |
| 46 } | 45 } |
| 47 | 46 |
| 48 inline const KURL& Location::url() const | 47 inline const KURL& Location::url() const |
| 49 { | 48 { |
| 50 ASSERT(m_frame); | 49 ASSERT(m_frame); |
| 51 | 50 |
| 52 const KURL& url = m_frame->document()->url(); | 51 const KURL& url = m_frame->document()->url(); |
| 53 if (!url.isValid()) | 52 if (!url.isValid()) |
| 54 return blankURL(); // Use "about:blank" while the page is still loading
(before we have a frame). | 53 return blankURL(); // Use "about:blank" while the page is still loading
(before we have a frame). |
| 55 | 54 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // FIXME(sky): remove. | 228 // FIXME(sky): remove. |
| 230 } | 229 } |
| 231 | 230 |
| 232 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc
alDOMWindow* enteredWindow) | 231 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc
alDOMWindow* enteredWindow) |
| 233 { | 232 { |
| 234 ASSERT(m_frame); | 233 ASSERT(m_frame); |
| 235 m_frame->domWindow()->setLocation(url, callingWindow, enteredWindow); | 234 m_frame->domWindow()->setLocation(url, callingWindow, enteredWindow); |
| 236 } | 235 } |
| 237 | 236 |
| 238 } // namespace blink | 237 } // namespace blink |
| OLD | NEW |