mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-21 03:54:07 +02:00
.github
.idea
Application
Browser
Adapters
Handling
BrowserProcessHandler.cs
ContextMenuBase.cs
ContextMenuBrowser.cs
ContextMenuGuide.cs
ContextMenuNotification.cs
CustomKeyboardHandler.cs
CustomLifeSpanHandler.cs
DownloadRequestClient.cs
DragHandlerBrowser.cs
FileDialogHandler.cs
JavaScriptDialogHandler.cs
RequestHandlerBase.cs
RequestHandlerBrowser.cs
ResourceHandlerNotification.cs
ResponseFilter.cs
Notification
FormBrowser.Designer.cs
FormBrowser.cs
FormBrowser.resx
TrayIcon.Designer.cs
TrayIcon.cs
TweetDeckBrowser.cs
Configuration
Controls
Dialogs
Management
Plugins
Properties
Resources
Updates
Utils
bld
lib
subprocess
video
.gitattributes
.gitignore
LICENSE.md
Program.cs
README.md
Reporter.cs
TweetDuck.csproj
TweetDuck.sln
TweetDuck.sln.DotSettings
Version.cs
app.config
packages.config
23 lines
702 B
C#
23 lines
702 B
C#
using CefSharp;
|
|
using CefSharp.Handler;
|
|
|
|
namespace TweetDuck.Browser.Handling {
|
|
class RequestHandlerBase : RequestHandler {
|
|
private readonly bool autoReload;
|
|
|
|
public RequestHandlerBase(bool autoReload) {
|
|
this.autoReload = autoReload;
|
|
}
|
|
|
|
protected override bool OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture) {
|
|
return CustomLifeSpanHandler.HandleLinkClick(targetDisposition, targetUrl);
|
|
}
|
|
|
|
protected override void OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status) {
|
|
if (autoReload) {
|
|
browser.Reload();
|
|
}
|
|
}
|
|
}
|
|
}
|