截断加载plugin的具体位置

来源:互联网 发布:进销存软件免费下载 编辑:程序博客网 时间:2024/04/27 15:07
bool SubframeLoader::requestPlugin(HTMLPlugInImageElement* ownerElement, const KURL& url, const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
{
    Settings* settings = m_frame->settings();
    if ((!allowPlugins(AboutToInstantiatePlugin)
         // Application plug-ins are plug-ins implemented by the user agent, for example Qt plug-ins,
         // as opposed to third-party code such as Flash. The user agent decides whether or not they are
         // permitted, rather than WebKit.
         && !MIMETypeRegistry::isApplicationPluginMIMEType(mimeType))
        || (!settings->isJavaEnabled() && MIMETypeRegistry::isJavaAppletMIMEType(mimeType)))
        return false;

    if (m_frame->document()) {
        if (m_frame->document()->securityOrigin()->isSandboxed(SandboxPlugins))
            return false;
        if (!m_frame->document()->contentSecurityPolicy()->allowObjectFromSource(url))
            return false;
    }

    ASSERT(ownerElement->hasTagName(objectTag) || ownerElement->hasTagName(embedTag));
    return loadPlugin(ownerElement, url, mimeType, paramNames, paramValues, useFallback);
}


android 4.0.1 下的

loader/SubframeLoader.cpp

里面


原创粉丝点击