From e5ecfde20f70ffc7d32d4312fba31e47f24306e1 Mon Sep 17 00:00:00 2001 From: amaitland Date: Mon, 13 Mar 2017 10:28:44 +1000 Subject: [PATCH] Upgrade version number to 57.0.0 Upgrade to cef.redist.x86.3.2987.1591 CefSchemeRegistrar::AddCustomScheme has new params - IsSecure and IsCorsEnabled Also new CefRawPtr type is used for Scheme registra --- .../CefAppUnmanagedWrapper.cpp | 4 +- .../CefAppUnmanagedWrapper.h | 2 +- .../CefSharp.BrowserSubprocess.Core.vcxproj | 4 +- CefSharp.BrowserSubprocess.Core/Resource.rc | 58 +++++++++---------- .../packages.config | 2 +- CefSharp.BrowserSubprocess/app.manifest | 2 +- CefSharp.Core/CefSharp.Core.vcxproj | 4 +- CefSharp.Core/Internals/CefSharpApp.h | 10 ++-- CefSharp.Core/Resource.rc | 58 +++++++++---------- CefSharp.Core/packages.config | 2 +- CefSharp.Example/CefExample.cs | 9 ++- .../CefSharp.OffScreen.Example.csproj | 6 +- CefSharp.OffScreen.Example/app.manifest | 2 +- CefSharp.OffScreen.Example/crash_reporter.cfg | 2 +- CefSharp.OffScreen.Example/packages.config | 4 +- .../CefSharp.WinForms.Example.csproj | 6 +- CefSharp.WinForms.Example/app.manifest | 2 +- CefSharp.WinForms.Example/crash_reporter.cfg | 2 +- CefSharp.WinForms.Example/packages.config | 4 +- .../CefSharp.Wpf.Example.csproj | 6 +- CefSharp.Wpf.Example/app.manifest | 2 +- CefSharp.Wpf.Example/crash_reporter.cfg | 2 +- CefSharp.Wpf.Example/packages.config | 4 +- CefSharp/CefCustomScheme.cs | 19 +++++- CefSharp/Properties/AssemblyInfo.cs | 4 +- build.ps1 | 4 +- 26 files changed, 123 insertions(+), 101 deletions(-) diff --git a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp index 70411a645..9d7243a30 100644 --- a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp +++ b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp @@ -467,11 +467,11 @@ namespace CefSharp } } - void CefAppUnmanagedWrapper::OnRegisterCustomSchemes(CefRefPtr registrar) + void CefAppUnmanagedWrapper::OnRegisterCustomSchemes(CefRawPtr registrar) { for each (CefCustomScheme^ scheme in _schemes->AsReadOnly()) { - registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated); + registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated, scheme->IsSecure, scheme->IsCorsEnabled); } } } \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h index 8c2fd516d..28d5b2e93 100644 --- a/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h +++ b/CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h @@ -73,7 +73,7 @@ namespace CefSharp virtual DECL bool OnProcessMessageReceived(CefRefPtr browser, CefProcessId sourceProcessId, CefRefPtr message) OVERRIDE; virtual DECL void OnRenderThreadCreated(CefRefPtr extraInfo) OVERRIDE; virtual DECL void OnWebKitInitialized() OVERRIDE; - virtual DECL void OnRegisterCustomSchemes(CefRefPtr registrar) OVERRIDE; + virtual DECL void OnRegisterCustomSchemes(CefRawPtr registrar) OVERRIDE; virtual DECL void OnFocusedNodeChanged(CefRefPtr browser, CefRefPtr frame, CefRefPtr node) OVERRIDE; IMPLEMENT_REFCOUNTING(CefAppUnmanagedWrapper); diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj index a7eec756d..fa149ca72 100644 --- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj +++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj @@ -1,6 +1,6 @@  - + Debug @@ -67,7 +67,7 @@ - feb99166 + 83aee5eb true diff --git a/CefSharp.BrowserSubprocess.Core/Resource.rc b/CefSharp.BrowserSubprocess.Core/Resource.rc index 66cf7e5ee..8aa4d3c1e 100644 --- a/CefSharp.BrowserSubprocess.Core/Resource.rc +++ b/CefSharp.BrowserSubprocess.Core/Resource.rc @@ -1,29 +1,29 @@ -1 VERSIONINFO - FILEVERSION 55.0.0 - PRODUCTVERSION 55.0.0 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" - VALUE "FileVersion", "55.0.0" - VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors" - VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "55.0.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END +1 VERSIONINFO + FILEVERSION 57.0.0 + PRODUCTVERSION 57.0.0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "CefSharp.BrowserSubprocess.Core" + VALUE "FileVersion", "57.0.0" + VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors" + VALUE "ProductName", "CefSharp" + VALUE "ProductVersion", "57.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/CefSharp.BrowserSubprocess.Core/packages.config b/CefSharp.BrowserSubprocess.Core/packages.config index 2278db0cb..5f0ab6d0d 100644 --- a/CefSharp.BrowserSubprocess.Core/packages.config +++ b/CefSharp.BrowserSubprocess.Core/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/CefSharp.BrowserSubprocess/app.manifest b/CefSharp.BrowserSubprocess/app.manifest index 9f8f8adcb..7c91029ce 100644 --- a/CefSharp.BrowserSubprocess/app.manifest +++ b/CefSharp.BrowserSubprocess/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj index 9748c5893..823208a55 100644 --- a/CefSharp.Core/CefSharp.Core.vcxproj +++ b/CefSharp.Core/CefSharp.Core.vcxproj @@ -1,6 +1,6 @@  - + Debug @@ -67,7 +67,7 @@ <_ProjectFileVersion>11.0.51106.1 - 5afa3199 + e08701bb bin\$(Platform)\$(Configuration)\ diff --git a/CefSharp.Core/Internals/CefSharpApp.h b/CefSharp.Core/Internals/CefSharpApp.h index 3c109d239..42e47dbda 100644 --- a/CefSharp.Core/Internals/CefSharpApp.h +++ b/CefSharp.Core/Internals/CefSharpApp.h @@ -72,7 +72,9 @@ namespace CefSharp argument += scheme->SchemeName + "|"; argument += (scheme->IsStandard ? "T" : "F") + "|"; argument += (scheme->IsLocal ? "T" : "F") + "|"; - argument += (scheme->IsDisplayIsolated ? "T" : "F") + ";"; + argument += (scheme->IsDisplayIsolated ? "T" : "F") + "|"; + argument += (scheme->IsSecure ? "T" : "F") + "|"; + argument += (scheme->IsCorsEnabled ? "T" : "F") + ";"; } argument = argument->TrimEnd(';'); @@ -111,12 +113,12 @@ namespace CefSharp } } - virtual void OnRegisterCustomSchemes(CefRefPtr registrar) OVERRIDE + virtual void OnRegisterCustomSchemes(CefRawPtr registrar) OVERRIDE { - for each (CefCustomScheme^ cefCustomScheme in _cefSettings->CefCustomSchemes) + for each (CefCustomScheme^ scheme in _cefSettings->CefCustomSchemes) { // TOOD: Consider adding error handling here. But where do we report any errors that may have occurred? - registrar->AddCustomScheme(StringUtils::ToNative(cefCustomScheme->SchemeName), cefCustomScheme->IsStandard, cefCustomScheme->IsLocal, cefCustomScheme->IsDisplayIsolated); + registrar->AddCustomScheme(StringUtils::ToNative(scheme->SchemeName), scheme->IsStandard, scheme->IsLocal, scheme->IsDisplayIsolated, scheme->IsSecure, scheme->IsCorsEnabled); } }; diff --git a/CefSharp.Core/Resource.rc b/CefSharp.Core/Resource.rc index d2cd85836..db0eeef50 100644 --- a/CefSharp.Core/Resource.rc +++ b/CefSharp.Core/Resource.rc @@ -1,29 +1,29 @@ -1 VERSIONINFO - FILEVERSION 55.0.0 - PRODUCTVERSION 55.0.0 - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "FileDescription", "CefSharp.Core" - VALUE "FileVersion", "55.0.0" - VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors" - VALUE "ProductName", "CefSharp" - VALUE "ProductVersion", "55.0.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END +1 VERSIONINFO + FILEVERSION 57.0.0 + PRODUCTVERSION 57.0.0 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "CefSharp.Core" + VALUE "FileVersion", "57.0.0" + VALUE "LegalCopyright", "Copyright © 2010-2017 The CefSharp Authors" + VALUE "ProductName", "CefSharp" + VALUE "ProductVersion", "57.0.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/CefSharp.Core/packages.config b/CefSharp.Core/packages.config index 2278db0cb..5f0ab6d0d 100644 --- a/CefSharp.Core/packages.config +++ b/CefSharp.Core/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/CefSharp.Example/CefExample.cs b/CefSharp.Example/CefExample.cs index 256202144..f9952dbf0 100644 --- a/CefSharp.Example/CefExample.cs +++ b/CefSharp.Example/CefExample.cs @@ -142,14 +142,16 @@ namespace CefSharp.Example settings.RegisterScheme(new CefCustomScheme { SchemeName = CefSharpSchemeHandlerFactory.SchemeName, - SchemeHandlerFactory = new CefSharpSchemeHandlerFactory() + SchemeHandlerFactory = new CefSharpSchemeHandlerFactory(), + IsSecure = true //treated with the same security rules as those applied to "https" URLs //SchemeHandlerFactory = new InMemorySchemeAndResourceHandlerFactory() }); settings.RegisterScheme(new CefCustomScheme { SchemeName = CefSharpSchemeHandlerFactory.SchemeNameTest, - SchemeHandlerFactory = new CefSharpSchemeHandlerFactory() + SchemeHandlerFactory = new CefSharpSchemeHandlerFactory(), + IsSecure = true //treated with the same security rules as those applied to "https" URLs }); //You can use the http/https schemes - best to register for a specific domain @@ -157,7 +159,8 @@ namespace CefSharp.Example { SchemeName = "https", SchemeHandlerFactory = new CefSharpSchemeHandlerFactory(), - DomainName = "cefsharp.com" + DomainName = "cefsharp.com", + IsSecure = true //treated with the same security rules as those applied to "https" URLs }); settings.RegisterScheme(new CefCustomScheme diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj index 2315547b0..60da3173a 100644 --- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj +++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj @@ -13,7 +13,7 @@ 512 - 437304d9 + 4b6acf6b true @@ -95,6 +95,6 @@ - - + + \ No newline at end of file diff --git a/CefSharp.OffScreen.Example/app.manifest b/CefSharp.OffScreen.Example/app.manifest index 0e0fdd42e..5c81e7581 100644 --- a/CefSharp.OffScreen.Example/app.manifest +++ b/CefSharp.OffScreen.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.OffScreen.Example/crash_reporter.cfg b/CefSharp.OffScreen.Example/crash_reporter.cfg index 2aa0269ab..16e7e7e03 100644 --- a/CefSharp.OffScreen.Example/crash_reporter.cfg +++ b/CefSharp.OffScreen.Example/crash_reporter.cfg @@ -22,6 +22,6 @@ [Config] ProductName=CefSharp -ProductVersion=55.0.0 +ProductVersion=57.0.0 AppName=CefSharp ExternalHandler=CefSharp.BrowserSubprocess.exe \ No newline at end of file diff --git a/CefSharp.OffScreen.Example/packages.config b/CefSharp.OffScreen.Example/packages.config index a51aa027f..a0c7516f8 100644 --- a/CefSharp.OffScreen.Example/packages.config +++ b/CefSharp.OffScreen.Example/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj index d7d62eb7d..ab8663633 100644 --- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj +++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj @@ -21,7 +21,7 @@ 3.5 Client - 1e004422 + c84f6112 x64 @@ -185,6 +185,6 @@ - - + + \ No newline at end of file diff --git a/CefSharp.WinForms.Example/app.manifest b/CefSharp.WinForms.Example/app.manifest index e96d96ca6..6980da6c6 100644 --- a/CefSharp.WinForms.Example/app.manifest +++ b/CefSharp.WinForms.Example/app.manifest @@ -8,7 +8,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.WinForms.Example/crash_reporter.cfg b/CefSharp.WinForms.Example/crash_reporter.cfg index 2aa0269ab..16e7e7e03 100644 --- a/CefSharp.WinForms.Example/crash_reporter.cfg +++ b/CefSharp.WinForms.Example/crash_reporter.cfg @@ -22,6 +22,6 @@ [Config] ProductName=CefSharp -ProductVersion=55.0.0 +ProductVersion=57.0.0 AppName=CefSharp ExternalHandler=CefSharp.BrowserSubprocess.exe \ No newline at end of file diff --git a/CefSharp.WinForms.Example/packages.config b/CefSharp.WinForms.Example/packages.config index a51aa027f..a0c7516f8 100644 --- a/CefSharp.WinForms.Example/packages.config +++ b/CefSharp.WinForms.Example/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj index 060aeff1a..84b2dd748 100644 --- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj +++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj @@ -21,7 +21,7 @@ 3.5 Client - b61df991 + 2c461293 true @@ -186,6 +186,6 @@ - - + + \ No newline at end of file diff --git a/CefSharp.Wpf.Example/app.manifest b/CefSharp.Wpf.Example/app.manifest index 537eb9d79..571ae0bfb 100644 --- a/CefSharp.Wpf.Example/app.manifest +++ b/CefSharp.Wpf.Example/app.manifest @@ -7,7 +7,7 @@ xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - + diff --git a/CefSharp.Wpf.Example/crash_reporter.cfg b/CefSharp.Wpf.Example/crash_reporter.cfg index 2aa0269ab..16e7e7e03 100644 --- a/CefSharp.Wpf.Example/crash_reporter.cfg +++ b/CefSharp.Wpf.Example/crash_reporter.cfg @@ -22,6 +22,6 @@ [Config] ProductName=CefSharp -ProductVersion=55.0.0 +ProductVersion=57.0.0 AppName=CefSharp ExternalHandler=CefSharp.BrowserSubprocess.exe \ No newline at end of file diff --git a/CefSharp.Wpf.Example/packages.config b/CefSharp.Wpf.Example/packages.config index abb9e5cc6..08223f9cc 100644 --- a/CefSharp.Wpf.Example/packages.config +++ b/CefSharp.Wpf.Example/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/CefSharp/CefCustomScheme.cs b/CefSharp/CefCustomScheme.cs index 50544334a..413d74ce6 100644 --- a/CefSharp/CefCustomScheme.cs +++ b/CefSharp/CefCustomScheme.cs @@ -74,6 +74,19 @@ namespace CefSharp /// public bool IsDisplayIsolated { get; set; } + /// + /// If true the scheme will be treated with the same security + /// rules as those applied to "https" URLs. For example, loading this scheme + /// from other secure schemes will not trigger mixed content warnings. + /// + public bool IsSecure { get; set; } + + /// + /// If true the scheme can be sent CORS requests. + /// This value should be true in most cases where IsStandard| is true. + /// + public bool IsCorsEnabled { get; set; } + /// /// Factory Class that creates instances /// for handling scheme requests. @@ -88,6 +101,8 @@ namespace CefSharp IsStandard = true; IsLocal = false; IsDisplayIsolated = false; + IsSecure = false; + IsCorsEnabled = false; } /// @@ -111,7 +126,9 @@ namespace CefSharp SchemeName = tokens[0], IsStandard = tokens[1] == "T", IsLocal = tokens[2] == "T", - IsDisplayIsolated = tokens[3] == "T" + IsDisplayIsolated = tokens[3] == "T", + IsSecure = tokens[4] == "T", + IsCorsEnabled = tokens[5] == "T" }; customSchemes.Add(customScheme); }); diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs index 5e657430c..0a0adbb99 100644 --- a/CefSharp/Properties/AssemblyInfo.cs +++ b/CefSharp/Properties/AssemblyInfo.cs @@ -34,8 +34,8 @@ namespace CefSharp public const bool ComVisible = false; public const string AssemblyCompany = "The CefSharp Authors"; public const string AssemblyProduct = "CefSharp"; - public const string AssemblyVersion = "55.0.0"; - public const string AssemblyFileVersion = "55.0.0.0"; + public const string AssemblyVersion = "57.0.0"; + public const string AssemblyFileVersion = "57.0.0.0"; public const string AssemblyCopyright = "Copyright © 2010-2017 The CefSharp Authors"; public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey; public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey; diff --git a/build.ps1 b/build.ps1 index 4793c661d..8eae20da8 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,9 +3,9 @@ param( [Parameter(Position = 0)] [string] $Target = "vs2013", [Parameter(Position = 1)] - [string] $Version = "55.0.0", + [string] $Version = "57.0.0", [Parameter(Position = 2)] - [string] $AssemblyVersion = "55.0.0" + [string] $AssemblyVersion = "57.0.0" ) $WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition