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

Side by Side Diff: Source/web/WebFrameImpl.cpp

Issue 214723003: Add an unimplemented history API to WebView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: +WebHisotryCommitType descriptions Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | public/web/WebFrameClient.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after
2207 // it is necessary to check the value after calling init() and 2207 // it is necessary to check the value after calling init() and
2208 // return without loading URL. 2208 // return without loading URL.
2209 // NOTE: m_client will be null if this frame has been detached. 2209 // NOTE: m_client will be null if this frame has been detached.
2210 // (b:791612) 2210 // (b:791612)
2211 childFrame->init(); // create an empty document 2211 childFrame->init(); // create an empty document
2212 if (!childFrame->tree().parent()) 2212 if (!childFrame->tree().parent())
2213 return nullptr; 2213 return nullptr;
2214 2214
2215 // If we're moving in the back/forward list, we might want to replace the co ntent 2215 // If we're moving in the back/forward list, we might want to replace the co ntent
2216 // of this child frame with whatever was there at that point. 2216 // of this child frame with whatever was there at that point.
2217 HistoryItem* childItem = 0; 2217 RefPtr<HistoryItem> childItem;
2218 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen t()->loadEventFinished()) 2218 if (isBackForwardLoadType(frame()->loader().loadType()) && !frame()->documen t()->loadEventFinished()) {
2219 childItem = frame()->page()->historyController().itemForNewChildFrame(ch ildFrame.get()); 2219 childItem = PassRefPtr<HistoryItem>(webframe->client()->historyItemForNe wChildFrame(webframe));
2220 if (!childItem)
2221 childItem = frame()->page()->historyController().itemForNewChildFram e(childFrame.get());
2222 }
2220 2223
2221 if (childItem) 2224 if (childItem)
2222 childFrame->loader().loadHistoryItem(childItem); 2225 childFrame->loader().loadHistoryItem(childItem.get());
2223 else 2226 else
2224 childFrame->loader().load(FrameLoadRequest(0, request.resourceRequest(), "_self")); 2227 childFrame->loader().load(FrameLoadRequest(0, request.resourceRequest(), "_self"));
2225 2228
2226 // A synchronous navigation (about:blank) would have already processed 2229 // A synchronous navigation (about:blank) would have already processed
2227 // onload, so it is possible for the frame to have already been destroyed by 2230 // onload, so it is possible for the frame to have already been destroyed by
2228 // script in the page. 2231 // script in the page.
2229 // NOTE: m_client will be null if this frame has been detached. 2232 // NOTE: m_client will be null if this frame has been detached.
2230 if (!childFrame->tree().parent()) 2233 if (!childFrame->tree().parent())
2231 return nullptr; 2234 return nullptr;
2232 2235
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 2538
2536 // There is a possibility that the frame being detached was the only 2539 // There is a possibility that the frame being detached was the only
2537 // pending one. We need to make sure final replies can be sent. 2540 // pending one. We need to make sure final replies can be sent.
2538 flushCurrentScopingEffort(m_findRequestIdentifier); 2541 flushCurrentScopingEffort(m_findRequestIdentifier);
2539 2542
2540 cancelPendingScopingEffort(); 2543 cancelPendingScopingEffort();
2541 } 2544 }
2542 } 2545 }
2543 2546
2544 } // namespace blink 2547 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/AssertMatchingEnums.cpp ('k') | public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698