Skip to content

Commit

Permalink
Merge 7d1eb68 into 46e9a1b
Browse files Browse the repository at this point in the history
  • Loading branch information
amaitland authored Aug 30, 2021
2 parents 46e9a1b + 7d1eb68 commit b53ff26
Show file tree
Hide file tree
Showing 93 changed files with 261 additions and 505 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace CefSharp
_methodCallbackSave = nullptr;
}

IMPLEMENT_REFCOUNTING(JavascriptAsyncMethodHandler);
IMPLEMENT_REFCOUNTINGM(JavascriptAsyncMethodHandler);
};
}
}
Expand Down
3 changes: 1 addition & 2 deletions CefSharp.BrowserSubprocess.Core/BindObjectAsyncHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,7 @@ namespace CefSharp
return false;
}


IMPLEMENT_REFCOUNTING(BindObjectAsyncHandler);
IMPLEMENT_REFCOUNTINGM(BindObjectAsyncHandler);
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace CefSharp
virtual DECL void OnFocusedNodeChanged(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefDOMNode> node) override;
virtual DECL void OnUncaughtException(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context, CefRefPtr<CefV8Exception> exception, CefRefPtr<CefV8StackTrace> stackTrace) override;

IMPLEMENT_REFCOUNTING(CefAppUnmanagedWrapper);
IMPLEMENT_REFCOUNTINGM(CefAppUnmanagedWrapper);
};
}
}
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/CefBrowserWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace CefSharp
public:
CefBrowserWrapper(CefRefPtr<CefBrowser> cefBrowser)
{
_cefBrowser = cefBrowser;
_cefBrowser = cefBrowser.get();
BrowserId = cefBrowser->GetIdentifier();
IsPopup = cefBrowser->IsPopup();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.92.0.25\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.92.0.25\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.93.1.7\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.93.1.7\build\cef.sdk.props')" />
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down Expand Up @@ -37,6 +37,7 @@
<RootNamespace>CefSharpBrowserSubprocessCore</RootNamespace>
<Keyword>NetCoreCProj</Keyword>
<TargetFramework>netcoreapp3.1</TargetFramework>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\CefSharp.props" />
Expand Down Expand Up @@ -254,12 +255,14 @@
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\MCefRefPtr.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\ReportUnhandledExceptions.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\ObjectsSerialization.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\StringUtils.h" />
<ClInclude Include="BindObjectAsyncHandler.h" />
<ClCompile Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.cpp" />
<ClCompile Include="BrowserSubprocessExecutable.h" />
<ClInclude Include="Cef.h" />
<ClInclude Include="JavascriptRootObjectWrapper.h" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.92.0.25\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.92.0.25\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.93.1.7\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.93.1.7\build\cef.sdk.props')" />
<Import Project="..\packages\GitLink.3.1.0\build\GitLink.props" Condition="Exists('..\packages\GitLink.3.1.0\build\GitLink.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
Expand All @@ -25,6 +25,7 @@
<Keyword>ManagedCProj</Keyword>
<RootNamespace>CefSharpBrowserSubprocessCore</RootNamespace>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\CefSharp.props" />
Expand Down Expand Up @@ -168,11 +169,13 @@
<Reference Include="System.ServiceModel" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\MCefRefPtr.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\ObjectsSerialization.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\Serialization\Primitives.h" />
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\StringUtils.h" />
<ClInclude Include="BindObjectAsyncHandler.h" />
<ClCompile Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.cpp" />
<ClCompile Include="BrowserSubprocessExecutable.h" />
<ClInclude Include="Cef.h" />
<ClInclude Include="JavascriptPromiseHandler.h" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
<ClInclude Include="JavascriptPromiseHandler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp">
Expand Down Expand Up @@ -190,6 +193,9 @@
<ClCompile Include="BrowserSubprocessExecutable.h">
<Filter>Header Files</Filter>
</ClCompile>
<ClCompile Include="..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptMethodHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace CefSharp

CefRefPtr<CefV8Value> ConvertToCefObject(Object^ obj);

IMPLEMENT_REFCOUNTING(JavascriptMethodHandler);
IMPLEMENT_REFCOUNTINGM(JavascriptMethodHandler);
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace CefSharp
return true;
}

IMPLEMENT_REFCOUNTING(JavascriptPostMessageHandler);
IMPLEMENT_REFCOUNTINGM(JavascriptPostMessageHandler);
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/JavascriptPromiseHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace CefSharp
return false;
}

IMPLEMENT_REFCOUNTING(JavascriptPromiseHandler);
IMPLEMENT_REFCOUNTINGM(JavascriptPromiseHandler);
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace CefSharp
return true;
}

IMPLEMENT_REFCOUNTING(JavascriptPropertyHandler);
IMPLEMENT_REFCOUNTINGM(JavascriptPropertyHandler);
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace CefSharp
return true;
}

IMPLEMENT_REFCOUNTING(RegisterBoundObjectHandler);
IMPLEMENT_REFCOUNTINGM(RegisterBoundObjectHandler);
};
}
}
Expand Down
1 change: 1 addition & 0 deletions CefSharp.BrowserSubprocess.Core/Stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <include/cef_base.h>

#include ".\..\CefSharp.Core.Runtime\Internals\CefRefCountManaged.h"
#include ".\..\CefSharp.Core.Runtime\Internals\MCefRefPtr.h"
#include ".\..\CefSharp.Core.Runtime\Internals\StringUtils.h"
#include "vcclr_local.h"
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.BrowserSubprocess.Core/SubProcessApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace CefSharp
}
}

IMPLEMENT_REFCOUNTING(SubProcessApp);
IMPLEMENT_REFCOUNTINGM(SubProcessApp);
};
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.sdk" version="92.0.25" targetFramework="native" />
<package id="cef.sdk" version="93.1.7" targetFramework="native" />
<package id="GitLink" version="3.1.0" targetFramework="native" developmentDependency="true" />
</packages>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.sdk" version="92.0.25" targetFramework="netcoreapp3.1" />
<package id="cef.sdk" version="93.1.7" targetFramework="netcoreapp3.1" />
<package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public static void EnableWaitForBrowsersToClose() { }
public static void PreShutdown() { }
public static void QuitMessageLoop() { }
public static void RefreshWebPlugins() { }
public static void RegisterWidevineCdm(string path, CefSharp.IRegisterCdmCallback callback) { }
public static System.Threading.Tasks.Task<CefSharp.CdmRegistration> RegisterWidevineCdmAsync(string path) { throw null; }
public static bool RemoveCrossOriginWhitelistEntry(string sourceOrigin, string targetProtocol, string targetDomain, bool allowTargetSubdomains) { throw null; }
public static void RemoveDisposable(System.IDisposable item) { }
public static void RunMessageLoop() { }
Expand Down
70 changes: 0 additions & 70 deletions CefSharp.Core.Runtime/Cef.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "Internals/CefSharpApp.h"
#include "Internals/CefWebPluginInfoVisitorAdapter.h"
#include "Internals/CefTaskScheduler.h"
#include "Internals/CefRegisterCdmCallbackAdapter.h"
#include "CookieManager.h"
#include "CefSettingsBase.h"
#include "RequestContext.h"
Expand Down Expand Up @@ -763,75 +762,6 @@ namespace CefSharp
return cef_get_min_log_level();
}

/// <summary>
/// Register the Widevine CDM plugin.
///
/// The client application is responsible for downloading an appropriate
/// platform-specific CDM binary distribution from Google, extracting the
/// contents, and building the required directory structure on the local machine.
/// The <see cref="CefSharp::IBrowserHost::StartDownload"/> method class can be used
/// to implement this functionality in CefSharp. Contact Google via
/// https://www.widevine.com/contact.html for details on CDM download.
///
///
/// path is a directory that must contain the following files:
/// 1. manifest.json file from the CDM binary distribution (see below).
/// 2. widevinecdm file from the CDM binary distribution (e.g.
/// widevinecdm.dll on Windows).
/// 3. widevidecdmadapter file from the CEF binary distribution (e.g.
/// widevinecdmadapter.dll on Windows).
///
/// If any of these files are missing or if the manifest file has incorrect
/// contents the registration will fail and callback will receive an ErrorCode
/// value of <see cref="CefSharp::CdmRegistrationErrorCode::IncorrectContents"/>.
///
/// The manifest.json file must contain the following keys:
/// A. "os": Supported OS (e.g. "mac", "win" or "linux").
/// B. "arch": Supported architecture (e.g. "ia32" or "x64").
/// C. "x-cdm-module-versions": Module API version (e.g. "4").
/// D. "x-cdm-interface-versions": Interface API version (e.g. "8").
/// E. "x-cdm-host-versions": Host API version (e.g. "8").
/// F. "version": CDM version (e.g. "1.4.8.903").
/// G. "x-cdm-codecs": List of supported codecs (e.g. "vp8,vp9.0,avc1").
///
/// A through E are used to verify compatibility with the current Chromium
/// version. If the CDM is not compatible the registration will fail and
/// callback will receive an ErrorCode value of <see cref="CdmRegistrationErrorCode::Incompatible"/>.
///
/// If registration is not supported at the time that Cef.RegisterWidevineCdm() is called then callback
/// will receive an ErrorCode value of <see cref="CdmRegistrationErrorCode::NotSupported"/>.
/// </summary>
/// <param name="path"> is a directory that contains the Widevine CDM files</param>
/// <param name="callback">optional callback - <see cref="IRegisterCdmCallback::OnRegistrationComplete"/>
/// will be executed asynchronously once registration is complete</param>
static void RegisterWidevineCdm(String^ path, [Optional] IRegisterCdmCallback^ callback)
{
CefRefPtr<CefRegisterCdmCallbackAdapter> adapter = nullptr;

if (callback != nullptr)
{
adapter = new CefRegisterCdmCallbackAdapter(callback);
}

CefRegisterWidevineCdm(StringUtils::ToNative(path), adapter);
}

/// <summary>
/// Register the Widevine CDM plugin.
///
/// See <see cref="RegisterWidevineCdm(String, IRegisterCdmCallback)"/> for more details.
/// </summary>
/// <param name="path"> is a directory that contains the Widevine CDM files</param>
/// <returns>Returns a Task that can be awaited to receive the <see cref="CdmRegistration"/> response.</returns>
static Task<CdmRegistration^>^ RegisterWidevineCdmAsync(String^ path)
{
auto callback = gcnew TaskRegisterCdmCallback();

RegisterWidevineCdm(path, callback);

return callback->Task;
}

/// <summary>
/// Returns the mime type for the specified file extension or an empty string if unknown.
/// </summary>
Expand Down
5 changes: 3 additions & 2 deletions CefSharp.Core.Runtime/CefSharp.Core.Runtime.netcore.vcxproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.92.0.25\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.92.0.25\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.93.1.7\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.93.1.7\build\cef.sdk.props')" />
<Import Project="..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
<Import Project="..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
<Import Project="..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
Expand Down Expand Up @@ -332,6 +332,7 @@
<ClCompile Include="Internals\CefExtensionWrapper.cpp" />
<ClCompile Include="Internals\CefFrameWrapper.cpp" />
<ClCompile Include="Internals\CefBrowserWrapper.cpp" />
<ClCompile Include="Internals\CefRefCountManaged.cpp" />
<ClCompile Include="Internals\CefUrlRequestClientAdapter.cpp" />
<ClCompile Include="Internals\CefValueWrapper.cpp" />
<ClCompile Include="Internals\ClientAdapter.cpp" />
Expand Down Expand Up @@ -361,6 +362,7 @@
<ClInclude Include="BrowserSettings.h" />
<ClInclude Include="Cef.h" />
<ClInclude Include="Internals\CefDevToolsMessageObserverAdapter.h" />
<ClInclude Include="Internals\CefRefCountManaged.h" />
<ClInclude Include="Internals\CefRegistrationWrapper.h" />
<ClInclude Include="Internals\CefResourceReadCallbackWrapper.h" />
<ClInclude Include="Internals\CefCookieAccessFilterAdapter.h" />
Expand Down Expand Up @@ -391,7 +393,6 @@
<ClInclude Include="Internals\CefFrameWrapper.h" />
<ClInclude Include="Internals\CefMenuModelWrapper.h" />
<ClInclude Include="Internals\CefPdfPrintCallbackWrapper.h" />
<ClInclude Include="Internals\CefRegisterCdmCallbackAdapter.h" />
<ClInclude Include="Internals\CefResolveCallbackAdapter.h" />
<ClInclude Include="Internals\CefResponseFilterAdapter.h" />
<ClInclude Include="Internals\CefResponseWrapper.h" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
<ClCompile Include="Internals\CefResourceHandlerAdapter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Internals\CefRefCountManaged.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="vcclr_local.h">
Expand Down Expand Up @@ -232,9 +235,6 @@
<ClInclude Include="Internals\CefCertificateCallbackWrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Internals\CefRegisterCdmCallbackAdapter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Internals\CefSetCookieCallbackAdapter.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -328,6 +328,9 @@
<ClInclude Include="DragData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Internals\CefRefCountManaged.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Internals\CefFrameWrapper.h">
Expand Down
5 changes: 3 additions & 2 deletions CefSharp.Core.Runtime/CefSharp.Core.Runtime.vcxproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\cef.sdk.92.0.25\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.92.0.25\build\cef.sdk.props')" />
<Import Project="..\packages\cef.sdk.93.1.7\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.93.1.7\build\cef.sdk.props')" />
<Import Project="..\packages\GitLink.3.1.0\build\GitLink.props" Condition="Exists('..\packages\GitLink.3.1.0\build\GitLink.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
Expand Down Expand Up @@ -236,6 +236,7 @@
<ClCompile Include="Internals\CefExtensionWrapper.cpp" />
<ClCompile Include="Internals\CefFrameWrapper.cpp" />
<ClCompile Include="Internals\CefBrowserWrapper.cpp" />
<ClCompile Include="Internals\CefRefCountManaged.cpp" />
<ClCompile Include="Internals\CefUrlRequestClientAdapter.cpp" />
<ClCompile Include="Internals\CefValueWrapper.cpp" />
<ClCompile Include="Internals\ClientAdapter.cpp" />
Expand Down Expand Up @@ -264,6 +265,7 @@
<ClInclude Include="Cef.h" />
<ClInclude Include="DragData.h" />
<ClInclude Include="Internals\CefDevToolsMessageObserverAdapter.h" />
<ClInclude Include="Internals\CefRefCountManaged.h" />
<ClInclude Include="Internals\CefRegistrationWrapper.h" />
<ClInclude Include="Internals\CefResourceReadCallbackWrapper.h" />
<ClInclude Include="Internals\CefCookieAccessFilterAdapter.h" />
Expand Down Expand Up @@ -293,7 +295,6 @@
<ClInclude Include="Internals\CefFrameWrapper.h" />
<ClInclude Include="Internals\CefMenuModelWrapper.h" />
<ClInclude Include="Internals\CefPdfPrintCallbackWrapper.h" />
<ClInclude Include="Internals\CefRegisterCdmCallbackAdapter.h" />
<ClInclude Include="Internals\CefResolveCallbackAdapter.h" />
<ClInclude Include="Internals\CefResponseFilterAdapter.h" />
<ClInclude Include="Internals\CefResponseWrapper.h" />
Expand Down
Loading

0 comments on commit b53ff26

Please sign in to comment.