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

Side by Side Diff: Source/core/loader/NavigationScheduler.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) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2009 Adam Barth. All rights reserved. 5 * Copyright (C) 2009 Adam Barth. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 class ScheduledReload final : public ScheduledNavigation { 170 class ScheduledReload final : public ScheduledNavigation {
171 public: 171 public:
172 static PassOwnPtrWillBeRawPtr<ScheduledReload> create() 172 static PassOwnPtrWillBeRawPtr<ScheduledReload> create()
173 { 173 {
174 return adoptPtrWillBeNoop(new ScheduledReload); 174 return adoptPtrWillBeNoop(new ScheduledReload);
175 } 175 }
176 176
177 virtual void fire(LocalFrame* frame) override 177 virtual void fire(LocalFrame* frame) override
178 { 178 {
179 OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicat or(); 179 OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicat or();
180 frame->loader().reload(NormalReload, KURL(), ClientRedirect); 180 if (!frame->loader().currentItem())
Nate Chapin 2015/06/02 17:19:35 Null check the ResourceRequest instead of the curr
clamy 2015/06/03 14:39:14 Done.
181 return;
182 FrameLoadRequest request = FrameLoader::frameRequestForReload(
183 frame->loader().resourceRequestForReload(
184 *frame, FrameLoadTypeReload, KURL(), ClientRedirect),
185 ClientRedirect);
186 frame->loader().load(request, FrameLoadTypeReload);
181 } 187 }
182 188
183 private: 189 private:
184 ScheduledReload() 190 ScheduledReload()
185 : ScheduledNavigation(0.0, nullptr, true, true) 191 : ScheduledNavigation(0.0, nullptr, true, true)
186 { 192 {
187 } 193 }
188 }; 194 };
189 195
190 class ScheduledPageBlock final : public ScheduledURLNavigation { 196 class ScheduledPageBlock final : public ScheduledURLNavigation {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 m_redirect.clear(); 422 m_redirect.clear();
417 } 423 }
418 424
419 DEFINE_TRACE(NavigationScheduler) 425 DEFINE_TRACE(NavigationScheduler)
420 { 426 {
421 visitor->trace(m_frame); 427 visitor->trace(m_frame);
422 visitor->trace(m_redirect); 428 visitor->trace(m_redirect);
423 } 429 }
424 430
425 } // namespace blink 431 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698