Skip to content

Commit f06b958

Browse files
Update to native Electron 11.1.1 - Fix breaking changes and refactoring.
1 parent b9feff3 commit f06b958

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2083
-718
lines changed

Changelog.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Not released
22

3-
# 9.31.3
3+
# 11.5.1
44

55
ElectronNET.CLI:
66

7+
* New Feature: Added new build and start commandline options for single exe (thanks [nathanwienand](https://github.com/nathanwienand)) [\#506](https://github.com/ElectronNET/Electron.NET/pull/506)
78
* New Feature: Set a description of the app in `electron.manifest.json` (thanks [BurtsevC](https://github.com/BurtsevC)) [\#433](https://github.com/ElectronNET/Electron.NET/pull/433)
89
* New Feature: Set a target for the start command (thanks [gabecook](https://github.com/gabecook)) [\#463](https://github.com/ElectronNET/Electron.NET/pull/463)
910
* New Feature: `electronize init` support for F# projects (thanks [kojo12228](https://github.com/kojo12228)) [\#457](https://github.com/ElectronNET/Electron.NET/pull/457)
@@ -12,7 +13,12 @@ ElectronNET.CLI:
1213

1314
ElectronNET.API:
1415

15-
* New Feature: Native Electron 9.2.0 support, but not all new features (we search contributors)
16+
* New Feature: Native Electron 11.1.1 support, but not all new features (we search contributors)
17+
* Breaking API Changes (from native Electron 11.0): - Removed: BrowserView.{destroy, fromId, fromWebContents, getAllViews} and id property of BrowserView
18+
* New Feature: Upgrade to .NET 5 (thanks [scottkuhl](https://github.com/scottkuhl)) [\#509](https://github.com/ElectronNET/Electron.NET/pull/509)
19+
* New Feature: Adding a configurable default electron port. (thanks [aarong-av](https://github.com/aarong-av)) [\#505](https://github.com/ElectronNET/Electron.NET/pull/505)
20+
* New Feature: Added support for launching the application with a file on MacOS (thanks [dlitty](https://github.com/dlitty)) [\#478](https://github.com/ElectronNET/Electron.NET/pull/478)
21+
* Improved: Avoid Blocking Calls in App and AutoUpdater (thanks [freosc](https://github.com/freosc)) [\#474](https://github.com/ElectronNET/Electron.NET/pull/474)
1622
* Fixed bug: Set default WebPreferences.DefaultFontSize (thanks [duncanawoods](https://github.com/duncanawoods)) [\#468](https://github.com/ElectronNET/Electron.NET/pull/468)
1723

1824
# Released

ElectronNET.API/BrowserView.cs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
using Newtonsoft.Json;
33
using Newtonsoft.Json.Linq;
44
using Newtonsoft.Json.Serialization;
5-
using System;
6-
using System.Collections.Generic;
7-
using System.Text;
85
using System.Threading.Tasks;
96

107
namespace ElectronNET.API
@@ -29,30 +26,6 @@ public class BrowserView
2926
/// </summary>
3027
public WebContents WebContents { get; internal set; }
3128

32-
/// <summary>
33-
/// Whether the view is destroyed.
34-
/// </summary>
35-
public Task<bool> IsDestroyedAsync
36-
{
37-
get
38-
{
39-
return Task.Run<bool>(() =>
40-
{
41-
var taskCompletionSource = new TaskCompletionSource<bool>();
42-
43-
BridgeConnector.Socket.On("browserView-isDestroyed-reply", (result) =>
44-
{
45-
BridgeConnector.Socket.Off("browserView-isDestroyed-reply");
46-
taskCompletionSource.SetResult((bool)result);
47-
});
48-
49-
BridgeConnector.Socket.Emit("browserView-isDestroyed", Id);
50-
51-
return taskCompletionSource.Task;
52-
});
53-
}
54-
}
55-
5629
/// <summary>
5730
/// Resizes and moves the view to the supplied bounds relative to the window.
5831
///
@@ -83,8 +56,6 @@ public Rectangle Bounds
8356
}
8457
}
8558

86-
internal Action<BrowserView> Destroyed;
87-
8859
/// <summary>
8960
/// BrowserView
9061
/// </summary>
@@ -97,18 +68,6 @@ internal BrowserView(int id)
9768
WebContents = new WebContents(id + 1000);
9869
}
9970

100-
/// <summary>
101-
/// Force closing the view, the `unload` and `beforeunload` events won't be emitted
102-
/// for the web page.After you're done with a view, call this function in order to
103-
/// free memory and other resources as soon as possible.
104-
/// </summary>
105-
public void Destroy()
106-
{
107-
BridgeConnector.Socket.Emit("browserView-destroy", Id);
108-
109-
Destroyed?.Invoke(this);
110-
}
111-
11271
/// <summary>
11372
/// (experimental)
11473
/// </summary>

ElectronNET.API/Entities/RemoveClientCertificate.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

ElectronNET.API/Session.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ public Task ClearAuthCacheAsync(RemovePassword options)
6464
/// <summary>
6565
/// Clears the session’s HTTP authentication cache.
6666
/// </summary>
67-
/// <param name="options"></param>
68-
public Task ClearAuthCacheAsync(RemoveClientCertificate options)
67+
public Task ClearAuthCacheAsync()
6968
{
7069
var taskCompletionSource = new TaskCompletionSource<object>();
7170
string guid = Guid.NewGuid().ToString();
@@ -76,7 +75,7 @@ public Task ClearAuthCacheAsync(RemoveClientCertificate options)
7675
taskCompletionSource.SetResult(null);
7776
});
7877

79-
BridgeConnector.Socket.Emit("webContents-session-clearAuthCache", Id, JObject.FromObject(options, _jsonSerializer), guid);
78+
BridgeConnector.Socket.Emit("webContents-session-clearAuthCache", Id, guid);
8079

8180
return taskCompletionSource.Task;
8281
}

ElectronNET.API/WindowManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ public Task<BrowserView> CreateBrowserViewAsync(BrowserViewConstructorOptions op
192192

193193
string browserViewId = id.ToString();
194194
BrowserView browserView = new BrowserView(int.Parse(browserViewId));
195-
browserView.Destroyed += (b) => _browserViews.Remove(b);
196195

197196
_browserViews.Add(browserView);
198197

ElectronNET.CLI/Commands/BuildCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public Task<bool> ExecuteAsync()
197197
ProcessHelper.CmdExecute($"node build-helper.js " + manifestFileName, tempPath);
198198

199199
Console.WriteLine($"Package Electron App for Platform {platformInfo.ElectronPackerPlatform}...");
200-
ProcessHelper.CmdExecute($"npx electron-builder --config=./bin/electron-builder.json --{platformInfo.ElectronPackerPlatform} --{electronArch} -c.electronVersion=9.2.0 {electronParams}", tempPath);
200+
ProcessHelper.CmdExecute($"npx electron-builder --config=./bin/electron-builder.json --{platformInfo.ElectronPackerPlatform} --{electronArch} -c.electronVersion=11.1.1 {electronParams}", tempPath);
201201

202202
Console.WriteLine("... done");
203203

ElectronNET.Host/ElectronHostHook/connector.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/ElectronHostHook/connector.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/ElectronHostHook/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElectronNET.Host/ElectronHostHook/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)