void ChromeClientImpl::show(NavigationPolicy navigationPolicy) { if (!m_webView->client()) return; WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPolicy); if (policy == WebNavigationPolicyIgnore) policy = getNavigationPolicy(m_windowFeatures); else if (policy == WebNavigationPolicyNewBackgroundTab && getNavigationPolicy(m_windowFeatures) != WebNavigationPolicyNewBackgroundTab && !UIEventWithKeyState::newTabModifierSetFromIsolatedWorld()) policy = WebNavigationPolicyNewForegroundTab; m_webView->client()->show(policy); }
void ChromeClientImpl::show() { if (!m_webView->client()) return; m_webView->client()->show(getNavigationPolicy()); }
Page* ChromeClientImpl::createWindow( Frame* frame, const FrameLoadRequest& r, const WindowFeatures& features, const NavigationAction& action) { if (!m_webView->client()) return 0; // FrameLoaderClientImpl may have given us a policy to use for the next new // window navigation. If not, determine the policy using the same logic as // show(). WebNavigationPolicy policy; if (m_nextNewWindowNavigationPolicy != WebNavigationPolicyIgnore) { policy = m_nextNewWindowNavigationPolicy; m_nextNewWindowNavigationPolicy = WebNavigationPolicyIgnore; } else policy = getNavigationPolicy(); WrappedResourceRequest request; if (!r.resourceRequest().isEmpty()) request.bind(r.resourceRequest()); else if (!action.resourceRequest().isEmpty()) request.bind(action.resourceRequest()); WebViewImpl* newView = static_cast<WebViewImpl*>( m_webView->client()->createView(WebFrameImpl::fromFrame(frame), request, features, r.frameName(), policy)); if (!newView) return 0; return newView->page(); }
void ChromeClientImpl::show(NavigationPolicy navigationPolicy) { if (!m_webView->client()) return; WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPolicy); if (policy == WebNavigationPolicyIgnore) policy = getNavigationPolicy(); m_webView->client()->show(policy); }
Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest& r, const WindowFeatures& features, NavigationPolicy navigationPolicy, ShouldSendReferrer shouldSendReferrer) { if (!m_webView->client()) return nullptr; WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPolicy); if (policy == WebNavigationPolicyIgnore) policy = getNavigationPolicy(features); else if (policy == WebNavigationPolicyNewBackgroundTab && getNavigationPolicy(m_windowFeatures) != WebNavigationPolicyNewBackgroundTab && !UIEventWithKeyState::newTabModifierSetFromIsolatedWorld()) policy = WebNavigationPolicyNewForegroundTab; ASSERT(frame->document()); Fullscreen::fullyExitFullscreen(*frame->document()); WebViewImpl* newView = toWebViewImpl( m_webView->client()->createView(WebLocalFrameImpl::fromFrame(frame), WrappedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, shouldSendReferrer == NeverSendReferrer)); if (!newView) return nullptr; return newView->page(); }
Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest& r, const WindowFeatures& features, NavigationPolicy navigationPolicy, ShouldSendReferrer shouldSendReferrer) { if (!m_webView->client()) return 0; WebNavigationPolicy policy = static_cast<WebNavigationPolicy>(navigationPolicy); if (policy == WebNavigationPolicyIgnore) policy = getNavigationPolicy(); ASSERT(frame->document()); DocumentFullscreen::webkitCancelFullScreen(*frame->document()); WebViewImpl* newView = toWebViewImpl( m_webView->client()->createView(WebFrameImpl::fromFrame(frame), WrappedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, shouldSendReferrer == NeverSendReferrer)); if (!newView) return 0; return newView->page(); }