本文整理汇总了C++中WebHistory类的典型用法代码示例。如果您正苦于以下问题:C++ WebHistory类的具体用法?C++ WebHistory怎么用?C++ WebHistory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WebHistory类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: updateGlobalHistory
void WebFrameLoaderClient::updateGlobalHistory(const KURL& url)
{
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
history->addItem(url, core(m_webFrame)->loader()->documentLoader()->title());
}
开发者ID:acss,项目名称:owb-mirror,代码行数:7,代码来源:WebFrameLoaderClient.cpp
示例2: populateVisitedLinks
void WebChromeClient::populateVisitedLinks()
{
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
history->addVisitedLinksToPageGroup(m_webView->page()->group());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:7,代码来源:WebChromeClient.cpp
示例3: core
void WebFrameLoaderClient::updateGlobalHistory()
{
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
WebView* webView = m_webFrame->webView();
SharedPtr<WebHistoryDelegate> historyDelegate = webView->historyDelegate();
if (historyDelegate) {
String url(loader->urlForHistory().string());
String title(loader->title());
String redirectSource(loader->clientRedirectSourceForHistory());
OwnPtr<WebURLResponse> urlResponse(WebURLResponse::createInstance(loader->response()));
OwnPtr<WebMutableURLRequest> urlRequest(WebMutableURLRequest::createInstance(loader->originalRequestCopy()));
OwnPtr<WebNavigationData> navigationData(WebNavigationData::createInstance(url.utf8().data(), title.utf8().data(), urlRequest.get(), urlResponse.get(), loader->substituteData().isValid(), redirectSource.utf8().data()));
historyDelegate->didNavigateWithNavigationData(webView, navigationData.get(), m_webFrame);
return;
}
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
history->visitedURL(strdup(loader->urlForHistory().string().utf8().data()), strdup(loader->title().utf8().data()), strdup(loader->originalRequestCopy().httpMethod().utf8().data()), loader->urlForHistoryReflectsFailure());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:25,代码来源:WebFrameLoaderClient.cpp
示例4: PLATFORM
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
#if PLATFORM(AMIGAOS4)
if (!m_webFrame->parentFrame()) {
BalWidget* viewWindow = m_webFrame->webView()->viewWindow();
if (viewWindow && viewWindow->window) {
extern char* utf8ToAmiga(const char* utf8);
char *titlestr = utf8ToAmiga(title.utf8().data());
if (titlestr && titlestr[0])
snprintf(viewWindow->title, sizeof(viewWindow->title), viewWindow->clickTabNode ? "%s" : "OWB: %s", titlestr);
else
strcpy(viewWindow->title, "Origyn Web Browser");
free(titlestr);
if (amigaConfig.tabs) {
IIntuition->SetGadgetAttrs(viewWindow->gad_clicktab, viewWindow->window, NULL,
CLICKTAB_Labels, ~0,
TAG_DONE);
IClickTab->SetClickTabNodeAttrs(viewWindow->clickTabNode, TNA_Text, viewWindow->title, TAG_DONE);
IIntuition->RefreshSetGadgetAttrs(viewWindow->gad_clicktab, viewWindow->window, NULL,
CLICKTAB_Labels, viewWindow->clickTabList,
TAG_DONE);
}
else
IIntuition->SetWindowTitles(viewWindow->window, viewWindow->title, (STRPTR)~0UL);
CString urlLatin1 = url.prettyURL().latin1();
const char *urlstr = urlLatin1.data();
if (urlstr && urlstr[0] && viewWindow->gad_url) {
snprintf(viewWindow->url, sizeof(viewWindow->url), "%s", urlstr);
if (ILayout->SetPageGadgetAttrs(viewWindow->gad_url, viewWindow->page,
viewWindow->window, NULL,
STRINGA_TextVal, viewWindow->url,
TAG_DONE))
ILayout->RefreshPageGadget(viewWindow->gad_url, viewWindow->page, viewWindow->window, NULL);
}
}
}
#endif
bool privateBrowsingEnabled = false;
WebPreferences* preferences = m_webFrame->webView()->preferences();
if (preferences)
privateBrowsingEnabled = preferences->privateBrowsingEnabled();
if (privateBrowsingEnabled)
return;
// update title in global history
WebHistory* history = webHistory();
if (!history)
return;
WebHistoryItem* item = history->itemForURL(url.string());
if (!item)
return;
item->setTitle(title.utf8().data());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:60,代码来源:WebFrameLoaderClient.cpp
示例5: updateGlobalHistory
void WebFrameLoaderClient::updateGlobalHistory()
{
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
history->addItem(loader->urlForHistory(), loader->title(), loader->urlForHistoryReflectsFailure());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:8,代码来源:WebFrameLoaderClient.cpp
示例6: updateGlobalHistory
void WebFrameLoaderClient::updateGlobalHistory()
{
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
history->visitedURL(loader->urlForHistory(), loader->title(), loader->originalRequestCopy().httpMethod(), loader->urlForHistoryReflectsFailure(), !loader->clientRedirectSourceForHistory());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:9,代码来源:WebFrameLoaderClient.cpp
示例7: populateVisitedLinks
void WebChromeClient::populateVisitedLinks()
{
SharedPtr<WebHistoryDelegate> historyDelegate = m_webView->historyDelegate();
if (historyDelegate) {
historyDelegate->populateVisitedLinksForWebView(m_webView);
return;
}
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
history->addVisitedLinksToPageGroup(m_webView->page()->group());
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:13,代码来源:WebChromeClient.cpp
示例8: PLATFORM
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
#if PLATFORM(AMIGAOS4)
if (!m_webFrame->parentFrame()) {
BalWidget* viewWindow = m_webFrame->webView()->viewWindow();
if (viewWindow && viewWindow->window) {
CString titleLatin1 = title.latin1();
const char *titlestr = titleLatin1.data();
if (titlestr && titlestr[0])
snprintf(viewWindow->title, sizeof(viewWindow->title), "OWB: %s", titlestr);
else
strcpy(viewWindow->title, "Origyn Web Browser");
IIntuition->SetWindowTitles(viewWindow->window, viewWindow->title, (STRPTR)~0UL);
CString urlLatin1 = url.prettyURL().latin1();
const char *urlstr = urlLatin1.data();
if (urlstr && urlstr[0] && viewWindow->gad_url) {
snprintf(viewWindow->url, sizeof(viewWindow->url), "%s", urlstr);
IIntuition->RefreshSetGadgetAttrs(viewWindow->gad_url, viewWindow->window, NULL,
STRINGA_TextVal, viewWindow->url,
TAG_DONE);
}
}
}
#endif
bool privateBrowsingEnabled = false;
WebPreferences* preferences = m_webFrame->webView()->preferences();
if (preferences)
privateBrowsingEnabled = preferences->privateBrowsingEnabled();
if (privateBrowsingEnabled)
return;
// update title in global history
WebHistory* history = webHistory();
if (!history)
return;
WebHistoryItem* item = history->itemForURL(url.string());
if (!item)
return;
item->setTitle(title);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:43,代码来源:WebFrameLoaderClient.cpp
示例9: webHistory
void WebFrameLoaderClient::setTitle(const String& title, const KURL& url)
{
bool privateBrowsingEnabled = false;
WebPreferences* preferences = m_webFrame->webView()->preferences();
if (preferences)
privateBrowsingEnabled = preferences->privateBrowsingEnabled();
if (privateBrowsingEnabled)
return;
// update title in global history
WebHistory* history = webHistory();
if (!history)
return;
WebHistoryItem* item = history->itemForURL(url.string());
if (!item)
return;
item->setTitle(title);
}
开发者ID:acss,项目名称:owb-mirror,代码行数:20,代码来源:WebFrameLoaderClient.cpp
示例10: core
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
{
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
ASSERT(loader->unreachableURL().isEmpty());
if (!loader->clientRedirectSourceForHistory().isNull()) {
if (WebHistoryItem *webHistoryItem = history->itemForURLString(loader->clientRedirectSourceForHistory())) {
webHistoryItem->getPrivateItem()->m_historyItem.get()->addRedirectURL(loader->clientRedirectDestinationForHistory());
}
}
if (!loader->serverRedirectSourceForHistory().isNull()) {
if (WebHistoryItem *webHistoryItem = history->itemForURLString(loader->serverRedirectSourceForHistory())) {
webHistoryItem->getPrivateItem()->m_historyItem.get()->addRedirectURL(loader->serverRedirectDestinationForHistory());
}
}
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:20,代码来源:WebFrameLoaderClient.cpp
示例11: core
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
{
WebView* webView = m_webFrame->webView();
COMPtr<IWebHistoryDelegate> historyDelegate;
webView->historyDelegate(&historyDelegate);
WebHistory* history = WebHistory::sharedHistory();
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
ASSERT(loader->unreachableURL().isEmpty());
if (!loader->clientRedirectSourceForHistory().isNull()) {
if (historyDelegate) {
BString sourceURL(loader->clientRedirectSourceForHistory());
BString destURL(loader->clientRedirectDestinationForHistory());
historyDelegate->didPerformClientRedirectFromURL(webView, sourceURL, destURL, m_webFrame);
} else {
if (history) {
if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->clientRedirectSourceForHistory())) {
COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
webHistoryItem->historyItem()->addRedirectURL(loader->clientRedirectDestinationForHistory());
}
}
}
}
if (!loader->serverRedirectSourceForHistory().isNull()) {
if (historyDelegate) {
BString sourceURL(loader->serverRedirectSourceForHistory());
BString destURL(loader->serverRedirectDestinationForHistory());
historyDelegate->didPerformServerRedirectFromURL(webView, sourceURL, destURL, m_webFrame);
} else {
if (history) {
if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->serverRedirectSourceForHistory())) {
COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
webHistoryItem->historyItem()->addRedirectURL(loader->serverRedirectDestinationForHistory());
}
}
}
}
}
开发者ID:,项目名称:,代码行数:41,代码来源:
示例12: core
void WebFrameLoaderClient::updateGlobalHistoryRedirectLinks()
{
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
DocumentLoader* loader = core(m_webFrame)->loader()->documentLoader();
if (!loader->clientRedirectSourceForHistory().isNull()) {
if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->clientRedirectSourceForHistory())) {
COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
webHistoryItem->historyItem()->addRedirectURL(loader->clientRedirectDestinationForHistory());
}
}
if (!loader->serverRedirectSourceForHistory().isNull()) {
if (COMPtr<IWebHistoryItem> iWebHistoryItem = history->itemForURLString(loader->serverRedirectSourceForHistory())) {
COMPtr<WebHistoryItem> webHistoryItem(Query, iWebHistoryItem);
webHistoryItem->historyItem()->addRedirectURL(loader->serverRedirectDestinationForHistory());
}
}
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:22,代码来源:WebFrameLoaderClient.cpp
示例13: kit
void WebVisitedLinkStore::populateVisitedLinksIfNeeded(Page& sourcePage)
{
if (m_visitedLinksPopulated)
return;
m_visitedLinksPopulated = true;
WebView* webView = kit(&sourcePage);
if (!webView)
return;
COMPtr<IWebHistoryDelegate> historyDelegate;
webView->historyDelegate(&historyDelegate);
if (historyDelegate) {
historyDelegate->populateVisitedLinksForWebView(webView);
return;
}
WebHistory* history = WebHistory::sharedHistory();
if (!history)
return;
history->addVisitedLinksToVisitedLinkStore(*this);
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:23,代码来源:WebVisitedLinkStore.cpp
示例14: WebHistory
WebHistory* WebHistory::createInstance()
{
WebHistory* instance = new WebHistory();
instance->AddRef();
return instance;
}
开发者ID:,项目名称:,代码行数:6,代码来源:
注:本文中的WebHistory类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论