mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-05 20:34:07 +02:00
Reorganize CEF handlers
This commit is contained in:
parent
c235c55b19
commit
f07640cc84
@ -8,6 +8,7 @@
|
||||
using TweetDuck.Core.Bridge;
|
||||
using TweetDuck.Core.Controls;
|
||||
using TweetDuck.Core.Handling;
|
||||
using TweetDuck.Core.Handling.General;
|
||||
using TweetDuck.Core.Notification;
|
||||
using TweetDuck.Core.Notification.Screenshot;
|
||||
using TweetDuck.Core.Other;
|
||||
|
@ -1,7 +1,7 @@
|
||||
using CefSharp;
|
||||
using System;
|
||||
using System;
|
||||
using CefSharp;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
class BrowserProcessHandler : IBrowserProcessHandler{
|
||||
void IBrowserProcessHandler.OnContextInitialized(){
|
||||
using(IRequestContext ctx = Cef.GetGlobalRequestContext()){
|
@ -1,11 +1,11 @@
|
||||
using CefSharp;
|
||||
using CefSharp.WinForms;
|
||||
using System.Drawing;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using CefSharp;
|
||||
using CefSharp.WinForms;
|
||||
using TweetDuck.Core.Controls;
|
||||
using TweetDuck.Core.Other;
|
||||
|
||||
namespace TweetDuck.Core.Handling {
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
class JavaScriptDialogHandler : IJsDialogHandler{
|
||||
bool IJsDialogHandler.OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, CefJsDialogType dialogType, string messageText, string defaultPromptText, IJsDialogCallback callback, ref bool suppressMessage){
|
||||
((ChromiumWebBrowser)browserControl).InvokeSafe(() => {
|
@ -1,7 +1,7 @@
|
||||
using CefSharp;
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
class LifeSpanHandler : ILifeSpanHandler{
|
||||
public bool OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser){
|
||||
newBrowser = null;
|
@ -1,8 +1,8 @@
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using CefSharp;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
abstract class RequestHandler : IRequestHandler{
|
||||
namespace TweetDuck.Core.Handling.General{
|
||||
abstract class RequestHandlerBase : IRequestHandler{
|
||||
// Browser
|
||||
|
||||
public virtual void OnRenderViewReady(IWebBrowser browserControl, IBrowser browser){}
|
@ -1,7 +1,8 @@
|
||||
using CefSharp;
|
||||
using TweetDuck.Core.Handling.General;
|
||||
|
||||
namespace TweetDuck.Core.Handling{
|
||||
class RequestHandlerBrowser : RequestHandler{
|
||||
class RequestHandlerBrowser : RequestHandlerBase{
|
||||
public override void OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status){
|
||||
browser.Reload();
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
using TweetDuck.Configuration;
|
||||
using TweetDuck.Core.Controls;
|
||||
using TweetDuck.Core.Handling;
|
||||
using TweetDuck.Core.Handling.General;
|
||||
using TweetDuck.Core.Utils;
|
||||
|
||||
namespace TweetDuck.Core.Notification{
|
||||
|
@ -8,7 +8,7 @@
|
||||
using System.Windows.Forms;
|
||||
using TweetDuck.Configuration;
|
||||
using TweetDuck.Core;
|
||||
using TweetDuck.Core.Handling;
|
||||
using TweetDuck.Core.Handling.General;
|
||||
using TweetDuck.Core.Other;
|
||||
using TweetDuck.Core.Other.Settings.Export;
|
||||
using TweetDuck.Core.Utils;
|
||||
|
@ -88,7 +88,7 @@
|
||||
<Compile Include="Core\Controls\NumericUpDownEx.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Core\Handling\BrowserProcessHandler.cs" />
|
||||
<Compile Include="Core\Handling\General\BrowserProcessHandler.cs" />
|
||||
<Compile Include="Core\Handling\ContextMenuBase.cs" />
|
||||
<Compile Include="Core\Handling\ContextMenuBrowser.cs" />
|
||||
<Compile Include="Core\FormBrowser.cs">
|
||||
@ -99,7 +99,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Core\Handling\KeyboardHandlerNotification.cs" />
|
||||
<Compile Include="Core\Handling\RequestHandlerBrowser.cs" />
|
||||
<Compile Include="Core\Handling\RequestHandler.cs" />
|
||||
<Compile Include="Core\Handling\General\RequestHandlerBase.cs" />
|
||||
<Compile Include="Core\Handling\ResourceHandlerNotification.cs" />
|
||||
<Compile Include="Core\Notification\FormNotificationMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
@ -114,8 +114,8 @@
|
||||
<DependentUpon>FormNotificationBase.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Core\Handling\ContextMenuNotification.cs" />
|
||||
<Compile Include="Core\Handling\JavaScriptDialogHandler.cs" />
|
||||
<Compile Include="Core\Handling\LifeSpanHandler.cs" />
|
||||
<Compile Include="Core\Handling\General\JavaScriptDialogHandler.cs" />
|
||||
<Compile Include="Core\Handling\General\LifeSpanHandler.cs" />
|
||||
<Compile Include="Core\Notification\FormNotificationTweet.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
Loading…
Reference in New Issue
Block a user