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

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: Addressed comments 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
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active); 247 request.resourceRequest().setHasUserGesture(userGestureStatus == UserGes tureStatus::Active);
248 m_loader.load(request); 248 m_loader.load(request);
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::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) 254 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy)
255 { 255 {
256 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); 256 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load);
257 if (clientRedirectPolicy == NotClientRedirect) 257 if (clientRedirectPolicy == NotClientRedirect) {
258 m_loader.reload(reloadPolicy); 258 if (!m_loader.currentItem())
259 else 259 return;
260 FrameLoadType loadType = reloadPolicy == NormalReload ?
Nate Chapin 2015/06/04 23:23:09 ReloadPolicy is still used here, is that an oversi
clamy 2015/06/05 14:11:48 Done. This was an oversight :).
261 FrameLoadTypeReload : FrameLoadTypeReloadFromOrigin;
262 FrameLoadRequest request = FrameLoader::frameRequestForReload(
263 m_loader.resourceRequestForReload(loadType, KURL(), clientRedirectPo licy),
264 clientRedirectPolicy);
265 m_loader.load(request, loadType);
266 } else {
260 m_navigationScheduler.scheduleReload(); 267 m_navigationScheduler.scheduleReload();
268 }
261 } 269 }
262 270
263 void LocalFrame::detach() 271 void LocalFrame::detach()
264 { 272 {
265 // A lot of the following steps can result in the current frame being 273 // A lot of the following steps can result in the current frame being
266 // detached, so protect a reference to it. 274 // detached, so protect a reference to it.
267 RefPtrWillBeRawPtr<LocalFrame> protect(this); 275 RefPtrWillBeRawPtr<LocalFrame> protect(this);
268 m_loader.stopAllLoaders(); 276 m_loader.stopAllLoaders();
269 m_loader.dispatchUnloadEvent(); 277 m_loader.dispatchUnloadEvent();
270 detachChildren(); 278 detachChildren();
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 , m_textZoomFactor(parentTextZoomFactor(this)) 820 , m_textZoomFactor(parentTextZoomFactor(this))
813 , m_inViewSourceMode(false) 821 , m_inViewSourceMode(false)
814 { 822 {
815 if (isLocalRoot()) 823 if (isLocalRoot())
816 m_instrumentingAgents = InstrumentingAgents::create(); 824 m_instrumentingAgents = InstrumentingAgents::create();
817 else 825 else
818 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 826 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
819 } 827 }
820 828
821 } // namespace blink 829 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/inspector/InspectorResourceContentLoader.cpp » ('j') | Source/core/loader/FrameLoader.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698