本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例5: attachCompositorAnimationTimeline
void ChromeClientImpl::attachCompositorAnimationTimeline(
CompositorAnimationTimeline* compositorTimeline,
LocalFrame* localFrame) {
WebLocalFrameImpl* webFrame =
WebLocalFrameImpl::fromFrame(localFrame)->localRoot();
webFrame->frameWidget()->attachCompositorAnimationTimeline(
compositorTimeline);
}
示例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;
}
}
示例7: didUpdateTextOfFocusedElementByNonUserInput
void ChromeClientImpl::didUpdateTextOfFocusedElementByNonUserInput(
LocalFrame& frame) {
WebLocalFrameImpl* webFrame =
WebLocalFrameImpl::fromFrame(frame.localFrameRoot());
webFrame->frameWidget()
->client()
->didUpdateTextOfFocusedElementByNonUserInput();
}
示例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);
}
}
示例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);
}
}