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

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

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)
Patch Set: Experiment to fix DCHECKing tests Created 3 years, 9 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 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "core/html/HTMLFrameElementBase.h" 56 #include "core/html/HTMLFrameElementBase.h"
57 #include "core/html/HTMLPlugInElement.h" 57 #include "core/html/HTMLPlugInElement.h"
58 #include "core/input/EventHandler.h" 58 #include "core/input/EventHandler.h"
59 #include "core/inspector/ConsoleMessage.h" 59 #include "core/inspector/ConsoleMessage.h"
60 #include "core/inspector/InspectorInstrumentation.h" 60 #include "core/inspector/InspectorInstrumentation.h"
61 #include "core/layout/HitTestResult.h" 61 #include "core/layout/HitTestResult.h"
62 #include "core/layout/LayoutView.h" 62 #include "core/layout/LayoutView.h"
63 #include "core/layout/api/LayoutPartItem.h" 63 #include "core/layout/api/LayoutPartItem.h"
64 #include "core/layout/api/LayoutViewItem.h" 64 #include "core/layout/api/LayoutViewItem.h"
65 #include "core/layout/compositing/PaintLayerCompositor.h" 65 #include "core/layout/compositing/PaintLayerCompositor.h"
66 #include "core/loader/DocumentLoader.h"
66 #include "core/loader/FrameLoadRequest.h" 67 #include "core/loader/FrameLoadRequest.h"
67 #include "core/loader/NavigationScheduler.h" 68 #include "core/loader/NavigationScheduler.h"
68 #include "core/page/ChromeClient.h" 69 #include "core/page/ChromeClient.h"
69 #include "core/page/FocusController.h" 70 #include "core/page/FocusController.h"
70 #include "core/page/Page.h" 71 #include "core/page/Page.h"
71 #include "core/page/scrolling/ScrollingCoordinator.h" 72 #include "core/page/scrolling/ScrollingCoordinator.h"
72 #include "core/paint/ObjectPainter.h" 73 #include "core/paint/ObjectPainter.h"
73 #include "core/paint/PaintInfo.h" 74 #include "core/paint/PaintInfo.h"
74 #include "core/paint/PaintLayer.h" 75 #include "core/paint/PaintLayer.h"
75 #include "core/paint/PaintLayerPainter.h" 76 #include "core/paint/PaintLayerPainter.h"
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 } 371 }
371 372
372 void LocalFrame::navigate(const FrameLoadRequest& request) { 373 void LocalFrame::navigate(const FrameLoadRequest& request) {
373 m_loader.load(request); 374 m_loader.load(request);
374 } 375 }
375 376
376 void LocalFrame::reload(FrameLoadType loadType, 377 void LocalFrame::reload(FrameLoadType loadType,
377 ClientRedirectPolicy clientRedirectPolicy) { 378 ClientRedirectPolicy clientRedirectPolicy) {
378 DCHECK(isReloadLoadType(loadType)); 379 DCHECK(isReloadLoadType(loadType));
379 if (clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect) { 380 if (clientRedirectPolicy == ClientRedirectPolicy::NotClientRedirect) {
380 if (!m_loader.currentItem()) 381 if (!m_loader.documentLoader()->historyItem())
381 return; 382 return;
382 FrameLoadRequest request = 383 FrameLoadRequest request =
383 FrameLoadRequest(nullptr, m_loader.resourceRequestForReload( 384 FrameLoadRequest(nullptr, m_loader.resourceRequestForReload(
384 loadType, KURL(), clientRedirectPolicy)); 385 loadType, KURL(), clientRedirectPolicy));
385 request.setClientRedirect(clientRedirectPolicy); 386 request.setClientRedirect(clientRedirectPolicy);
386 m_loader.load(request, loadType); 387 m_loader.load(request, loadType);
387 } else { 388 } else {
388 DCHECK_EQ(FrameLoadTypeReloadMainResource, loadType); 389 DCHECK_EQ(FrameLoadTypeReloadMainResource, loadType);
389 m_navigationScheduler->scheduleReload(); 390 m_navigationScheduler->scheduleReload();
390 } 391 }
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 914 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
914 m_frame->client()->frameBlameContext()->Enter(); 915 m_frame->client()->frameBlameContext()->Enter();
915 } 916 }
916 917
917 ScopedFrameBlamer::~ScopedFrameBlamer() { 918 ScopedFrameBlamer::~ScopedFrameBlamer() {
918 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 919 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
919 m_frame->client()->frameBlameContext()->Leave(); 920 m_frame->client()->frameBlameContext()->Leave();
920 } 921 }
921 922
922 } // namespace blink 923 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698