本文整理汇总了C++中HTMLPlugInImageElement::restartSnapshottedPlugIn方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLPlugInImageElement::restartSnapshottedPlugIn方法的具体用法?C++ HTMLPlugInImageElement::restartSnapshottedPlugIn怎么用?C++ HTMLPlugInImageElement::restartSnapshottedPlugIn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLPlugInImageElement
的用法示例。
在下文中一共展示了HTMLPlugInImageElement::restartSnapshottedPlugIn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: restartSimilarPlugIns
void HTMLPlugInImageElement::restartSimilarPlugIns()
{
// Restart any other snapshotted plugins in the page with the same origin. Note that they
// may be in different frames, so traverse from the top of the document.
String plugInOrigin = m_loadedUrl.host();
String mimeType = loadedMimeType();
HTMLPlugInImageElementList similarPlugins;
if (!document()->page())
return;
for (Frame* frame = document()->page()->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
if (!frame->loader()->subframeLoader()->containsPlugins())
continue;
if (!frame->document())
continue;
RefPtr<NodeList> plugIns = frame->document()->getElementsByTagName(embedTag.localName());
if (plugIns)
addPlugInsFromNodeListMatchingPlugInOrigin(similarPlugins, plugIns, plugInOrigin, mimeType);
plugIns = frame->document()->getElementsByTagName(objectTag.localName());
if (plugIns)
addPlugInsFromNodeListMatchingPlugInOrigin(similarPlugins, plugIns, plugInOrigin, mimeType);
}
for (size_t i = 0, length = similarPlugins.size(); i < length; ++i) {
HTMLPlugInImageElement* plugInToRestart = similarPlugins[i].get();
if (plugInToRestart->displayState() <= HTMLPlugInElement::DisplayingSnapshot) {
LOG(Plugins, "%p Plug-in looks similar to a restarted plug-in. Restart.", plugInToRestart);
plugInToRestart->setDisplayState(Playing);
plugInToRestart->restartSnapshottedPlugIn();
}
plugInToRestart->m_snapshotDecision = NeverSnapshot;
}
}