您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ toWebLocalFrameImpl函数代码示例

51自学网 2021-06-03 08:53:46
  C++
这篇教程C++ toWebLocalFrameImpl函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中toWebLocalFrameImpl函数的典型用法代码示例。如果您正苦于以下问题:C++ toWebLocalFrameImpl函数的具体用法?C++ toWebLocalFrameImpl怎么用?C++ toWebLocalFrameImpl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: isBackForwardLoadType

NavigationPolicy FrameLoaderClientImpl::decidePolicyForNavigation(const ResourceRequest& request, DocumentLoader* loader, NavigationType type, NavigationPolicy policy, bool replacesCurrentHistoryItem){    if (!m_webFrame->client())        return NavigationPolicyIgnore;    if (policy == NavigationPolicyNewBackgroundTab && !allowCreatingBackgroundTabs() && !UIEventWithKeyState::newTabModifierSetFromIsolatedWorld())        policy = NavigationPolicyNewForegroundTab;    WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(loader);    // Newly created child frames may need to be navigated to a history item    // during a back/forward navigation. This will only happen when the parent    // is a LocalFrame doing a back/forward navigation that has not completed.    // (If the load has completed and the parent later adds a frame with script,    // we do not want to use a history item for it.)    bool isHistoryNavigationInNewChildFrame = m_webFrame->parent()        && m_webFrame->parent()->isWebLocalFrame()        && isBackForwardLoadType(toWebLocalFrameImpl(m_webFrame->parent())->frame()->loader().loadType())        && !toWebLocalFrameImpl(m_webFrame->parent())->frame()->document()->loadEventFinished();    WrappedResourceRequest wrappedResourceRequest(request);    WebFrameClient::NavigationPolicyInfo navigationInfo(wrappedResourceRequest);    navigationInfo.navigationType = static_cast<WebNavigationType>(type);    navigationInfo.defaultPolicy = static_cast<WebNavigationPolicy>(policy);    navigationInfo.extraData = ds ? ds->extraData() : nullptr;    navigationInfo.replacesCurrentHistoryItem = replacesCurrentHistoryItem;    navigationInfo.isHistoryNavigationInNewChildFrame = isHistoryNavigationInNewChildFrame;    WebNavigationPolicy webPolicy = m_webFrame->client()->decidePolicyForNavigation(navigationInfo);    return static_cast<NavigationPolicy>(webPolicy);}
开发者ID:joone,项目名称:chromium-crosswalk,代码行数:31,


示例2: DCHECK

WebDOMFileSystem WebDOMFileSystem::create(    WebLocalFrame* frame,    WebFileSystemType type,    const WebString& name,    const WebURL& rootURL,    SerializableType serializableType){    DCHECK(frame);    DCHECK(toWebLocalFrameImpl(frame)->frame());    DOMFileSystem* domFileSystem = DOMFileSystem::create(toWebLocalFrameImpl(frame)->frame()->document(), name, static_cast<FileSystemType>(type), rootURL);    if (serializableType == SerializableTypeSerializable)        domFileSystem->makeClonable();    return WebDOMFileSystem(domFileSystem);}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:14,


示例3: WebHelperPluginImpl

WebHelperPlugin* WebHelperPlugin::create(const WebString& pluginType, WebLocalFrame* frame){    OwnPtr<WebHelperPlugin> plugin = adoptPtr<WebHelperPlugin>(new WebHelperPluginImpl());    if (!toWebHelperPluginImpl(plugin.get())->initialize(pluginType, toWebLocalFrameImpl(frame)))        return 0;    return plugin.leakPtr();}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:7,


示例4: toWebLocalFrameImpl

void FrameLoaderClientImpl::dispatchDidClearWindowObjectInMainWorld() {  if (m_webFrame->client()) {    m_webFrame->client()->didClearWindowObject(m_webFrame);    Document* document = m_webFrame->frame()->document();    if (document) {      DeviceMotionController::from(*document);      DeviceOrientationController::from(*document);      DeviceOrientationAbsoluteController::from(*document);      if (RuntimeEnabledFeatures::deviceLightEnabled())        DeviceLightController::from(*document);      NavigatorGamepad::from(*document);      NavigatorServiceWorker::from(*document);      DOMWindowStorageController::from(*document);      if (RuntimeEnabledFeatures::webVREnabled() ||          OriginTrials::webVREnabled(document->getExecutionContext()))        NavigatorVR::from(*document);    }  }  // FIXME: when extensions go out of process, this whole concept stops working.  WebDevToolsFrontendImpl* devToolsFrontend =      m_webFrame->top()->isWebLocalFrame()          ? toWebLocalFrameImpl(m_webFrame->top())->devToolsFrontend()          : nullptr;  if (devToolsFrontend)    devToolsFrontend->didClearWindowObject(m_webFrame);}
开发者ID:mirror,项目名称:chromium,代码行数:26,


示例5: DCHECK

void WebSharedWorkerImpl::initializeLoader() {  // Create 'shadow page'. This page is never displayed, it is used to proxy the  // loading requests from the worker context to the rest of WebKit and Chromium  // infrastructure.  DCHECK(!m_webView);  m_webView = WebView::create(nullptr, WebPageVisibilityStateVisible);  // FIXME: http://crbug.com/363843. This needs to find a better way to  // not create graphics layers.  m_webView->settings()->setAcceleratedCompositingEnabled(false);  // FIXME: Settings information should be passed to the Worker process from  // Browser process when the worker is created (similar to  // RenderThread::OnCreateNewView).  m_mainFrame = toWebLocalFrameImpl(      WebLocalFrame::create(WebTreeScopeType::Document, this));  m_webView->setMainFrame(m_mainFrame.get());  m_mainFrame->setDevToolsAgentClient(this);  // If we were asked to pause worker context on start and wait for debugger  // then it is the good time to do that.  m_client->workerReadyForInspection();  if (m_pauseWorkerContextOnStart) {    m_isPausedOnStart = true;    return;  }  loadShadowPage();}
开发者ID:mirror,项目名称:chromium,代码行数:26,


示例6: toWebLocalFrameImpl

void ChromeClientImpl::setScrollbarsVisible(bool value){    m_windowFeatures.scrollbarsVisible = value;    WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame());    if (webFrame)        webFrame->setCanHaveScrollbars(value);}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:7,


示例7: plugin

WebHelperPlugin* WebHelperPlugin::create(const WebString& pluginType, WebLocalFrame* frame){    WebHelperPluginUniquePtr plugin(new WebHelperPluginImpl());    if (!toWebHelperPluginImpl(plugin.get())->initialize(pluginType, toWebLocalFrameImpl(frame)))        return 0;    return plugin.release();}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:7,


示例8: WebString

WebString WebFrameContentDumper::dumpFrameTreeAsText(WebLocalFrame* frame, size_t maxChars){    if (!frame)        return WebString();    StringBuilder text;    frameContentAsPlainText(maxChars, toWebLocalFrameImpl(frame)->frame(), text);    return text.toString();}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:8,


示例9: findMatchRects

void TextFinder::findMatchRects(WebVector<WebFloatRect>& outputRects){    Vector<WebFloatRect> matchRects;    for (WebLocalFrameImpl* frame = &m_ownerFrame; frame; frame = toWebLocalFrameImpl(frame->traverseNext(false)))        frame->ensureTextFinder().appendFindMatchRects(matchRects);    outputRects = matchRects;}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:8,


示例10: ASSERT

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,


示例11: DCHECK

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,


示例12: frame

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


示例13: ASSERT

WebSharedWorkerImpl::~WebSharedWorkerImpl(){    ASSERT(m_webView);    // Detach the client before closing the view to avoid getting called back.    toWebLocalFrameImpl(m_mainFrame)->setClient(0);    m_webView->close();    m_mainFrame->close();}
开发者ID:kjthegod,项目名称:WebKit,代码行数:9,


示例14: toWebLocalFrameImpl

// staticWebRange WebRange::fromDocumentRange(WebLocalFrame* frame, int start, int length){    LocalFrame* webFrame = toWebLocalFrameImpl(frame)->frame();    Element* selectionRoot = webFrame->selection().rootEditableElement();    ContainerNode* scope = selectionRoot ? selectionRoot : webFrame->document()->documentElement();    const EphemeralRange range = PlainTextRange(start, start + length).createRange(*scope);    if (range.isNull())        return WebRange();    return Range::create(range.document(), range.startPosition(), range.endPosition());}
开发者ID:smishenk,项目名称:chromium-crosswalk,代码行数:11,


示例15: toWebLocalFrameImpl

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,


示例16: toWebLocalFrameImpl

WebData WebFrameSerializer::generateMHTMLHeader(    const WebString& boundary, WebLocalFrame* frame){    Document* document = toWebLocalFrameImpl(frame)->frame()->document();    RefPtr<SharedBuffer> buffer = SharedBuffer::create();    MHTMLArchive::generateMHTMLHeader(        boundary, document->title(), document->suggestedMIMEType(),        *buffer);    return buffer.release();}
开发者ID:joone,项目名称:chromium-crosswalk,代码行数:11,


示例17: ASSERT

void WebDOMMessageEvent::initMessageEvent(const WebString& type, bool canBubble, bool cancelable, const WebSerializedScriptValue& messageData, const WebString& origin, const WebFrame* sourceFrame, const WebString& lastEventId, const WebMessagePortChannelArray& webChannels){    ASSERT(m_private.get());    ASSERT(isMessageEvent());    LocalDOMWindow* window = 0;    if (sourceFrame)        window = toWebLocalFrameImpl(sourceFrame)->frame()->domWindow();    OwnPtr<MessagePortArray> ports;    if (sourceFrame)        ports = MessagePort::toMessagePortArray(window->document(), webChannels);    unwrap<MessageEvent>()->initMessageEvent(type, canBubble, cancelable, messageData, origin, lastEventId, window, ports.release());}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:12,


示例18: ASSERT

void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame){    ASSERT(!m_loadingDocument);    ASSERT(!m_mainScriptLoader);    m_networkProvider = adoptPtr(client()->createServiceWorkerNetworkProvider(frame->dataSource()));    m_mainScriptLoader = Loader::create();    m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document();    m_mainScriptLoader->load(        m_loadingDocument.get(),        m_url,        bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse, this),        bind(&WebSharedWorkerImpl::onScriptLoaderFinished, this));}
开发者ID:joone,项目名称:blink-crosswalk,代码行数:13,


示例19: ordinalOfFirstMatchForFrame

int TextFinder::ordinalOfFirstMatchForFrame(WebLocalFrameImpl* frame) const{    int ordinal = 0;    WebLocalFrameImpl* mainFrameImpl = m_ownerFrame.viewImpl()->mainFrameImpl();    // Iterate from the main frame up to (but not including) |frame| and    // add up the number of matches found so far.    for (WebLocalFrameImpl* it = mainFrameImpl; it != frame; it = toWebLocalFrameImpl(it->traverseNext(true))) {        TextFinder& finder = it->ensureTextFinder();        if (finder.m_lastMatchCount > 0)            ordinal += finder.m_lastMatchCount;    }    return ordinal;}
开发者ID:darktears,项目名称:blink-crosswalk,代码行数:13,


示例20: toWebLocalFrameImpl

void WebSurroundingText::initializeFromCurrentSelection(WebLocalFrame* frame,                                                        size_t maxLength) {  LocalFrame* webFrame = toWebLocalFrameImpl(frame)->frame();  // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets  // needs to be audited.  See http://crbug.com/590369 for more details.  webFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets();  if (Range* range = createRange(          webFrame->selection().selection().toNormalizedEphemeralRange())) {    // TODO(xiaochengh): The followinng SurroundingText can hold a null Range,    // in which case we should prevent it from being stored in |m_private|.    m_private.reset(new SurroundingText(*range, maxLength));  }}
开发者ID:mirror,项目名称:chromium,代码行数:15,


示例21: toWebLocalFrameImpl

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,


示例22: ASSERT

void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame, bool){    ASSERT(!m_loadingDocument);    ASSERT(!m_mainScriptLoader);    m_networkProvider = adoptPtr(m_client->createServiceWorkerNetworkProvider(frame->dataSource()));    m_mainScriptLoader = WorkerScriptLoader::create();    m_mainScriptLoader->setRequestContext(WebURLRequest::RequestContextSharedWorker);    m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document();    m_mainScriptLoader->loadAsynchronously(        *m_loadingDocument.get(),        m_url,        DenyCrossOriginRequests,        bind(&WebSharedWorkerImpl::didReceiveScriptLoaderResponse, this),        bind(&WebSharedWorkerImpl::onScriptLoaderFinished, this));    // Do nothing here since onScriptLoaderFinished() might have been already    // invoked and |this| might have been deleted at this point.}
开发者ID:howardroark2018,项目名称:chromium,代码行数:17,


示例23: m_client

WebFrameSerializerImpl::WebFrameSerializerImpl(    WebLocalFrame* frame,    WebFrameSerializerClient* client,    WebFrameSerializer::LinkRewritingDelegate* delegate)    : m_client(client)    , m_delegate(delegate)    , m_htmlEntities(false)    , m_xmlEntities(true){    // Must specify available webframe.    DCHECK(frame);    m_specifiedWebLocalFrameImpl = toWebLocalFrameImpl(frame);    // Make sure we have non null client and delegate.    DCHECK(client);    DCHECK(delegate);    DCHECK(m_dataBuffer.isEmpty());}
开发者ID:aobzhirov,项目名称:ChromiumGStreamerBackend,代码行数:18,



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


C++ toWorkerGlobalScope函数代码示例
C++ toWebCoreString函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。