• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ WebLocalFrameImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: flushCurrentScopingEffort

void TextFinder::flushCurrentScopingEffort(int identifier)
{
    if (!m_ownerFrame.frame() || !m_ownerFrame.frame()->page())
        return;

    WebLocalFrameImpl* mainFrameImpl = m_ownerFrame.viewImpl()->mainFrameImpl();
    mainFrameImpl->ensureTextFinder().decrementFramesScopingCount(identifier);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:8,代码来源:TextFinder.cpp


示例2: findMatchRects

void TextFinder::findMatchRects(WebVector<WebFloatRect>& outputRects)
{
    Vector<WebFloatRect> matchRects;
    for (WebLocalFrameImpl* frame = &ownerFrame(); frame; frame = toWebLocalFrameImpl(frame->traverseNext(false)))
        frame->ensureTextFinder().appendFindMatchRects(matchRects);

    outputRects = matchRects;
}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:8,代码来源:TextFinder.cpp


示例3: createWebMediaPlayer

static PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(WebMediaPlayerClient* client, const WebURL& url, LocalFrame* frame, WebContentDecryptionModule* initialCdm)
{
    WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);

    if (!webFrame || !webFrame->client())
        return nullptr;
    return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, client, initialCdm));
}
开发者ID:alexanderbill,项目名称:blink-crosswalk,代码行数:8,代码来源:WebMediaPlayerClientImpl.cpp


示例4: frame

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: runJavaScriptAlert

// Although a LocalFrame is passed in, we don't actually use it, since we
// already know our own m_webView.
void ChromeClientImpl::runJavaScriptAlert(LocalFrame* frame, const String& message)
{
    WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
    if (webframe->client()) {
        if (WebUserGestureIndicator::isProcessingUserGesture())
            WebUserGestureIndicator::currentUserGestureToken().setJavascriptPrompt();
        webframe->client()->runModalAlertDialog(message);
    }
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:11,代码来源:ChromeClientImpl.cpp


示例6: contentsSizeChanged

void ChromeClientImpl::contentsSizeChanged(LocalFrame* frame, const IntSize& size) const
{
    m_webView->didChangeContentsSize();

    WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
    webframe->didChangeContentsSize(size);

    frame->loader().restoreScrollPositionAndViewState();
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:9,代码来源:ChromeClientImpl.cpp


示例7: ASSERT

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

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


示例8: handleKeyboardEventOnTextField

void ChromeClientImpl::handleKeyboardEventOnTextField(
    HTMLInputElement& inputElement,
    KeyboardEvent& event) {
  WebLocalFrameImpl* webframe =
      WebLocalFrameImpl::fromFrame(inputElement.document().frame());
  if (webframe->autofillClient())
    webframe->autofillClient()->textFieldDidReceiveKeyDown(
        WebInputElement(&inputElement), WebKeyboardEventBuilder(event));
}
开发者ID:mirror,项目名称:chromium,代码行数:9,代码来源:ChromeClientImpl.cpp


示例9: ASSERT

void NotificationPermissionClientImpl::requestPermission(ExecutionContext* context, NotificationPermissionCallback* callback)
{
    ASSERT(context && context->isDocument());

    Document* document = toDocument(context);
    WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());

    webFrame->client()->requestNotificationPermission(WebSecurityOrigin(context->securityOrigin()), new WebNotificationPermissionCallbackImpl(callback));
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:9,代码来源:NotificationPermissionClientImpl.cpp


示例10: runJavaScriptConfirm

// See comments for runJavaScriptAlert().
bool ChromeClientImpl::runJavaScriptConfirm(LocalFrame* frame, const String& message)
{
    WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
    if (webframe->client()) {
        if (WebUserGestureIndicator::isProcessingUserGesture())
            WebUserGestureIndicator::currentUserGestureToken().setJavascriptPrompt();
        return webframe->client()->runModalConfirmDialog(message);
    }
    return false;
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:11,代码来源:ChromeClientImpl.cpp


示例11: postAccessibilityNotification

void ChromeClientImpl::postAccessibilityNotification(AXObject* obj, AXObjectCache::AXNotification notification)
{
    // Alert assistive technology about the accessibility object notification.
    if (!obj || !obj->document())
        return;

    WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(obj->document()->axObjectCacheOwner().frame());
    if (webframe && webframe->client())
        webframe->client()->postAccessibilityEvent(WebAXObject(obj), toWebAXEvent(notification));
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:10,代码来源:ChromeClientImpl.cpp


示例12: didChangeValueInTextField

void ChromeClientImpl::didChangeValueInTextField(
    HTMLFormControlElement& element) {
  WebLocalFrameImpl* webframe =
      WebLocalFrameImpl::fromFrame(element.document().frame());
  if (webframe->autofillClient())
    webframe->autofillClient()->textFieldDidChange(
        WebFormControlElement(&element));

  m_webView->pageImportanceSignals()->setHadFormInteraction();
}
开发者ID:mirror,项目名称:chromium,代码行数:10,代码来源:ChromeClientImpl.cpp


示例13: 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,代码来源:WebSharedWorkerImpl.cpp


示例14: attachRootLayer

void ChromeClientImpl::attachRootLayer(WebLayer* rootLayer,
                                       LocalFrame* localFrame) {
  WebLocalFrameImpl* webFrame =
      WebLocalFrameImpl::fromFrame(localFrame)->localRoot();

  // This method can be called while the frame is being detached. In that
  // case, the rootLayer is null, and the widget is already destroyed.
  DCHECK(webFrame->frameWidget() || !rootLayer);
  if (webFrame->frameWidget())
    webFrame->frameWidget()->setRootLayer(rootLayer);
}
开发者ID:mirror,项目名称:chromium,代码行数:11,代码来源:ChromeClientImpl.cpp


示例15: startDragging

void ChromeClientImpl::startDragging(LocalFrame* frame,
                                     const WebDragData& dragData,
                                     WebDragOperationsMask mask,
                                     const WebImage& dragImage,
                                     const WebPoint& dragImageOffset) {
  WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(frame);
  WebReferrerPolicy policy = webFrame->document().referrerPolicy();
  m_webView->setDoingDragAndDrop(true);
  webFrame->localRoot()->frameWidget()->client()->startDragging(
      policy, dragData, mask, dragImage, dragImageOffset);
}
开发者ID:mirror,项目名称:chromium,代码行数:11,代码来源:ChromeClientImpl.cpp


示例16: clearContextMenu

void ContextMenuClientImpl::clearContextMenu()
{
    HitTestResult r = m_webView->page()->contextMenuController().hitTestResult();
    LocalFrame* selectedFrame = r.innerNodeFrame();
    if (!selectedFrame)
        return;

    WebLocalFrameImpl* selectedWebFrame = WebLocalFrameImpl::fromFrame(selectedFrame);
    if (selectedWebFrame->client())
        selectedWebFrame->client()->clearContextMenu();
}
开发者ID:ewilligers,项目名称:blink,代码行数:11,代码来源:ContextMenuClientImpl.cpp


示例17: addMessageToConsole

void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& sourceID, const String& stackTrace)
{
    WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame);
    if (frame && frame->client()) {
        frame->client()->didAddMessageToConsole(
            WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), message),
            sourceID,
            lineNumber,
            stackTrace);
    }
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:11,代码来源:ChromeClientImpl.cpp


示例18: DCHECK

void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer,
                                               LocalFrame* localFrame) {
  DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
  WebLocalFrameImpl* webFrame =
      WebLocalFrameImpl::fromFrame(localFrame)->localRoot();

  // This method can be called while the frame is being detached. In that
  // case, the rootLayer is null, and the widget is already destroyed.
  DCHECK(webFrame->frameWidget() || !rootLayer);
  if (webFrame->frameWidget())
    webFrame->frameWidget()->setRootGraphicsLayer(rootLayer);
}
开发者ID:mirror,项目名称:chromium,代码行数:12,代码来源:ChromeClientImpl.cpp


示例19: notifyPopupOpeningObservers

// Although a LocalFrame is passed in, we don't actually use it, since we
// already know our own m_webView.
bool ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame,
                                                   const String& message) {
  notifyPopupOpeningObservers();
  WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
  if (webframe->client()) {
    if (WebUserGestureIndicator::isProcessingUserGesture())
      WebUserGestureIndicator::currentUserGestureToken().setJavascriptPrompt();
    webframe->client()->runModalAlertDialog(message);
    return true;
  }
  return false;
}
开发者ID:mirror,项目名称:chromium,代码行数:14,代码来源:ChromeClientImpl.cpp


示例20: ASSERT

void FullscreenController::exitFullScreenForElement(Element* element)
{
    ASSERT(element);

    // The client is exiting full screen, so don't send a notification.
    if (m_isCancelingFullScreen)
        return;

    WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document().frame());
    if (frame && frame->client())
        frame->client()->exitFullscreen();
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:12,代码来源:FullscreenController.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ WebMouseEvent类代码示例发布时间:2022-05-31
下一篇:
C++ WebLayer类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap