本文整理汇总了C++中FrameLoader::provisionalDocumentLoader方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameLoader::provisionalDocumentLoader方法的具体用法?C++ FrameLoader::provisionalDocumentLoader怎么用?C++ FrameLoader::provisionalDocumentLoader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameLoader
的用法示例。
在下文中一共展示了FrameLoader::provisionalDocumentLoader方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateForCommit
void HistoryController::updateForCommit()
{
FrameLoader* frameLoader = m_frame->loader();
#if !LOG_DISABLED
if (frameLoader->documentLoader())
LOG(History, "WebCoreHistory: Updating History for commit in frame %s", frameLoader->documentLoader()->title().string().utf8().data());
#endif
FrameLoadType type = frameLoader->loadType();
if (isBackForwardLoadType(type)
|| isReplaceLoadTypeWithProvisionalItem(type)
|| (isReloadTypeWithProvisionalItem(type) && !frameLoader->provisionalDocumentLoader()->unreachableURL().isEmpty())) {
// Once committed, we want to use current item for saving DocState, and
// the provisional item for restoring state.
// Note previousItem must be set before we close the URL, which will
// happen when the data source is made non-provisional below
m_frameLoadComplete = false;
m_previousItem = m_currentItem;
ASSERT(m_provisionalItem);
m_currentItem = m_provisionalItem;
m_provisionalItem = 0;
// Tell all other frames in the tree to commit their provisional items and
// restore their scroll position. We'll avoid this frame (which has already
// committed) and its children (which will be replaced).
Page* page = m_frame->page();
ASSERT(page);
page->mainFrame()->loader()->history()->recursiveUpdateForCommit();
}
}
示例2: updateForCommit
void HistoryController::updateForCommit()
{
FrameLoader* frameLoader = m_frame->loader();
#if !LOG_DISABLED
if (frameLoader->documentLoader())
LOG(History, "WebCoreHistory: Updating History for commit in frame %s", frameLoader->documentLoader()->title().utf8().data());
#endif
FrameLoadType type = frameLoader->loadType();
if (isBackForwardLoadType(type) ||
((type == FrameLoadTypeReload || type == FrameLoadTypeReloadFromOrigin) && !frameLoader->provisionalDocumentLoader()->unreachableURL().isEmpty())) {
// Once committed, we want to use current item for saving DocState, and
// the provisional item for restoring state.
// Note previousItem must be set before we close the URL, which will
// happen when the data source is made non-provisional below
m_previousItem = m_currentItem;
ASSERT(m_provisionalItem);
m_currentItem = m_provisionalItem;
m_provisionalItem = 0;
}
}
示例3: schedule
void RedirectScheduler::schedule(PassOwnPtr<ScheduledRedirection> redirection)
{
ASSERT(m_frame->page());
FrameLoader* loader = m_frame->loader();
// If a redirect was scheduled during a load, then stop the current load.
// Otherwise when the current load transitions from a provisional to a
// committed state, pending redirects may be cancelled.
if (redirection->wasDuringLoad) {
if (DocumentLoader* provisionalDocumentLoader = loader->provisionalDocumentLoader())
provisionalDocumentLoader->stopLoading();
loader->stopLoading(UnloadEventPolicyUnloadAndPageHide);
}
cancel();
m_scheduledRedirection = redirection;
if (!loader->isComplete() && m_scheduledRedirection->type != ScheduledRedirection::redirection)
loader->completed();
startTimer();
}