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

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

Issue 1152053006: Allow RemoteFrames to be navigated through targeted navigation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add Frame::navigate method that takes FrameLoadRequest param. 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
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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // client redirect, which is observable via the webNavigation extension api. 244 // client redirect, which is observable via the webNavigation extension api.
245 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) { 245 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) {
246 FrameLoadRequest request(&originDocument, url); 246 FrameLoadRequest request(&originDocument, url);
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::navigate(const FrameLoadRequest& request)
255 {
256 // TODO(dcheng): Special case for window.open("about:blank") to ensure it lo ads synchronously into
Nate Chapin 2015/06/08 16:56:22 I don't love the duplication here. Perhaps we shou
nasko 2015/06/08 17:27:04 Yeah, not a big fan either. I've modified it as su
257 // a new window. This is our historical behavior, and it's consistent with t he creation of
258 // a new iframe with src="about:blank". Perhaps we could get rid of this if we started reporting
259 // the initial empty document's url as about:blank? See crbug.com/471239.
260 // TODO(japhet): This special case is also necessary for behavior asserted b y some extensions tests.
261 // Using NavigationScheduler::scheduleNavigationChange causes the navigation to be flagged as a
262 // client redirect, which is observable via the webNavigation extension api.
263 if (isMainFrame() && !m_loader.stateMachine()->committedFirstRealDocumentLoa d()) {
264 m_loader.load(request);
265 } else {
266 m_navigationScheduler.scheduleLocationChange(request.originDocument(), r equest.resourceRequest().url(), request.lockBackForwardList());
267 }
268 }
269
254 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy) 270 void LocalFrame::reload(ReloadPolicy reloadPolicy, ClientRedirectPolicy clientRe directPolicy)
255 { 271 {
256 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load); 272 ASSERT(clientRedirectPolicy == NotClientRedirect || reloadPolicy == NormalRe load);
257 if (clientRedirectPolicy == NotClientRedirect) 273 if (clientRedirectPolicy == NotClientRedirect)
258 m_loader.reload(reloadPolicy); 274 m_loader.reload(reloadPolicy);
259 else 275 else
260 m_navigationScheduler.scheduleReload(); 276 m_navigationScheduler.scheduleReload();
261 } 277 }
262 278
263 void LocalFrame::detach() 279 void LocalFrame::detach()
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 , m_textZoomFactor(parentTextZoomFactor(this)) 828 , m_textZoomFactor(parentTextZoomFactor(this))
813 , m_inViewSourceMode(false) 829 , m_inViewSourceMode(false)
814 { 830 {
815 if (isLocalRoot()) 831 if (isLocalRoot())
816 m_instrumentingAgents = InstrumentingAgents::create(); 832 m_instrumentingAgents = InstrumentingAgents::create();
817 else 833 else
818 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents; 834 m_instrumentingAgents = localFrameRoot()->m_instrumentingAgents;
819 } 835 }
820 836
821 } // namespace blink 837 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698