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


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

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


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

示例1: setCursor

void ChromeClientImpl::setCursor(const WebCursorInfo& cursor, LocalFrame* localRoot)
{
    if (m_cursorOverridden)
        return;

#if OS(MACOSX)
    // On Mac the mousemove event propagates to both the popup and main window.
    // If a popup is open we don't want the main window to change the cursor.
    if (m_webView->hasOpenedPopup())
        return;
#endif
    if (!m_webView->client())
        return;
    // TODO(kenrb, dcheng): For top-level frames we still use the WebView as
    // a WebWidget. This special case will be removed when top-level frames
    // get WebFrameWidgets.
    if (localRoot->isMainFrame()) {
        m_webView->client()->didChangeCursor(cursor);
    } else {
        WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot);
        ASSERT(webFrame);
        ASSERT(webFrame->frameWidget());
        if (toWebFrameWidgetImpl(webFrame->frameWidget())->client())
            toWebFrameWidgetImpl(webFrame->frameWidget())->client()->didChangeCursor(cursor);
    }
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:26,代码来源:ChromeClientImpl.cpp

示例2: 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

示例3: detachCompositorAnimationTimeline

void ChromeClientImpl::detachCompositorAnimationTimeline(
    CompositorAnimationTimeline* compositorTimeline,
    LocalFrame* localFrame) {
  WebLocalFrameImpl* webFrame =
      WebLocalFrameImpl::fromFrame(localFrame)->localRoot();

  // This method can be called when the frame is being detached, after the
  // widget is destroyed.
  if (webFrame->frameWidget())
    webFrame->frameWidget()->detachCompositorAnimationTimeline(
        compositorTimeline);
}
开发者ID:mirror,项目名称:chromium,代码行数:12,代码来源:ChromeClientImpl.cpp

示例4: attachRootGraphicsLayer

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

示例5: attachCompositorAnimationTimeline

void ChromeClientImpl::attachCompositorAnimationTimeline(
    CompositorAnimationTimeline* compositorTimeline,
    LocalFrame* localFrame) {
  WebLocalFrameImpl* webFrame =
      WebLocalFrameImpl::fromFrame(localFrame)->localRoot();
  webFrame->frameWidget()->attachCompositorAnimationTimeline(
      compositorTimeline);
}
开发者ID:mirror,项目名称:chromium,代码行数:8,代码来源:ChromeClientImpl.cpp

示例6: setToolTip

void ChromeClientImpl::setToolTip(LocalFrame& frame,
                                  const String& tooltipText,
                                  TextDirection dir) {
  WebLocalFrameImpl* webFrame =
      WebLocalFrameImpl::fromFrame(&frame)->localRoot();
  if (!tooltipText.isEmpty()) {
    webFrame->frameWidget()->client()->setToolTipText(tooltipText,
                                                      toWebTextDirection(dir));
    m_didRequestNonEmptyToolTip = true;
  } else if (m_didRequestNonEmptyToolTip) {
    // WebWidgetClient::setToolTipText will send an IPC message.  We'd like to
    // reduce the number of setToolTipText calls.
    webFrame->frameWidget()->client()->setToolTipText(tooltipText,
                                                      toWebTextDirection(dir));
    m_didRequestNonEmptyToolTip = false;
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:17,代码来源:ChromeClientImpl.cpp

示例7: didUpdateTextOfFocusedElementByNonUserInput

void ChromeClientImpl::didUpdateTextOfFocusedElementByNonUserInput(
    LocalFrame& frame) {
  WebLocalFrameImpl* webFrame =
      WebLocalFrameImpl::fromFrame(frame.localFrameRoot());
  webFrame->frameWidget()
      ->client()
      ->didUpdateTextOfFocusedElementByNonUserInput();
}
开发者ID:mirror,项目名称:chromium,代码行数:8,代码来源:ChromeClientImpl.cpp

示例8: detachCompositorAnimationTimeline

void ChromeClientImpl::detachCompositorAnimationTimeline(WebCompositorAnimationTimeline* compositorTimeline, LocalFrame* localRoot)
{
    // FIXME: For top-level frames we still use the WebView as a WebWidget. This special
    // case will be removed when top-level frames get WebFrameWidgets.
    if (localRoot->isMainFrame()) {
        m_webView->detachCompositorAnimationTimeline(compositorTimeline);
    } else {
        WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot);
        // FIXME: The following conditional is only needed for staging until the Chromium patch
        // lands that instantiates a WebFrameWidget.
        if (!webFrame->frameWidget()) {
            m_webView->detachCompositorAnimationTimeline(compositorTimeline);
            return;
        }
        ASSERT(webFrame && webFrame->frameWidget());
        webFrame->frameWidget()->detachCompositorAnimationTimeline(compositorTimeline);
    }
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:18,代码来源:ChromeClientImpl.cpp

示例9: attachRootGraphicsLayer

void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFrame* localRoot)
{
    // FIXME: For top-level frames we still use the WebView as a WebWidget. This special
    // case will be removed when top-level frames get WebFrameWidgets.
    if (localRoot->isMainFrame()) {
        m_webView->setRootGraphicsLayer(rootLayer);
    } else {
        WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot);
        // FIXME: The following conditional is only needed for staging until the Chromium patch
        // lands that instantiates a WebFrameWidget.
        if (!webFrame->frameWidget()) {
            m_webView->setRootGraphicsLayer(rootLayer);
            return;
        }
        ASSERT(webFrame && webFrame->frameWidget());
        webFrame->frameWidget()->setRootGraphicsLayer(rootLayer);
    }
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:18,代码来源:ChromeClientImpl.cpp


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