Ejemplo n.º 1
0
Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest&, const WindowFeatures& features, const NavigationAction&)
{
    Page* myPage = 0;
    wxWebViewNewWindowEvent wkEvent(m_webView);
    
    wxWebKitWindowFeatures wkFeatures = wkFeaturesforWindowFeatures(features);
    wkEvent.SetWindowFeatures(wkFeatures);
    
    if (m_webView->GetEventHandler()->ProcessEvent(wkEvent)) {
        if (wxWebView* webView = wkEvent.GetWebView()) {
            WebViewPrivate* impl = webView->m_impl;
            if (impl)
                myPage = impl->page;
        }
    }
    
    return myPage;
}
Ejemplo n.º 2
0
Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features)
{
    Page* myPage = 0;
    wxWebViewNewWindowEvent wkEvent(m_webView);
    wkEvent.SetURL(request.resourceRequest().url().string());
    
    wxWebKitWindowFeatures wkFeatures = wkFeaturesforWindowFeatures(features);
    wkEvent.SetWindowFeatures(wkFeatures);
    
    if (m_webView->GetEventHandler()->ProcessEvent(wkEvent)) {
        if (wxWebView* webView = wkEvent.GetWebView()) {
            WebViewPrivate* impl = webView->m_impl;
            if (impl)
                myPage = impl->page;
        }
    }
    
    return myPage;
}