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

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

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase 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
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/frame/Location.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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } else { 249 } else {
250 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string (), lockBackForwardList); 250 m_navigationScheduler.scheduleLocationChange(&originDocument, url.string (), lockBackForwardList);
251 } 251 }
252 } 252 }
253 253
254 void LocalFrame::navigate(const FrameLoadRequest& request) 254 void LocalFrame::navigate(const FrameLoadRequest& request)
255 { 255 {
256 m_loader.load(request); 256 m_loader.load(request);
257 } 257 }
258 258
259 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) 259 void LocalFrame::reload(FrameLoadType loadType, ClientRedirectPolicy clientRedir ectPolicy)
260 { 260 {
261 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); 261 ASSERT(loadType == FrameLoadTypeReload || loadType == FrameLoadTypeReloadFro mOrigin);
262 if (clientRedirectPolicy == NotClientRedirect) 262 ASSERT(clientRedirectPolicy == NotClientRedirect || loadType == FrameLoadTyp eReload);
263 m_loader.reload(reloadPolicy); 263 if (clientRedirectPolicy == NotClientRedirect) {
264 else 264 if (!m_loader.currentItem())
265 return;
266 FrameLoadRequest request = FrameLoadRequest(
267 nullptr, m_loader.resourceRequestForReload(loadType, KURL(), clientR edirectPolicy));
268 request.setClientRedirect(clientRedirectPolicy);
269 m_loader.load(request, loadType);
270 } else {
265 m_navigationScheduler.scheduleReload(); 271 m_navigationScheduler.scheduleReload();
272 }
266 } 273 }
267 274
268 void LocalFrame::detach() 275 void LocalFrame::detach()
269 { 276 {
270 // A lot of the following steps can result in the current frame being 277 // A lot of the following steps can result in the current frame being
271 // detached, so protect a reference to it. 278 // detached, so protect a reference to it.
272 RefPtrWillBeRawPtr<LocalFrame> protect(this); 279 RefPtrWillBeRawPtr<LocalFrame> protect(this);
273 m_loader.stopAllLoaders(); 280 m_loader.stopAllLoaders();
274 m_loader.dispatchUnloadEvent(); 281 m_loader.dispatchUnloadEvent();
275 detachChildren(); 282 detachChildren();
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 , m_textZoomFactor(parentTextZoomFactor(this)) 824 , m_textZoomFactor(parentTextZoomFactor(this))
818 , m_inViewSourceMode(false) 825 , m_inViewSourceMode(false)
819 { 826 {
820 if (isLocalRoot()) 827 if (isLocalRoot())
821 m_instrumentingAgents = InstrumentingAgents::create(); 828 m_instrumentingAgents = InstrumentingAgents::create();
822 else 829 else
823 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 830 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
824 } 831 }
825 832
826 } // namespace blink 833 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/LocalFrame.h ('k') | Source/core/frame/Location.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698