本文整理汇总了C++中Window::GetHistoryLen方法的典型用法代码示例。如果您正苦于以下问题:C++ Window::GetHistoryLen方法的具体用法?C++ Window::GetHistoryLen怎么用?C++ Window::GetHistoryLen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Window
的用法示例。
在下文中一共展示了Window::GetHistoryLen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
//.........这里部分代码省略.........
{
if (oldHandler && !keep_loading)
{
download_url.ChangeMessageHandler(oldHandler, g_main_message_handler);
currentHandler = g_main_message_handler;
}
else
currentHandler = oldHandler;
}
}
}
// currentHandler is NULL when download_url.Status(FALSE) equals URL_LOADING_FAILED, or shall we set it to g_main_message_handler anyway?
if (currentHandler)
newitem->SetCallbacks(currentHandler, download_url.Id(TRUE));
}
}
if (download_action_mode == DOWNLOAD_RUN)
{
if ( document_manager &&
download_url.Status(FALSE) != URL_UNLOADED &&
download_url.Status(TRUE) != URL_LOADING)
{
// The loading has already finished. We have to trigger the action
// manually by using HandleAllLoaded() [espen]
// InitiateTransfer() above destroys filename
// doc_man->SetCurrentURL(saved_url);
if( viewer.GetAction() == VIEWER_APPLICATION || viewer.GetAction() == VIEWER_PASS_URL)
{
document_manager->SetAction(VIEWER_APPLICATION);
document_manager->SetApplication(viewer.GetApplicationToOpenWith());
}
else if(viewer.GetAction() == VIEWER_REG_APPLICATION)
{
document_manager->SetAction(VIEWER_REG_APPLICATION);
}
// Restore
// doc_man->SetCurrentURL(GetUrl());
}
}
if (dont_add_to_transfers)
{
if (download_context && download_context->GetTransferListener())
download_context->GetTransferListener()->OnSavedFromCacheDone(download_filename);
}
done = TRUE;
break;
}
// Here we clean up in the context of document manager
if (document_manager && !keep_loading)
document_manager->StopLoading(FALSE); //the window is not handling the loading anymore
if (document_manager && download_url.Status(TRUE) != URL_LOADING)
document_manager->HandleAllLoaded(download_url.Id(TRUE));
EnableWindowClose();
}
else
{
#ifdef WEB_TURBO_MODE
// Downloads should not use Turbo. NB! This WILL generate a second request for the same resource (this time without using the Turbo proxy)
if (download_url.GetAttribute(URL::KUsesTurbo) &&
!download_url.GetAttribute(URL::KTurboBypassed) &&
#ifdef _BITTORRENT_SUPPORT_
download_url.ContentType() != URL_P2P_BITTORRENT &&
#endif // _BITTORRENT_SUPPORT_
document_manager)
{
URLStatus ustat = (URLStatus)download_url.GetAttribute(URL::KLoadStatus, URL::KFollowRedirect);
if (ustat == URL_LOADING)
document_manager->StopLoading(FALSE);
const OpStringC8 url_str = download_url.GetAttribute(URL::KName_With_Fragment_Username_Password_NOT_FOR_UI, URL::KNoRedirect);
download_url = g_url_api->GetURL(url_str.CStr());
document_manager->SetCurrentURL(download_url, TRUE);
}
#endif // WEB_TURBO_MODE
delayed = TRUE;
}
}
if (done)
{
Window* win = document_manager ? document_manager->GetWindow():NULL;
TryDelete();
//if the window is Not intiated by the user and this is the first url the window loads, close it
//since the data is handled elsewhere.
if (win && win->GetOpenerWindow() && win->GetHistoryLen() == 0 && win->CanClose())
win->Close();
return OpBoolean::IS_TRUE; // Signifying that we have done a transition through a download initiation
}
else
{
return OpBoolean::IS_FALSE; // Signifying that we will back here before we are done
}
}