本文整理汇总了C++中Document::HostsUsingFeaturesValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Document::HostsUsingFeaturesValue方法的具体用法?C++ Document::HostsUsingFeaturesValue怎么用?C++ Document::HostsUsingFeaturesValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document::HostsUsingFeaturesValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: documentDetached
void HostsUsingFeatures::documentDetached(Document& document)
{
HostsUsingFeatures::Value counter = document.HostsUsingFeaturesValue();
if (counter.isEmpty())
return;
const KURL& url = document.url();
if (!url.protocolIsInHTTPFamily())
return;
m_urlAndValues.append(std::make_pair(url, counter));
document.HostsUsingFeaturesValue().clear();
DCHECK(document.HostsUsingFeaturesValue().isEmpty());
}
示例2: countHostOrIsolatedWorldHumanReadableName
void HostsUsingFeatures::countHostOrIsolatedWorldHumanReadableName(const ScriptState* scriptState, EventTarget& target, Feature feature)
{
if (!scriptState)
return;
Document* document = documentFromEventTarget(target);
if (!document)
return;
if (scriptState->world().isMainWorld()) {
document->HostsUsingFeaturesValue().count(feature);
return;
}
if (Page* page = document->page())
page->hostsUsingFeatures().countName(feature, scriptState->world().isolatedWorldHumanReadableName());
}
示例3: countAnyWorld
void HostsUsingFeatures::countAnyWorld(Document& document, Feature feature)
{
document.HostsUsingFeaturesValue().count(feature);
}