Skip to content

Commit

Permalink
CEF Upgrade - Breaking Changes
Browse files Browse the repository at this point in the history
- Remove CefSettings.EnableNetSecurityExpiration
- Remove RequestContextSettings.EnableNetSecurityExpiration
#2954

- Remove IFrame.LoadStringForUrl and IWebBrowser.LoadString
Resolves #2955
  • Loading branch information
amaitland committed Nov 3, 2019
1 parent 3ee5b45 commit 60a1f64
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 90 deletions.
11 changes: 0 additions & 11 deletions CefSharp.BrowserSubprocess.Core/Wrapper/Frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,6 @@ void Frame::LoadUrl(String^ url)
_frame->LoadURL(StringUtils::ToNative(url));
}

///
// Load the contents of |html| with the specified dummy |url|. |url|
// should have a standard scheme (for example, http scheme) or behaviors like
// link clicks and web security restrictions may not behave as expected.
///
/*--cef()--*/
void Frame::LoadStringForUrl(String^ html, String^ url)
{
_frame->LoadString(StringUtils::ToNative(html), StringUtils::ToNative(url));
}

///
// Execute a string of JavaScript code in this frame. The |script_url|
// parameter is the URL where the script in question can be found, if any.
Expand Down
10 changes: 1 addition & 9 deletions CefSharp.BrowserSubprocess.Core/Wrapper/Frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,6 @@ namespace CefSharp
/*--cef()--*/
virtual void LoadUrl(String^ url);

///
// Load the contents of |html| with the specified dummy |url|. |url|
// should have a standard scheme (for example, http scheme) or behaviors like
// link clicks and web security restrictions may not behave as expected.
///
/*--cef()--*/
virtual void LoadStringForUrl(String^ html, String^ url);

///
// Execute a string of JavaScript code in this frame. The |script_url|
// parameter is the URL where the script in question can be found, if any.
Expand Down Expand Up @@ -241,7 +233,7 @@ namespace CefSharp
{
IBrowser^ get();
}

virtual IRequest^ CreateRequest(bool initializePostData);

virtual IUrlRequest^ CreateUrlRequest(IRequest^ request, IUrlRequestClient^ client);
Expand Down
12 changes: 0 additions & 12 deletions CefSharp.Core/AbstractCefSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,6 @@ namespace CefSharp
void set(bool value) { _cefSettings->command_line_args_disabled = value; }
}

/// <summary>
/// Set to true to enable date-based expiration of built in network security information (i.e. certificate transparency logs,
/// HSTS preloading and pinning information). Enabling this option improves network security but may cause HTTPS load failures when
/// using CEF binaries built more than 10 weeks in the past. See https://www.certificate-transparency.org/ and
/// https://www.chromium.org/hsts for details. Can be set globally using the CefSettings.EnableNetSecurityExpiration value.
/// </summary>
property bool EnableNetSecurityExpiration
{
bool get() { return _cefSettings->enable_net_security_expiration == 1; }
void set(bool value) { _cefSettings->enable_net_security_expiration = value; }
}

/// <summary>
/// Set to true to control browser process main (UI) thread message pump
/// scheduling via the IBrowserProcessHandler.OnScheduleMessagePumpWork
Expand Down
14 changes: 0 additions & 14 deletions CefSharp.Core/Internals/CefFrameWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,6 @@ void CefFrameWrapper::LoadUrl(String^ url)
_frame->LoadURL(StringUtils::ToNative(url));
}

///
// Load the contents of |html| with the specified dummy |url|. |url|
// should have a standard scheme (for example, http scheme) or behaviors like
// link clicks and web security restrictions may not behave as expected.
///
/*--cef()--*/
void CefFrameWrapper::LoadStringForUrl(String^ html, String^ url)
{
ThrowIfDisposed();
ThrowIfFrameInvalid();

_frame->LoadString(StringUtils::ToNative(html), StringUtils::ToNative(url));
}

///
// Execute a string of JavaScript code in this frame. The |script_url|
// parameter is the URL where the script in question can be found, if any.
Expand Down
8 changes: 0 additions & 8 deletions CefSharp.Core/Internals/CefFrameWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,6 @@ namespace CefSharp
/*--cef()--*/
virtual void LoadUrl(String^ url);

///
// Load the contents of |html| with the specified dummy |url|. |url|
// should have a standard scheme (for example, http scheme) or behaviors like
// link clicks and web security restrictions may not behave as expected.
///
/*--cef()--*/
virtual void LoadStringForUrl(String^ html, String^ url);

///
// Execute a string of JavaScript code in this frame. The |script_url|
// parameter is the URL where the script in question can be found, if any.
Expand Down
12 changes: 0 additions & 12 deletions CefSharp.Core/RequestContextSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,6 @@ namespace CefSharp
void set(String^ value) { StringUtils::AssignNativeFromClr(_settings->accept_language_list, value); }
}

/// <summary>
/// Set to true to enable date-based expiration of built in network security information (i.e. certificate transparency logs,
/// HSTS preloading and pinning information). Enabling this option improves network security but may cause HTTPS load failures when
/// using CEF binaries built more than 10 weeks in the past. See https://www.certificate-transparency.org/ and
/// https://www.chromium.org/hsts for details. Can be set globally using the CefSettings.EnableNetSecurityExpiration value.
/// </summary>
property bool EnableNetSecurityExpiration
{
bool get() { return _settings->enable_net_security_expiration == 1; }
void set(bool value) { _settings->enable_net_security_expiration = value; }
}

/// <summary>
/// Set to true to ignore errors related to invalid SSL certificates.
/// Enabling this setting can lead to potential security vulnerabilities like
Expand Down
8 changes: 0 additions & 8 deletions CefSharp/IFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,6 @@ public interface IFrame : IDisposable
/// <param name="url">url to be loaded in the frame</param>
void LoadUrl(string url);

/// <summary>
/// Load the contents of html with the specified dummy url.
/// </summary>
/// <param name="html">html to be loaded</param>
/// <param name="url"> should have a standard scheme (for example, http scheme) or behaviors like
/// link clicks and web security restrictions may not behave as expected.</param>
void LoadStringForUrl(string html, string url);

/// <summary>
/// Execute a string of JavaScript code in this frame.
/// </summary>
Expand Down
16 changes: 0 additions & 16 deletions CefSharp/WebBrowserExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,22 +381,6 @@ public static void LoadUrlWithPostData(this IWebBrowser browser, string url, byt
}
}

/// <summary>
/// Load the string contents with the specified dummy url. Web security restrictions may not behave as expected.
/// </summary>
/// <param name="browser">The ChromiumWebBrowser instance this method extends</param>
/// <param name="html">html string to load</param>
/// <param name="url">the url should have a standard scheme (for example, http scheme) or behaviors like link clicks</param>
public static void LoadString(this IWebBrowser browser, string html, string url)
{
using (var frame = browser.GetMainFrame())
{
ThrowExceptionIfFrameNull(frame);

frame.LoadStringForUrl(html, url);
}
}

/// <summary>
/// Registers and loads a <see cref="ResourceHandler"/> that represents the HTML content.
/// </summary>
Expand Down

0 comments on commit 60a1f64

Please sign in to comment.