Updated browser engine to version 102.0.90.
This commit is contained in:
parent
66445a117f
commit
a4d29b2301
14 changed files with 52 additions and 54 deletions
|
@ -71,7 +71,7 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers
|
|||
var threadId = default(int);
|
||||
|
||||
callback.Setup(c => c.Cancel()).Callback(() => sync.Set());
|
||||
callback.Setup(c => c.Continue(It.IsAny<int>(), It.IsAny<List<string>>())).Callback(() => sync.Set());
|
||||
callback.Setup(c => c.Continue(It.IsAny<List<string>>())).Callback(() => sync.Set());
|
||||
sut.DialogRequested += (a) =>
|
||||
{
|
||||
args = a;
|
||||
|
@ -80,18 +80,18 @@ namespace SafeExamBrowser.Browser.UnitTests.Handlers
|
|||
threadId = Thread.CurrentThread.ManagedThreadId;
|
||||
};
|
||||
|
||||
var status = sut.OnFileDialog(default, default, mode, default, title, initialPath, default, default, callback.Object);
|
||||
var status = sut.OnFileDialog(default, default, mode, title, initialPath, default, callback.Object);
|
||||
|
||||
sync.WaitOne();
|
||||
|
||||
if (confirm)
|
||||
{
|
||||
callback.Verify(c => c.Continue(It.IsAny<int>(), It.IsAny<List<string>>()), Times.Once);
|
||||
callback.Verify(c => c.Continue(It.IsAny<List<string>>()), Times.Once);
|
||||
callback.Verify(c => c.Cancel(), Times.Never);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback.Verify(c => c.Continue(It.IsAny<int>(), It.IsAny<List<string>>()), Times.Never);
|
||||
callback.Verify(c => c.Continue(It.IsAny<List<string>>()), Times.Never);
|
||||
callback.Verify(c => c.Cancel(), Times.Once);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
|
@ -64,11 +64,11 @@
|
|||
<Reference Include="Castle.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.5.0.0\lib\net462\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp, Version=101.0.180.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.101.0.180\lib\net452\CefSharp.dll</HintPath>
|
||||
<Reference Include="CefSharp, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.102.0.90\lib\net452\CefSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.Core, Version=101.0.180.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.101.0.180\lib\net452\CefSharp.Core.dll</HintPath>
|
||||
<Reference Include="CefSharp.Core, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.102.0.90\lib\net452\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
|
@ -151,11 +151,11 @@
|
|||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.2.10\build\net46\MSTest.TestAdapter.targets')" />
|
||||
<Import Project="..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets')" />
|
||||
<Import Project="..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets')" />
|
||||
</Project>
|
|
@ -16,11 +16,11 @@
|
|||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CefSharp" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-101.0.180.0" newVersion="101.0.180.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-102.0.90.0" newVersion="102.0.90.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="CefSharp.Core" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-101.0.180.0" newVersion="101.0.180.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-102.0.90.0" newVersion="102.0.90.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Castle.Core" version="5.0.0" targetFramework="net472" />
|
||||
<package id="cef.redist.x64" version="101.0.18" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="101.0.18" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="101.0.180" targetFramework="net472" />
|
||||
<package id="cef.redist.x64" version="102.0.9" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="102.0.9" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="102.0.90" targetFramework="net472" />
|
||||
<package id="Moq" version="4.18.1" targetFramework="net472" />
|
||||
<package id="MSTest.TestAdapter" version="2.2.10" targetFramework="net472" />
|
||||
<package id="MSTest.TestFramework" version="2.2.10" targetFramework="net472" />
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace SafeExamBrowser.Browser
|
|||
control.CanDownload += (w, b, u, r, a) => a.Value = downloadHandler.CanDownload(w, b, u, r);
|
||||
control.DownloadUpdated += (w, b, d, c) => downloadHandler.OnDownloadUpdated(w, b, d, c);
|
||||
control.FaviconUrlChanged += (w, b, u) => displayHandler.OnFaviconUrlChange(w, b, u);
|
||||
control.FileDialogRequested += (w, b, m, f, t, d, a, s, c) => dialogHandler.OnFileDialog(w, b, m, f, t, d, a, s, c);
|
||||
control.FileDialogRequested += (w, b, m, t, d, f, c) => dialogHandler.OnFileDialog(w, b, m, t, d, f, c);
|
||||
control.FrameLoadStart += Control_FrameLoadStart;
|
||||
control.IsBrowserInitializedChanged += Control_IsBrowserInitializedChanged;
|
||||
control.KeyEvent += (w, b, t, k, n, m, s) => keyboardHandler.OnKeyEvent(w, b, t, k, n, m, s);
|
||||
|
|
|
@ -503,9 +503,7 @@ namespace SafeExamBrowser.Browser
|
|||
{
|
||||
Control.ExecuteJavascript("document.activeElement.tagName", result =>
|
||||
{
|
||||
var tagName = result.Result as string;
|
||||
|
||||
if (tagName != null && tagName.ToUpper() == "BODY")
|
||||
if (result.Result is string tagName && tagName?.ToUpper() == "BODY")
|
||||
{
|
||||
// This means the user is now at the start of the focus / tabIndex chain in the website.
|
||||
if (shiftPressed)
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace SafeExamBrowser.Browser.Handlers
|
|||
{
|
||||
internal event DialogRequestedEventHandler DialogRequested;
|
||||
|
||||
public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback)
|
||||
public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback)
|
||||
{
|
||||
var args = new DialogRequestedEventArgs
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ namespace SafeExamBrowser.Browser.Handlers
|
|||
{
|
||||
if (args.Success)
|
||||
{
|
||||
callback.Continue(selectedAcceptFilter, new List<string> { args.FullPath });
|
||||
callback.Continue(new List<string> { args.FullPath });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props')" />
|
||||
<Import Project="..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props')" />
|
||||
<Import Project="..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props')" />
|
||||
<Import Project="..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -53,14 +53,14 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="CefSharp, Version=101.0.180.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.101.0.180\lib\net452\CefSharp.dll</HintPath>
|
||||
<Reference Include="CefSharp, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.102.0.90\lib\net452\CefSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.Core, Version=101.0.180.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.101.0.180\lib\net452\CefSharp.Core.dll</HintPath>
|
||||
<Reference Include="CefSharp.Core, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.Common.102.0.90\lib\net452\CefSharp.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CefSharp.WinForms, Version=101.0.180.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.WinForms.101.0.180\lib\net462\CefSharp.WinForms.dll</HintPath>
|
||||
<Reference Include="CefSharp.WinForms, Version=102.0.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CefSharp.WinForms.102.0.90\lib\net462\CefSharp.WinForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
|
@ -195,10 +195,10 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.101.0.18\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.101.0.18\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x64.102.0.9\build\cef.redist.x64.props'))" />
|
||||
<Error Condition="!Exists('..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\cef.redist.x86.102.0.9\build\cef.redist.x86.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.props'))" />
|
||||
<Error Condition="!Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.101.0.180\build\CefSharp.Common.targets')" />
|
||||
<Import Project="..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.102.0.90\build\CefSharp.Common.targets')" />
|
||||
</Project>
|
|
@ -81,9 +81,9 @@ namespace SafeExamBrowser.Browser.Wrapper
|
|||
FaviconUrlChanged?.Invoke(webBrowser, browser, urls);
|
||||
}
|
||||
|
||||
public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback)
|
||||
public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback)
|
||||
{
|
||||
FileDialogRequested?.Invoke(webBrowser, browser, mode, flags, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);
|
||||
FileDialogRequested?.Invoke(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback);
|
||||
}
|
||||
|
||||
public void OnKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey)
|
||||
|
|
|
@ -76,9 +76,9 @@ namespace SafeExamBrowser.Browser.Wrapper
|
|||
FaviconUrlChanged?.Invoke(webBrowser, browser, urls);
|
||||
}
|
||||
|
||||
public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback)
|
||||
public void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback)
|
||||
{
|
||||
FileDialogRequested?.Invoke(webBrowser, browser, mode, flags, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);
|
||||
FileDialogRequested?.Invoke(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback);
|
||||
}
|
||||
|
||||
public void OnKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey)
|
||||
|
|
|
@ -11,5 +11,5 @@ using CefSharp;
|
|||
|
||||
namespace SafeExamBrowser.Browser.Wrapper.Events
|
||||
{
|
||||
internal delegate void FileDialogRequestedEventHandler(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback);
|
||||
internal delegate void FileDialogRequestedEventHandler(IWebBrowser chromiumWebBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback);
|
||||
}
|
||||
|
|
|
@ -15,19 +15,19 @@ namespace SafeExamBrowser.Browser.Wrapper.Handlers
|
|||
{
|
||||
internal class DialogHandlerSwitch : IDialogHandler
|
||||
{
|
||||
public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback)
|
||||
public bool OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback)
|
||||
{
|
||||
if (browser.IsPopup)
|
||||
{
|
||||
var control = ChromiumHostControl.FromBrowser(browser) as CefSharpPopupControl;
|
||||
|
||||
control?.OnFileDialog(webBrowser, browser, mode, flags, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);
|
||||
control?.OnFileDialog(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback);
|
||||
}
|
||||
else
|
||||
{
|
||||
var control = ChromiumWebBrowser.FromBrowser(browser) as CefSharpBrowserControl;
|
||||
|
||||
control?.OnFileDialog(webBrowser, browser, mode, flags, title, defaultFilePath, acceptFilters, selectedAcceptFilter, callback);
|
||||
control?.OnFileDialog(webBrowser, browser, mode, title, defaultFilePath, acceptFilters, callback);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace SafeExamBrowser.Browser.Wrapper
|
|||
void OnCanDownload(IWebBrowser webBrowser, IBrowser browser, string url, string requestMethod, GenericEventArgs args);
|
||||
void OnDownloadUpdated(IWebBrowser webBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback);
|
||||
void OnFaviconUrlChange(IWebBrowser webBrowser, IBrowser browser, IList<string> urls);
|
||||
void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, CefFileDialogFlags flags, string title, string defaultFilePath, List<string> acceptFilters, int selectedAcceptFilter, IFileDialogCallback callback);
|
||||
void OnFileDialog(IWebBrowser webBrowser, IBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List<string> acceptFilters, IFileDialogCallback callback);
|
||||
void OnKeyEvent(IWebBrowser webBrowser, IBrowser browser, KeyType type, int windowsKeyCode, int nativeKeyCode, CefEventFlags modifiers, bool isSystemKey);
|
||||
void OnLoadingProgressChange(IWebBrowser webBrowser, IBrowser browser, double progress);
|
||||
void OnOpenUrlFromTab(IWebBrowser webBrowser, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture, GenericEventArgs args);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="cef.redist.x64" version="101.0.18" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="101.0.18" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="101.0.180" targetFramework="net472" />
|
||||
<package id="CefSharp.WinForms" version="101.0.180" targetFramework="net472" />
|
||||
<package id="cef.redist.x64" version="102.0.9" targetFramework="net472" />
|
||||
<package id="cef.redist.x86" version="102.0.9" targetFramework="net472" />
|
||||
<package id="CefSharp.Common" version="102.0.90" targetFramework="net472" />
|
||||
<package id="CefSharp.WinForms" version="102.0.90" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
|
||||
<package id="Syroot.Windows.IO.KnownFolders" version="1.3.0" targetFramework="net472" />
|
||||
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net472" />
|
||||
|
|
Loading…
Reference in a new issue