Ejemplo n.º 1
0
Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest& r, const WindowFeatures& features,
    NavigationPolicy navigationPolicy, ShouldSetOpener shouldSetOpener)
{
    if (!m_webView->client())
        return nullptr;

    WebNavigationPolicy policy = effectiveNavigationPolicy(navigationPolicy, features);
    ASSERT(frame->document());
    Fullscreen::fullyExitFullscreen(*frame->document());

    WebViewImpl* newView = toWebViewImpl(
        m_webView->client()->createView(WebLocalFrameImpl::fromFrame(frame), WrappedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, shouldSetOpener == NeverSetOpener));
    if (!newView)
        return nullptr;
    return newView->page();
}
Ejemplo n.º 2
0
void ChromeClientImpl::show(NavigationPolicy navigationPolicy) {
  if (m_webView->client())
    m_webView->client()->show(
        effectiveNavigationPolicy(navigationPolicy, m_windowFeatures));
}