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

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

Issue 1187483004: Simplify WindowProxy handoff in WebFrame::swap(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moo Created 5 years, 6 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/Frame.h ('k') | Source/web/WebFrame.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 return client; 151 return client;
152 } 152 }
153 153
154 ChromeClient& Frame::chromeClient() const 154 ChromeClient& Frame::chromeClient() const
155 { 155 {
156 if (Page* page = this->page()) 156 if (Page* page = this->page())
157 return page->chromeClient(); 157 return page->chromeClient();
158 return emptyChromeClient(); 158 return emptyChromeClient();
159 } 159 }
160 160
161 void Frame::prepareSwapFrom(Frame* old)
162 {
163 WindowProxyManager* oldManager = old->windowProxyManager();
164 oldManager->clearForNavigation();
165 }
166
167 void Frame::finishSwapFrom(Frame* old) 161 void Frame::finishSwapFrom(Frame* old)
168 { 162 {
169 WindowProxyManager* oldManager = old->windowProxyManager(); 163 WindowProxyManager* oldManager = old->windowProxyManager();
164 oldManager->clearForNavigation();
170 windowProxyManager()->takeGlobalFrom(oldManager); 165 windowProxyManager()->takeGlobalFrom(oldManager);
171 } 166 }
172 167
173 Frame* Frame::findFrameForNavigation(const AtomicString& name, Frame& activeFram e) 168 Frame* Frame::findFrameForNavigation(const AtomicString& name, Frame& activeFram e)
174 { 169 {
175 Frame* frame = tree().find(name); 170 Frame* frame = tree().find(name);
176 if (!frame || !activeFrame.canNavigate(*frame)) 171 if (!frame || !activeFrame.canNavigate(*frame))
177 return nullptr; 172 return nullptr;
178 return frame; 173 return frame;
179 } 174 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 302
308 if (m_owner) { 303 if (m_owner) {
309 if (m_owner->isLocal()) 304 if (m_owner->isLocal())
310 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); 305 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
311 } else { 306 } else {
312 page()->setMainFrame(this); 307 page()->setMainFrame(this);
313 } 308 }
314 } 309 }
315 310
316 } // namespace blink 311 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/Frame.h ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698