/// <summary> /// Initializes a new instance of the WebKitBrowser control. /// </summary> public WebKitBrowser(WebKitBrowserCore bCore) { core = bCore; NewWindowCreated += delegate { }; NewWindowRequest += delegate { }; DownloadBegin += delegate { }; Error += delegate { }; Navigating += delegate { }; Navigated += delegate { }; DocumentCompleted += delegate { }; DocumentTitleChanged += delegate { }; ShowJavaScriptAlertPanel += delegate { }; ShowJavaScriptConfirmPanel += delegate { }; ShowJavaScriptPromptPanel += delegate { }; InitializeComponent(); core.Initialize(this); }
private void uiDelegate_CreateWebViewWithRequest(IWebURLRequest request, out WebView webView) { // TODO: find out why url seems to always be empty: // https://bugs.webkit.org/show_bug.cgi?id=41441 explains all string url = (request == null) ? "" : request.url(); NewWindowRequestEventArgs args = new NewWindowRequestEventArgs(url); NewWindowRequest(this, args); if (!args.Cancel) { WebKitBrowserCore b = new WebKitBrowserCore(host); webView = (WebView)b.webView; NewWindowCreated(this, new NewWindowCreatedEventArgs(b)); } else { webView = null; } }
public WebUIDelegate(WebKitBrowserCore browser) { this.owner = browser; }
private void uiDelegate_CreateWebViewWithRequest(IWebURLRequest request, out WebView webView) { // TODO: find out why url seems to always be empty: // https://bugs.webkit.org/show_bug.cgi?id=41441 explains all string url = (request == null) ? "" : request.url(); NewWindowRequestEventArgs args = new NewWindowRequestEventArgs(url); NewWindowRequest(this, args); if (!args.Cancel) { WebKitBrowserCore b = new WebKitBrowserCore(host); webView = (WebView) b.webView; NewWindowCreated(this, new NewWindowCreatedEventArgs(b)); } else { webView = null; } }
public WebPolicyDelegate(bool AllowNavigation, bool AllowDownloads, bool AllowNewWindows, WebKitBrowserCore b) : this(AllowNavigation, AllowDownloads, AllowNewWindows) { wbc = b; }