void PluginDocument::cancelManualPluginLoad() { // PluginDocument::cancelManualPluginLoad should only be called once, but there are issues // with how many times we call beforeload on object elements. <rdar://problem/8441094>. if (!shouldLoadPluginManually()) return; DocumentLoader* documentLoader = frame()->loader().activeDocumentLoader(); documentLoader->cancelMainResourceLoad(frame()->loader().cancelledError(documentLoader->request())); setShouldLoadPluginManually(false); }
void PluginView::cancelManualStreamLoad() { if (!frame()) return; DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader(); ASSERT(documentLoader); if (documentLoader->isLoadingMainResource()) documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(m_parameters.url)); }
void PluginStream::stop() { m_streamState = StreamStopped; if (m_loadManually) { ASSERT(!m_loader); DocumentLoader* documentLoader = m_frame->loader()->activeDocumentLoader(); ASSERT(documentLoader); if (documentLoader->isLoadingMainResource()) documentLoader->cancelMainResourceLoad(m_frame->loader()->cancelledError(m_resourceRequest)); return; } if (m_loader) { m_loader->cancel(); m_loader = 0; } }