本文整理汇总了C++中FrameLoader::client方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameLoader::client方法的具体用法?C++ FrameLoader::client怎么用?C++ FrameLoader::client使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameLoader
的用法示例。
在下文中一共展示了FrameLoader::client方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: commitLoad
void DocumentLoader::commitLoad(const char* data, int length)
{
// Both unloading the old page and parsing the new page may execute JavaScript which destroys the datasource
// by starting a new load, so retain temporarily.
RefPtr<Frame> protectFrame(m_frame);
RefPtr<DocumentLoader> protectLoader(this);
commitIfReady();
FrameLoader* frameLoader = DocumentLoader::frameLoader();
if (!frameLoader)
return;
if (isArchiveMIMEType(response().mimeType()))
return;
frameLoader->client()->committedLoad(this, data, length);
}
示例2: updateForStandardLoad
void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
{
LOG(History, "WebCoreHistory: Updating History for Standard Load in frame %s", m_frame->loader()->documentLoader()->url().string().ascii().data());
FrameLoader* frameLoader = m_frame->loader();
Settings* settings = m_frame->settings();
bool needPrivacy = !settings || settings->privateBrowsingEnabled();
const KURL& historyURL = frameLoader->documentLoader()->urlForHistory();
if (!frameLoader->documentLoader()->isClientRedirect()) {
if (!historyURL.isEmpty()) {
if (updateType != UpdateAllExceptBackForwardList)
updateBackForwardListClippedAtTarget(true);
if (!needPrivacy) {
frameLoader->client()->updateGlobalHistory();
frameLoader->documentLoader()->setDidCreateGlobalHistoryEntry(true);
if (frameLoader->documentLoader()->unreachableURL().isEmpty())
frameLoader->client()->updateGlobalHistoryRedirectLinks();
}
m_frame->loader()->client()->updateGlobalHistoryItemForPage();
}
} else {
// The client redirect replaces the current history item.
updateCurrentItem();
}
if (!historyURL.isEmpty() && !needPrivacy) {
if (Page* page = m_frame->page())
addVisitedLink(page, historyURL);
if (!frameLoader->documentLoader()->didCreateGlobalHistoryEntry() && frameLoader->documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
frameLoader->client()->updateGlobalHistoryRedirectLinks();
}
}
示例3: parentFrame
/*!
Returns a list of all frames that are direct children of this frame.
\sa parentFrame()
*/
QList<QWebFrame*> QWebFrame::childFrames() const
{
QList<QWebFrame*> rc;
if (d->frame) {
FrameTree *tree = d->frame->tree();
for (Frame *child = tree->firstChild(); child; child = child->tree()->nextSibling()) {
FrameLoader *loader = child->loader();
FrameLoaderClientQt *client = static_cast<FrameLoaderClientQt*>(loader->client());
if (client)
rc.append(client->webFrame());
}
}
return rc;
}
示例4: commitLoad
void DocumentLoader::commitLoad(const char* data, int length)
{
// Both unloading the old page and parsing the new page may execute JavaScript which destroys the datasource
// by starting a new load, so retain temporarily.
RefPtr<DocumentLoader> protect(this);
commitIfReady();
FrameLoader* frameLoader = DocumentLoader::frameLoader();
if (!frameLoader)
return;
#if ENABLE(WEB_ARCHIVE)
if (ArchiveFactory::isArchiveMimeType(response().mimeType()))
return;
#endif
frameLoader->client()->committedLoad(this, data, length);
}
示例5: webkit_web_frame_get_children
/**
* webkit_web_frame_get_children:
* @frame: a #WebKitWebFrame
*
* Return value: child frames of @frame
*/
GSList* webkit_web_frame_get_children(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
Frame* coreFrame = core(frame);
ASSERT(coreFrame);
GSList* children = NULL;
for (Frame* child = coreFrame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
FrameLoader* loader = child->loader();
WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(loader->client());
if (client)
children = g_slist_append(children, client->webFrame());
}
return children;
}
示例6: getFrameChildren
/**
* getFrameChildren:
* @frame: a #WebKitWebFrame
*
* Return value: child frames of @frame
*/
GSList* DumpRenderTreeSupportGtk::getFrameChildren(WebKitWebFrame* frame)
{
g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), 0);
Frame* coreFrame = core(frame);
if (!coreFrame)
return 0;
GSList* children = 0;
for (Frame* child = coreFrame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
FrameLoader* loader = child->loader();
WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(loader->client());
if (client)
children = g_slist_append(children, client->webFrame());
}
return children;
}
示例7: loadPlugin
bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KURL& url, const String& mimeType,
const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback)
{
RenderEmbeddedObject* renderer = pluginElement->renderEmbeddedObject();
// FIXME: This code should not depend on renderer!
if (!renderer || useFallback)
return false;
if (!document()->securityOrigin()->canDisplay(url)) {
FrameLoader::reportLocalLoadFailed(m_frame, url.string());
return false;
}
if (!document()->contentSecurityPolicy()->allowObjectFromSource(url))
return false;
FrameLoader* frameLoader = m_frame->loader();
if (!frameLoader->checkIfRunInsecureContent(document()->securityOrigin(), url))
return false;
IntSize contentSize(renderer->contentWidth(), renderer->contentHeight());
// In iOS, we only tell plugin to be in full page mode if the containing plugin document is the top level document.
bool loadManually = document()->isPluginDocument() && !m_containsPlugins && toPluginDocument(document())->shouldLoadPluginManually() && !document()->ownerElement();
RefPtr<Widget> widget = frameLoader->client()->createPlugin(contentSize,
pluginElement, url, paramNames, paramValues, mimeType, loadManually);
if (!widget) {
renderer->setShowsMissingPluginIndicator();
return false;
}
renderer->setWidget(widget);
m_containsPlugins = true;
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO) || ENABLE(3D_PLUGIN)
pluginElement->setNeedsStyleRecalc(SyntheticStyleChange);
#endif
return true;
}
示例8: didBlockScript
void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo)
{
ASSERT(isMainThread());
m_document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, buildConsoleError(xssInfo, m_document->url().string()));
FrameLoader* frameLoader = m_document->frame()->loader();
if (xssInfo.m_didBlockEntirePage)
frameLoader->stopAllLoaders();
if (!m_didSendNotifications) {
m_didSendNotifications = true;
frameLoader->client()->didDetectXSS(m_document->url(), xssInfo.m_didBlockEntirePage);
if (!m_reportURL.isEmpty())
PingLoader::sendViolationReport(m_document->frame(), m_reportURL, generateViolationReport());
}
if (xssInfo.m_didBlockEntirePage)
m_document->frame()->navigationScheduler()->scheduleLocationChange(m_document->securityOrigin(), SecurityOrigin::urlWithUniqueSecurityOrigin(), String());
}
示例9: appendBytes
void MediaDocumentParser::appendBytes(DocumentWriter*, const char*, int len, bool)
{
// The media element may already exist, so just return if the number of bytes being appended is zero,
// since this can be called from DocumentWriter::endIfNotLoadingMainResource() when we're finishing up.
if (m_mediaElement && !len)
return;
ASSERT(!m_mediaElement);
if (m_mediaElement)
return;
createDocumentStructure();
finish();
#if PLATFORM(BLACKBERRY) && OS(QNX)
Document* doc = document();
if (!doc)
return;
Frame* frame = doc->frame();
if (!frame)
return;
FrameLoader* frameLoader = frame->loader();
if (!frameLoader)
return;
FrameLoaderClientBlackBerry* client = static_cast<FrameLoaderClientBlackBerry*>(frameLoader->client());
if (!client)
return;
// We want to cancel the loading of data now that the media element has been created and the renderer is loading
// the data to play. WebKit no longer needs to load any more data here.
client->setCancelLoadOnNextData();
#endif
}