本文整理汇总了C++中StringWithDirection::string方法的典型用法代码示例。如果您正苦于以下问题:C++ StringWithDirection::string方法的具体用法?C++ StringWithDirection::string怎么用?C++ StringWithDirection::string使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringWithDirection
的用法示例。
在下文中一共展示了StringWithDirection::string方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setTitle
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
{
WebView* webView = m_webFrame->webView();
COMPtr<IWebHistoryDelegate> historyDelegate;
webView->historyDelegate(&historyDelegate);
if (historyDelegate) {
BString titleBSTR(title.string());
BString urlBSTR(url.string());
historyDelegate->updateHistoryTitle(webView, titleBSTR, urlBSTR);
return;
}
BOOL privateBrowsingEnabled = FALSE;
COMPtr<IWebPreferences> preferences;
if (SUCCEEDED(m_webFrame->webView()->preferences(&preferences)))
preferences->privateBrowsingEnabled(&privateBrowsingEnabled);
if (privateBrowsingEnabled)
return;
// update title in global history
COMPtr<WebHistory> history = webHistory();
if (!history)
return;
COMPtr<IWebHistoryItem> item;
if (FAILED(history->itemForURL(BString(url.string()), &item)))
return;
COMPtr<IWebHistoryItemPrivate> itemPrivate(Query, item);
if (!itemPrivate)
return;
itemPrivate->setTitle(BString(title.string()));
}
示例2: dispatchDidReceiveTitle
void FrameLoaderClientBlackBerry::dispatchDidReceiveTitle(const StringWithDirection& title)
{
if (isMainFrame())
m_webPagePrivate->m_client->setPageTitle(title.string().characters(), title.string().length());
if (m_webPagePrivate->m_dumpRenderTree)
m_webPagePrivate->m_dumpRenderTree->didReceiveTitleForFrame(title.string(), m_frame);
}
示例3: dispatchDidReceiveTitle
void FrameLoaderClientWx::dispatchDidReceiveTitle(const StringWithDirection& title)
{
if (m_webView) {
// FIXME: use direction of title.
m_webView->SetPageTitle(title.string());
wxWebViewReceivedTitleEvent wkEvent(m_webView);
wkEvent.SetTitle(title.string());
m_webView->GetEventHandler()->ProcessEvent(wkEvent);
}
}
示例4: setTitle
void FrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url)
{
WebKitWebFramePrivate* frameData = m_frame->priv;
g_free(frameData->title);
// FIXME: use direction of title.
frameData->title = g_strdup(title.string().utf8().data());
}
示例5: dispatchDidReceiveTitle
void WebFrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title)
{
WebView* webView = m_webFrame->webView();
COMPtr<IWebFrameLoadDelegate> frameLoadDelegate;
if (SUCCEEDED(webView->frameLoadDelegate(&frameLoadDelegate)))
// FIXME: use direction of title.
frameLoadDelegate->didReceiveTitle(webView, BString(title.string()), m_webFrame);
}
示例6: dispatchDidReceiveTitle
void FrameLoaderClientEfl::dispatchDidReceiveTitle(const StringWithDirection& title)
{
// FIXME: use direction of title.
CString cs = title.string().utf8();
ewk_frame_title_set(m_frame, cs.data());
if (ewk_view_frame_main_get(m_view) != m_frame)
return;
ewk_view_title_set(m_view, cs.data());
}
示例7: dispatchDidReceiveTitle
void FrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title)
{
if (m_loadingErrorPage)
return;
WebKitWebFramePrivate* priv = m_frame->priv;
g_free(priv->title);
// FIXME: use direction of title.
priv->title = g_strdup(title.string().utf8().data());
g_signal_emit_by_name(m_frame, "title-changed", priv->title);
g_object_notify(G_OBJECT(m_frame), "title");
WebKitWebView* webView = getViewFromFrame(m_frame);
if (m_frame == webkit_web_view_get_main_frame(webView)) {
g_signal_emit_by_name(webView, "title-changed", m_frame, title.string().utf8().data());
g_object_notify(G_OBJECT(webView), "title");
}
}
示例8: setTitle
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url)
{
WebPage* webPage = m_frame->page();
if (!webPage || !webPage->pageGroup()->isVisibleToHistoryClient())
return;
// FIXME: use direction of title.
WebProcess::shared().connection()->send(Messages::WebContext::DidUpdateHistoryTitle(webPage->pageID(),
title.string(), url.string(), m_frame->frameID()), 0);
}
示例9: dispatchDidReceiveTitle
void FrameLoaderClientEfl::dispatchDidReceiveTitle(const StringWithDirection& title)
{
Ewk_Text_With_Direction ewkTitle;
CString cs = title.string().utf8();
ewkTitle.string = cs.data();
ewkTitle.direction = (title.direction() == LTR) ? EWK_TEXT_DIRECTION_LEFT_TO_RIGHT : EWK_TEXT_DIRECTION_RIGHT_TO_LEFT;
ewk_frame_title_set(m_frame, &ewkTitle);
if (!isLoadingMainFrame())
return;
ewk_view_title_set(m_view, &ewkTitle);
}
示例10: initializeItem
void HistoryController::initializeItem(HistoryItem* item)
{
DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
ASSERT(documentLoader);
KURL unreachableURL = documentLoader->unreachableURL();
KURL url;
KURL originalURL;
if (!unreachableURL.isEmpty()) {
url = unreachableURL;
originalURL = unreachableURL;
} else {
url = documentLoader->url();
originalURL = documentLoader->originalURL();
}
// Frames that have never successfully loaded any content
// may have no URL at all. Currently our history code can't
// deal with such things, so we nip that in the bud here.
// Later we may want to learn to live with nil for URL.
// See bug 3368236 and related bugs for more information.
if (url.isEmpty())
url = blankURL();
if (originalURL.isEmpty())
originalURL = blankURL();
Frame* parentFrame = m_frame->tree()->parent();
String parent = parentFrame ? parentFrame->tree()->uniqueName() : "";
StringWithDirection title = documentLoader->title();
item->setURL(url);
item->setTarget(m_frame->tree()->uniqueName());
item->setParent(parent);
// FIXME: should store title directionality in history as well.
item->setTitle(title.string());
item->setOriginalURLString(originalURL.string());
if (!unreachableURL.isEmpty() || documentLoader->response().httpStatusCode() >= 400)
item->setLastVisitWasFailure(true);
// Save form state if this is a POST
item->setFormInfoFromRequest(documentLoader->request());
}
示例11: setCurrentItemTitle
void HistoryController::setCurrentItemTitle(const StringWithDirection& title)
{
if (m_currentItem)
// FIXME: make use of title.direction() as well.
m_currentItem->setTitle(title.string());
}