mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-22 00:15:48 +02:00
Add GetHandlerFactory extension method to BrowserUtils
This commit is contained in:
parent
8fcec7ec7c
commit
2f61de7025
Core
@ -139,8 +139,7 @@ protected FormNotificationBase(FormBrowser owner, bool enableContextMenu){
|
||||
|
||||
DpiScale = this.GetDPIScale();
|
||||
|
||||
DefaultResourceHandlerFactory handlerFactory = (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
||||
handlerFactory.RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
||||
browser.GetHandlerFactory().RegisterHandler(TwitterUtils.TweetDeckURL, this.resourceHandler);
|
||||
|
||||
Controls.Add(browser);
|
||||
|
||||
|
@ -35,6 +35,10 @@ public static ChromiumWebBrowser AsControl(this IWebBrowser browserControl){
|
||||
return (ChromiumWebBrowser)browserControl;
|
||||
}
|
||||
|
||||
public static DefaultResourceHandlerFactory GetHandlerFactory(this ChromiumWebBrowser browser){
|
||||
return (DefaultResourceHandlerFactory)browser.ResourceHandlerFactory;
|
||||
}
|
||||
|
||||
private const string TwitterTrackingUrl = "t.co";
|
||||
|
||||
public enum UrlCheckResult{
|
||||
|
Loading…
Reference in New Issue
Block a user