当前位置: 首页>>代码示例>>C++>>正文


C++ WebLocalFrameImpl::frame方法代码示例

本文整理汇总了C++中WebLocalFrameImpl::frame方法的典型用法代码示例。如果您正苦于以下问题:C++ WebLocalFrameImpl::frame方法的具体用法?C++ WebLocalFrameImpl::frame怎么用?C++ WebLocalFrameImpl::frame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebLocalFrameImpl的用法示例。


在下文中一共展示了WebLocalFrameImpl::frame方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: initializeFromFrame

void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const
{
    ASSERT(source);
    WebLocalFrameImpl* localFrameImpl = toWebLocalFrameImpl(source);
    client()->initializeChildFrame(
        localFrameImpl->frame()->view()->frameRect(),
        localFrameImpl->frame()->view()->visibleContentScaleFactor());
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:8,代码来源:WebRemoteFrameImpl.cpp

示例2: initializeFromFrame

void WebRemoteFrameImpl::initializeFromFrame(WebLocalFrame* source) const
{
    DCHECK(source);
    WebLocalFrameImpl* localFrameImpl = toWebLocalFrameImpl(source);

    client()->initializeChildFrame(
        localFrameImpl->frame()->view()->frameRect(),
        localFrameImpl->frame()->page()->deviceScaleFactor());
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:9,代码来源:WebRemoteFrameImpl.cpp

示例3: serialize

bool WebPageSerializerImpl::serialize()
{
    bool didSerialization = false;
    KURL mainURL = m_specifiedWebLocalFrameImpl->frame()->document()->url();

    WebLocalFrameImpl* webFrame = m_specifiedWebLocalFrameImpl;
    Document* document = webFrame->frame()->document();
    const KURL& url = document->url();

    if (url.isValid() && m_localLinks.contains(url.string())) {
        didSerialization = true;

        const WTF::TextEncoding& textEncoding = document->encoding().isValid() ? document->encoding() : UTF8Encoding();
        String directoryName = url == mainURL ? m_localDirectoryName : "";

        SerializeDomParam param(url, textEncoding, document, directoryName);

        Element* documentElement = document->documentElement();
        if (documentElement)
            buildContentForNode(documentElement, &param);

        encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &param, ForceFlush);
    } else {
        // Report empty contents for invalid URLs.
        m_client->didSerializeDataForFrame(
            url, WebCString(),
            WebPageSerializerClient::CurrentFrameIsFinished);
    }

    ASSERT(m_dataBuffer.isEmpty());
    return didSerialization;
}
开发者ID:iHaD,项目名称:chromium-1,代码行数:32,代码来源:WebPageSerializerImpl.cpp

示例4: didStopLoading

void WebRemoteFrameImpl::didStopLoading()
{
    frame()->setIsLoading(false);
    if (parent() && parent()->isWebLocalFrame()) {
        WebLocalFrameImpl* parentFrame =
            toWebLocalFrameImpl(parent()->toWebLocalFrame());
        parentFrame->frame()->loader().checkCompleted();
    }
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:9,代码来源:WebRemoteFrameImpl.cpp

示例5: loadShadowPage

void WebSharedWorkerImpl::loadShadowPage()
{
    WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame());

    // Construct substitute data source for the 'shadow page'. We only need it
    // to have same origin as the worker so the loading checks work correctly.
    CString content("");
    RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), content.length()));
    webFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_url), SubstituteData(buffer, "text/html", "UTF-8", KURL())));
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:10,代码来源:WebSharedWorkerImpl.cpp

示例6: createLocalChild

WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, const WebString& name, const WebString& uniqueName, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling, const WebFrameOwnerProperties& frameOwnerProperties, WebFrame* opener)
{
    WebLocalFrameImpl* child = WebLocalFrameImpl::create(scope, client, opener);
    insertAfter(child, previousSibling);
    RawPtr<RemoteFrameOwner> owner = RemoteFrameOwner::create(static_cast<SandboxFlags>(sandboxFlags), frameOwnerProperties);
    // FIXME: currently this calls LocalFrame::init() on the created LocalFrame, which may
    // result in the browser observing two navigations to about:blank (one from the initial
    // frame creation, and one from swapping it into the remote process). FrameLoader might
    // need a special initialization function for this case to avoid that duplicate navigation.
    child->initializeCoreFrame(frame()->host(), owner.get(), name, uniqueName);
    // Partially related with the above FIXME--the init() call may trigger JS dispatch. However,
    // if the parent is remote, it should never be detached synchronously...
    DCHECK(child->frame());
    return child;
}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:15,代码来源:WebRemoteFrameImpl.cpp

示例7: createLocalChild

WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, const WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling, const WebFrameOwnerProperties& frameOwnerProperties)
{
    WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client));
    WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult result =
        m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(child, static_cast<SandboxFlags>(sandboxFlags), frameOwnerProperties));
    insertAfter(child, previousSibling);
    // FIXME: currently this calls LocalFrame::init() on the created LocalFrame, which may
    // result in the browser observing two navigations to about:blank (one from the initial
    // frame creation, and one from swapping it into the remote process). FrameLoader might
    // need a special initialization function for this case to avoid that duplicate navigation.
    child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom);
    // Partially related with the above FIXME--the init() call may trigger JS dispatch. However,
    // if the parent is remote, it should never be detached synchronously...
    ASSERT(child->frame());
    return child;
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:16,代码来源:WebRemoteFrameImpl.cpp

示例8: retrieveAllResources

bool WebPageSerializer::retrieveAllResources(WebView* view,
                                             const WebVector<WebCString>& supportedSchemes,
                                             WebVector<WebURL>* resourceURLs,
                                             WebVector<WebURL>* frameURLs) {
    WebLocalFrameImpl* mainFrame = toWebLocalFrameImpl(view->mainFrame());
    if (!mainFrame)
        return false;

    Vector<LocalFrame*> framesToVisit;
    Vector<LocalFrame*> visitedFrames;
    Vector<KURL> frameKURLs;
    Vector<KURL> resourceKURLs;

    // Let's retrieve the resources from every frame in this page.
    framesToVisit.append(mainFrame->frame());
    while (!framesToVisit.isEmpty()) {
        LocalFrame* frame = framesToVisit[0];
        framesToVisit.remove(0);
        retrieveResourcesForFrame(frame, supportedSchemes,
                                  &visitedFrames, &framesToVisit,
                                  &frameKURLs, &resourceKURLs);
    }

    // Converts the results to WebURLs.
    WebVector<WebURL> resultResourceURLs(resourceKURLs.size());
    for (size_t i = 0; i < resourceKURLs.size(); ++i) {
        resultResourceURLs[i] = resourceKURLs[i];
        // A frame's src can point to the same URL as another resource, keep the
        // resource URL only in such cases.
        size_t index = frameKURLs.find(resourceKURLs[i]);
        if (index != kNotFound)
            frameKURLs.remove(index);
    }
    *resourceURLs = resultResourceURLs;
    WebVector<WebURL> resultFrameURLs(frameKURLs.size());
    for (size_t i = 0; i < frameKURLs.size(); ++i)
        resultFrameURLs[i] = frameKURLs[i];
    *frameURLs = resultFrameURLs;

    return true;
}
开发者ID:coinpayee,项目名称:blink,代码行数:41,代码来源:WebPageSerializer.cpp

示例9: lastChild

Frame* FrameLoaderClientImpl::lastChild() const
{
    WebLocalFrameImpl* frame = toWebLocalFrameImpl(m_webFrame->lastChild());
    return frame ? frame->frame() : 0;
}
开发者ID:coinpayee,项目名称:blink,代码行数:5,代码来源:FrameLoaderClientImpl.cpp

示例10: nextSibling

Frame* FrameLoaderClientImpl::nextSibling() const
{
    WebLocalFrameImpl* frame = toWebLocalFrameImpl(m_webFrame->nextSibling());
    return frame ? frame->frame() : 0;
}
开发者ID:coinpayee,项目名称:blink,代码行数:5,代码来源:FrameLoaderClientImpl.cpp

示例11: parent

Frame* FrameLoaderClientImpl::parent() const
{
    WebLocalFrameImpl* frame = toWebLocalFrameImpl(m_webFrame->parent());
    return frame ? frame->frame() : 0;
}
开发者ID:coinpayee,项目名称:blink,代码行数:5,代码来源:FrameLoaderClientImpl.cpp

示例12: opener

Frame* FrameLoaderClientImpl::opener() const
{
    WebLocalFrameImpl* opener = toWebLocalFrameImpl(m_webFrame->opener());
    return opener ? opener->frame() : 0;
}
开发者ID:coinpayee,项目名称:blink,代码行数:5,代码来源:FrameLoaderClientImpl.cpp

示例13: isActiveMatchFrameValid

bool TextFinder::isActiveMatchFrameValid() const
{
    WebLocalFrameImpl* mainFrameImpl = m_ownerFrame.viewImpl()->mainFrameImpl();
    WebLocalFrameImpl* activeMatchFrame = mainFrameImpl->activeMatchFrame();
    return activeMatchFrame && activeMatchFrame->activeMatch() && activeMatchFrame->frame()->tree().isDescendantOf(mainFrameImpl->frame());
}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:6,代码来源:TextFinder.cpp


注:本文中的WebLocalFrameImpl::frame方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。