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


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

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


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

示例1: enterFullScreenForElement

void FullscreenController::enterFullScreenForElement(Element* element)
{
    // We are already transitioning to fullscreen for a different element.
    if (m_provisionalFullScreenElement) {
        m_provisionalFullScreenElement = element;
        return;
    }

    // We are already in fullscreen mode.
    if (m_fullScreenFrame) {
        m_provisionalFullScreenElement = element;
        didEnterFullScreen();
        return;
    }

    // We need to store these values here rather than didEnterFullScreen since
    // by the time the latter is called, a Resize has already occured, clamping
    // the scroll offset.
    if (!m_haveEnteredFullscreen) {
        m_exitFullscreenPageScaleFactor = m_webViewImpl->pageScaleFactor();
        m_exitFullscreenScrollOffset = m_webViewImpl->mainFrame()->scrollOffset();
        m_exitFullscreenVisualViewportOffset = m_webViewImpl->visualViewportOffset();
    }

    // We need to transition to fullscreen mode.
    WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document().frame());
    if (frame && frame->client()) {
        frame->client()->enterFullscreen();
        m_provisionalFullScreenElement = element;
    }
}
开发者ID:mtucker6784,项目名称:chromium,代码行数:31,代码来源:FullscreenController.cpp

示例2: openBeforeUnloadConfirmPanelDelegate

bool ChromeClientImpl::openBeforeUnloadConfirmPanelDelegate(LocalFrame* frame,
                                                            bool isReload) {
  notifyPopupOpeningObservers();
  WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
  return webframe->client() &&
         webframe->client()->runModalBeforeUnloadDialog(isReload);
}
开发者ID:mirror,项目名称:chromium,代码行数:7,代码来源:ChromeClientImpl.cpp

示例3: forwardInputEvent

// FIXME: Remove this code once we have input routing in the browser
// process. See http://crbug.com/339659.
void ChromeClientImpl::forwardInputEvent(
    Frame* frame, Event* event)
{
    WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(frame));

    // This is only called when we have out-of-process iframes, which
    // need to forward input events across processes.
    // FIXME: Add a check for out-of-process iframes enabled.
    if (event->isKeyboardEvent()) {
        WebKeyboardEventBuilder webEvent(*static_cast<KeyboardEvent*>(event));
        webFrame->client()->forwardInputEvent(&webEvent);
    } else if (event->isMouseEvent()) {
        WebMouseEventBuilder webEvent(webFrame->frameView(), 0, *static_cast<MouseEvent*>(event));
        // Internal Blink events should not be forwarded.
        if (webEvent.type == WebInputEvent::Undefined)
            return;

        webFrame->client()->forwardInputEvent(&webEvent);
    } else if (event->isWheelEvent()) {
        WebMouseWheelEventBuilder webEvent(webFrame->frameView(), 0, *static_cast<WheelEvent*>(event));
        if (webEvent.type == WebInputEvent::Undefined)
            return;
        webFrame->client()->forwardInputEvent(&webEvent);
    }
}
开发者ID:viettrungluu-cr,项目名称:mojo,代码行数:27,代码来源:ChromeClientImpl.cpp

示例4: adoptPtr

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

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

示例5: shouldReportDetailedMessageForSource

bool ChromeClientImpl::shouldReportDetailedMessageForSource(
    LocalFrame& localFrame,
    const String& url) {
  WebLocalFrameImpl* webframe =
      WebLocalFrameImpl::fromFrame(localFrame.localFrameRoot());
  return webframe && webframe->client() &&
         webframe->client()->shouldReportDetailedMessageForSource(url);
}
开发者ID:mirror,项目名称:chromium,代码行数:8,代码来源:ChromeClientImpl.cpp

示例6: adoptPtr

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

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

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

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

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

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

示例12: exitFullScreenForElement

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

示例13: openJavaScriptAlertDelegate

// 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

示例14: runBeforeUnloadConfirmPanel

bool ChromeClientImpl::runBeforeUnloadConfirmPanel(const String& message, LocalFrame* frame)
{
    WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);

    bool isReload = false;
    WebDataSource* ds = webframe->provisionalDataSource();
    if (ds)
        isReload = (ds->navigationType() == WebNavigationTypeReload);

    if (webframe->client())
        return webframe->client()->runModalBeforeUnloadDialog(isReload, message);
    return false;
}
开发者ID:shawngao5,项目名称:blink-crosswalk,代码行数:13,代码来源:ChromeClientImpl.cpp

示例15: createWorkerGlobalScopeProxy

WorkerGlobalScopeProxy* WorkerGlobalScopeProxyProviderImpl::createWorkerGlobalScopeProxy(Worker* worker)
{
    if (worker->executionContext()->isDocument()) {
        Document* document = toDocument(worker->executionContext());
        WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());
        OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
        provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::create());
        providePermissionClientToWorker(workerClients.get(), adoptPtr(webFrame->client()->createWorkerPermissionClientProxy(webFrame)));
        provideServiceWorkerContainerClientToWorker(workerClients.get(), adoptPtr(webFrame->client()->createServiceWorkerProvider(webFrame)));
        return new WorkerMessagingProxy(worker, workerClients.release());
    }
    ASSERT_NOT_REACHED();
    return 0;
}
开发者ID:335969568,项目名称:Blink-1,代码行数:14,代码来源:WorkerGlobalScopeProxyProviderImpl.cpp


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