Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: Source/core/frame/Location.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/frame/Navigator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 26 matching lines...) Expand all
37 #include "core/frame/LocalFrame.h" 37 #include "core/frame/LocalFrame.h"
38 #include "core/loader/FrameLoader.h" 38 #include "core/loader/FrameLoader.h"
39 #include "platform/weborigin/KURL.h" 39 #include "platform/weborigin/KURL.h"
40 #include "platform/weborigin/SecurityOrigin.h" 40 #include "platform/weborigin/SecurityOrigin.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 Location::Location(LocalFrame* frame) 44 Location::Location(LocalFrame* frame)
45 : DOMWindowProperty(frame) 45 : DOMWindowProperty(frame)
46 { 46 {
47 ScriptWrappable::init(this);
48 } 47 }
49 48
50 inline const KURL& Location::url() const 49 inline const KURL& Location::url() const
51 { 50 {
52 ASSERT(m_frame); 51 ASSERT(m_frame);
53 52
54 const KURL& url = m_frame->document()->url(); 53 const KURL& url = m_frame->document()->url();
55 if (!url.isValid()) 54 if (!url.isValid())
56 return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame). 55 return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
57 56
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc alDOMWindow* enteredWindow) 244 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc alDOMWindow* enteredWindow)
246 { 245 {
247 ASSERT(m_frame); 246 ASSERT(m_frame);
248 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli ngWindow->document()); 247 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli ngWindow->document());
249 if (!frame) 248 if (!frame)
250 return; 249 return;
251 frame->domWindow()->setLocation(url, callingWindow, enteredWindow); 250 frame->domWindow()->setLocation(url, callingWindow, enteredWindow);
252 } 251 }
253 252
254 } // namespace blink 253 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/frame/Navigator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698