add beginnings to safe browsing integration
This commit is contained in:
parent
4506a0d460
commit
b74eca3d38
67 changed files with 100000 additions and 2 deletions
|
@ -6,6 +6,11 @@ using Bunifu.Utils;
|
|||
using CefSharp;
|
||||
using CefSharp.WinForms;
|
||||
using EasyTabs;
|
||||
using Google.Apis.Safebrowsing.v4;
|
||||
using Google.Apis.Safebrowsing.v4.Data;
|
||||
using Google.Apis.Services;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using XeroBrowser.Properties;
|
||||
using static System.Net.WebRequestMethods;
|
||||
// ReSharper disable PossibleNullReferenceException
|
||||
|
@ -66,6 +71,21 @@ namespace XeroBrowser
|
|||
private bool _isBlocked;
|
||||
private void chromiumWebBrowser1_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
|
||||
{
|
||||
// chromiumWebBrowser1.LoadingStateChanged += async (s, args) =>
|
||||
// {
|
||||
// if (args.IsLoading)
|
||||
// {
|
||||
// var isUnsafe = await Program.IsUrlUnsafe(args.Browser.MainFrame.Url, "AIzaSyCQV-s52iNah-il6T5iFuqo6M_JzcLyaxs");
|
||||
// if (isUnsafe)
|
||||
// {
|
||||
// chromiumWebBrowser1.Stop(); // cancel the navigation
|
||||
// _isBlocked = true;
|
||||
// chromiumWebBrowser1.LoadHtml("");
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
|
||||
if (e.IsLoading)
|
||||
{
|
||||
loadingIndicator.Visible = true;
|
||||
|
|
Reference in a new issue