diff --git a/.nuget/packages.config b/.nuget/packages.config
deleted file mode 100644
index a05271e70..000000000
--- a/.nuget/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/CefSharp.Core/BrowserSettings.h b/CefSharp.Core/BrowserSettings.h
index dcd6be4e9..bd47ec32a 100644
--- a/CefSharp.Core/BrowserSettings.h
+++ b/CefSharp.Core/BrowserSettings.h
@@ -272,10 +272,5 @@ namespace CefSharp
void set(Nullable^ value) { _browserSettings->webgl = CefStateFromDisabledSetting(value); }
}
- property Nullable^ AcceleratedCompositingDisabled
- {
- Nullable^ get() { return CefStateToDisabledSetting(_browserSettings->accelerated_compositing); }
- void set(Nullable^ value) { _browserSettings->accelerated_compositing = CefStateFromDisabledSetting(value); }
- }
};
}
\ No newline at end of file
diff --git a/CefSharp.Core/Cef.h b/CefSharp.Core/Cef.h
index 6ea7131dc..f90fe5a8e 100644
--- a/CefSharp.Core/Cef.h
+++ b/CefSharp.Core/Cef.h
@@ -331,7 +331,7 @@ namespace CefSharp
auto wrapper = new CompletionHandler(handler);
- return manager->FlushStore(static_cast>(wrapper));
+ return manager->FlushStore(static_cast>(wrapper));
}
/// Shuts down CefSharp and the underlying CEF infrastructure. This method is safe to call multiple times; it will only
diff --git a/CefSharp.Core/CefSettings.h b/CefSharp.Core/CefSettings.h
index 0d5dd0573..935bb4843 100644
--- a/CefSharp.Core/CefSettings.h
+++ b/CefSharp.Core/CefSettings.h
@@ -34,8 +34,6 @@ namespace CefSharp
return LOGSEVERITY_WARNING;
case CefSharp::LogSeverity::Error:
return LOGSEVERITY_ERROR;
- case CefSharp::LogSeverity::ErrorReport:
- return LOGSEVERITY_ERROR_REPORT;
case CefSharp::LogSeverity::Disable:
default:
return LOGSEVERITY_DISABLE;
@@ -54,8 +52,6 @@ namespace CefSharp
return CefSharp::LogSeverity::Warning;
case LOGSEVERITY_ERROR:
return CefSharp::LogSeverity::Error;
- case LOGSEVERITY_ERROR_REPORT:
- return CefSharp::LogSeverity::ErrorReport;
case LOGSEVERITY_DISABLE:
default:
return CefSharp::LogSeverity::Disable;
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index a29710e96..d557d10e7 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -1,6 +1,6 @@
-
+
Debug
@@ -66,6 +66,7 @@
<_ProjectFileVersion>11.0.51106.1
+ 9aa99f24
bin\$(Configuration)\
@@ -238,6 +239,7 @@
+
@@ -278,6 +280,6 @@
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+
\ No newline at end of file
diff --git a/CefSharp.Core/CefSharp.Core.vcxproj.filters b/CefSharp.Core/CefSharp.Core.vcxproj.filters
index 89d19da60..e1a242f19 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj.filters
+++ b/CefSharp.Core/CefSharp.Core.vcxproj.filters
@@ -121,6 +121,9 @@
Header Files
+
+ Header Files
+
diff --git a/CefSharp.Core/Internals/AutoLock.h b/CefSharp.Core/Internals/AutoLock.h
new file mode 100644
index 000000000..659f8a306
--- /dev/null
+++ b/CefSharp.Core/Internals/AutoLock.h
@@ -0,0 +1,58 @@
+#pragma once
+
+#include
+
+namespace CefSharp
+{
+ namespace Internals
+ {
+ private class CriticalSection
+ {
+ public:
+ CriticalSection()
+ {
+ ::InitializeCriticalSection(&_cs);
+ }
+
+ ~CriticalSection()
+ {
+ ::DeleteCriticalSection(&_cs);
+ }
+
+ void Enter()
+ {
+ ::EnterCriticalSection(&_cs);
+ }
+ void Leave()
+ {
+ ::LeaveCriticalSection(&_cs);
+ }
+
+ private:
+ CriticalSection(const CriticalSection&);
+ CriticalSection& operator=(const CriticalSection&);
+
+ CRITICAL_SECTION _cs;
+ };
+
+ private class AutoLock
+ {
+ public:
+ AutoLock(CriticalSection& cs) : _cs(cs)
+ {
+ _cs.Enter();
+ }
+
+ ~AutoLock()
+ {
+ _cs.Leave();
+ }
+
+ private:
+ AutoLock(const AutoLock&);
+ AutoLock& operator=(const AutoLock&);
+
+ CriticalSection& _cs;
+ };
+ };
+};
\ No newline at end of file
diff --git a/CefSharp.Core/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index b8526f467..8cf9f81b4 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -60,7 +60,7 @@ namespace CefSharp
handler->OnBeforeClose(_browserControl);
}
- _cefBrowser = nullptr;
+ _cefBrowser = NULL;
}
}
@@ -163,7 +163,8 @@ namespace CefSharp
return;
}
- AutoLock lock_scope(this);
+ AutoLock lock_scope(_syncRoot);
+
if (frame->IsMain())
{
_browserControl->SetIsLoading(true);
@@ -180,7 +181,8 @@ namespace CefSharp
return;
}
- AutoLock lock_scope(this);
+ AutoLock lock_scope(_syncRoot);
+
if (frame->IsMain())
{
_browserControl->SetIsLoading(false);
diff --git a/CefSharp.Core/Internals/ClientAdapter.h b/CefSharp.Core/Internals/ClientAdapter.h
index c5df134b0..c05b1d500 100644
--- a/CefSharp.Core/Internals/ClientAdapter.h
+++ b/CefSharp.Core/Internals/ClientAdapter.h
@@ -8,6 +8,7 @@
#include "include/cef_app.h"
#include "include/cef_client.h"
#include "include/cef_render_process_handler.h"
+#include "AutoLock.h"
using namespace System;
@@ -29,7 +30,8 @@ namespace CefSharp
public CefDialogHandler
{
private:
- gcroot _browserControl;
+ CriticalSection _syncRoot;
+ gcroot _browserControl;
gcroot^> _onAfterBrowserCreated;
HWND _browserHwnd;
CefRefPtr _cefBrowser;
@@ -48,7 +50,7 @@ namespace CefSharp
_browserControl = nullptr;
_onAfterBrowserCreated = nullptr;
_browserHwnd = nullptr;
- _cefBrowser = nullptr;
+ _cefBrowser = NULL;
_tooltip = nullptr;
}
@@ -117,7 +119,6 @@ namespace CefSharp
const CefString& default_file_name, const std::vector& accept_types,
CefRefPtr callback) OVERRIDE;
- IMPLEMENT_LOCKING(ClientAdapter);
IMPLEMENT_REFCOUNTING(ClientAdapter);
};
}
diff --git a/CefSharp.Core/Internals/CompletionHandler.h b/CefSharp.Core/Internals/CompletionHandler.h
index a1d4d851d..6982d907b 100644
--- a/CefSharp.Core/Internals/CompletionHandler.h
+++ b/CefSharp.Core/Internals/CompletionHandler.h
@@ -9,7 +9,7 @@
namespace CefSharp
{
- private class CompletionHandler : public CefCompletionHandler
+ private class CompletionHandler : public CefCompletionCallback
{
private:
gcroot _handler;
diff --git a/CefSharp.Core/Internals/RenderClientAdapter.h b/CefSharp.Core/Internals/RenderClientAdapter.h
index df5b95916..6d2ed2cf7 100644
--- a/CefSharp.Core/Internals/RenderClientAdapter.h
+++ b/CefSharp.Core/Internals/RenderClientAdapter.h
@@ -58,11 +58,9 @@ namespace CefSharp
{
return false;
}
- else
- {
- rect = CefRect(0, 0, _renderWebBrowser->Width, _renderWebBrowser->Height);
- return true;
- }
+
+ rect = CefRect(0, 0, _renderWebBrowser->Width, _renderWebBrowser->Height);
+ return true;
};
///
diff --git a/CefSharp.Core/Internals/StreamAdapter.cpp b/CefSharp.Core/Internals/StreamAdapter.cpp
index adc1be635..d17553d91 100644
--- a/CefSharp.Core/Internals/StreamAdapter.cpp
+++ b/CefSharp.Core/Internals/StreamAdapter.cpp
@@ -16,7 +16,7 @@ namespace CefSharp
size_t StreamAdapter::Read(void* ptr, size_t size, size_t n)
{
- AutoLock lock_scope(this);
+ AutoLock lock_scope(_syncRoot);
try {
array^ buffer = gcnew array(n * size);
diff --git a/CefSharp.Core/Internals/StreamAdapter.h b/CefSharp.Core/Internals/StreamAdapter.h
index 7f7bc3b7f..70c882389 100644
--- a/CefSharp.Core/Internals/StreamAdapter.h
+++ b/CefSharp.Core/Internals/StreamAdapter.h
@@ -3,6 +3,7 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "Stdafx.h"
+#include "AutoLock.h"
#pragma once
using namespace System;
@@ -14,6 +15,7 @@ namespace CefSharp
{
private class StreamAdapter : public CefReadHandler
{
+ CriticalSection _syncRoot;
gcroot _stream;
public:
@@ -25,7 +27,6 @@ namespace CefSharp
virtual int64 Tell();
virtual int Eof();
- IMPLEMENT_LOCKING(StreamAdapter);
IMPLEMENT_REFCOUNTING(StreamAdapter);
};
}
diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.h b/CefSharp.Core/ManagedCefBrowserAdapter.h
index 071677ba4..fac53f31d 100644
--- a/CefSharp.Core/ManagedCefBrowserAdapter.h
+++ b/CefSharp.Core/ManagedCefBrowserAdapter.h
@@ -57,8 +57,7 @@ namespace CefSharp
{
HWND hwnd = HWND();
CefWindowInfo window;
- window.SetAsOffScreen(hwnd);
- window.SetTransparentPainting(true);
+ window.SetAsWindowless(hwnd, TRUE);
CefString addressNative = StringUtils::ToNative("about:blank");
if (!CefBrowserHost::CreateBrowser(window, _renderClientAdapter.get(), addressNative,
diff --git a/CefSharp.Core/SchemeHandlerWrapper.cpp b/CefSharp.Core/SchemeHandlerWrapper.cpp
index 5d44aaa2b..d7902fa60 100644
--- a/CefSharp.Core/SchemeHandlerWrapper.cpp
+++ b/CefSharp.Core/SchemeHandlerWrapper.cpp
@@ -36,7 +36,7 @@ namespace CefSharp
bool handled = false;
- AutoLock lock_scope(this);
+ AutoLock lock_scope(_syncRoot);
auto schemeResponse = gcnew SchemeHandlerResponse(this);
auto onRequestCompleted = gcnew OnRequestCompletedHandler(schemeResponse, &SchemeHandlerResponse::OnRequestCompleted);
@@ -92,9 +92,9 @@ namespace CefSharp
{
bool has_data = false;
- AutoLock lock_scope(this);
+ AutoLock lock_scope(_syncRoot);
- if (!_stream)
+ if (static_cast(_stream) == nullptr)
{
bytes_read = 0;
}
@@ -118,17 +118,17 @@ namespace CefSharp
void SchemeHandlerWrapper::Cancel()
{
- if (!!_stream && _closeStream)
+ if (static_cast(_stream) != nullptr && _closeStream)
{
_stream->Close();
}
_stream = nullptr;
- _callback = nullptr;
+ _callback = NULL;
}
int SchemeHandlerWrapper::SizeFromStream()
{
- if (!_stream)
+ if (static_cast(_stream) == nullptr)
{
return 0;
}
diff --git a/CefSharp.Core/SchemeHandlerWrapper.h b/CefSharp.Core/SchemeHandlerWrapper.h
index 4f0939ba5..b1f349651 100644
--- a/CefSharp.Core/SchemeHandlerWrapper.h
+++ b/CefSharp.Core/SchemeHandlerWrapper.h
@@ -6,6 +6,7 @@
#include "Stdafx.h"
#include "include/cef_scheme.h"
+#include "Internals/AutoLock.h"
using namespace System;
using namespace System::IO;
@@ -17,6 +18,7 @@ namespace CefSharp
public class SchemeHandlerWrapper : public CefResourceHandler
{
+ CriticalSection _syncRoot;
gcroot _handler;
gcroot _stream;
CefRefPtr _callback;
@@ -33,7 +35,7 @@ namespace CefSharp
SchemeHandlerWrapper(ISchemeHandler^ handler) : _handler(handler)
{
- if (!_handler)
+ if (static_cast(_handler) == nullptr)
{
throw gcnew ArgumentException("handler must not be null");
}
@@ -45,7 +47,6 @@ namespace CefSharp
virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, CefRefPtr callback);
virtual void Cancel();
- IMPLEMENT_LOCKING(SchemeHandlerWrapper);
IMPLEMENT_REFCOUNTING(SchemeHandlerWrapper);
};
diff --git a/CefSharp.Core/Wrappers/CefSubprocessWrapper.h b/CefSharp.Core/Wrappers/CefSubprocessWrapper.h
new file mode 100644
index 000000000..d1912affe
--- /dev/null
+++ b/CefSharp.Core/Wrappers/CefSubprocessWrapper.h
@@ -0,0 +1,132 @@
+// Copyright © 2010-2014 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+#pragma once
+
+#include "include/cef_browser.h"
+#include "include/cef_runnable.h"
+
+using namespace System::Threading;
+
+namespace CefSharp
+{
+ private class CefBrowserUnmanagedWrapper
+ {
+ CefRefPtr _cefBrowser;
+
+ public:
+ gcroot WaitHandle;
+ gcroot
Error,
- ///
- /// ErrorReport logging
- ///
- ErrorReport,
-
///
/// Completely disable logging
///
diff --git a/CefSharp/Properties/AssemblyInfo.cs b/CefSharp/Properties/AssemblyInfo.cs
index b35156f55..e4d95c752 100644
--- a/CefSharp/Properties/AssemblyInfo.cs
+++ b/CefSharp/Properties/AssemblyInfo.cs
@@ -33,8 +33,8 @@ namespace CefSharp
public const bool ComVisible = false;
public const string AssemblyCompany = "The CefSharp Authors";
public const string AssemblyProduct = "CefSharp";
- public const string AssemblyVersion = "33.0.2";
- public const string AssemblyFileVersion = "33.0.2";
+ public const string AssemblyVersion = "37.0.0.0";
+ public const string AssemblyFileVersion = "37.0.0.0";
public const string AssemblyCopyright = "Copyright © The CefSharp Authors 2010-2014";
public const string CefSharpCoreProject = "CefSharp.Core, PublicKey=" + PublicKey;
public const string CefSharpBrowserSubprocessProject = "CefSharp.BrowserSubprocess, PublicKey=" + PublicKey;
diff --git a/CefSharp3.sln b/CefSharp3.sln
index f4bf45adc..e4dd53bea 100644
--- a/CefSharp3.sln
+++ b/CefSharp3.sln
@@ -63,6 +63,11 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{9F4008EF-0182-48C6-B0E8-972252DC3F72}"
ProjectSection(SolutionItems) = preProject
.nuget\packages.config = .nuget\packages.config
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D62CBBCA-9C35-4CB4-BA62-ADC79C9045DF}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{9AD9C469-B121-47BB-9B9F-30D1B96B52B0}"
+ ProjectSection(SolutionItems) = preProject
+ build.ps1 = build.ps1
EndProjectSection
EndProject
Global
@@ -201,5 +206,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A23AA466-1903-44F2-946D-25AD0500D56B} = {47D0DC8C-D707-4D8A-A578-7737AA9CE79B}
+ {9AD9C469-B121-47BB-9B9F-30D1B96B52B0} = {47D0DC8C-D707-4D8A-A578-7737AA9CE79B}
EndGlobalSection
EndGlobal
diff --git a/NuGet/CefSharp.Common.nuspec b/NuGet/CefSharp.Common.nuspec
index fcc5b2ce7..424648e4d 100644
--- a/NuGet/CefSharp.Common.nuspec
+++ b/NuGet/CefSharp.Common.nuspec
@@ -12,9 +12,12 @@
chrome browser
Copyright © 2010-2014 The CefSharp Authors
-
+
+
+
+
-
+
diff --git a/afterbuild.example.ps1 b/afterbuild.example.ps1
new file mode 100644
index 000000000..a862e42d9
--- /dev/null
+++ b/afterbuild.example.ps1
@@ -0,0 +1,32 @@
+param(
+ [Parameter(Position = 0, Mandatory = $true)]
+ [string] $Version
+)
+
+$WorkingDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
+$Nuget = Join-Path $env:LOCALAPPDATA .\nuget\NuGet.exe
+$PackagePath = Join-Path $WorkingDir\nuget
+
+function Write-Diagnostic
+{
+ param(
+ [Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
+ [string] $Message
+ )
+
+ Write-Host
+ Write-Host $Message -ForegroundColor Green
+ Write-Host
+}
+
+Write-Diagnostic "Uploading packages to myget"
+
+$Packages = @(
+ "$PackagePath\CefSharp.Common.$Version.nupkg",
+ "$PackagePath\CefSharp.WinForms.$Version.nupkg",
+ "$PackagePath\CefSharp.Wpf.$Version.nupkg"
+)
+
+$Packages | ForEach-Object {
+ . $Nuget push $_ -Source https://myget.org/F/X
+}
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
index 70134c446..7309ebd25 100644
--- a/build.ps1
+++ b/build.ps1
@@ -3,7 +3,9 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
- [string] $Version = "33.1.0-pre01"
+ [string] $Version = "37.0.0-pre02",
+ [Parameter(Position = 2)]
+ [string] $RedistVersion = "3.2062.1876"
)
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
@@ -217,9 +219,16 @@ function Nupkg
Write-Diagnostic "Building nuget package"
# Build packages
- . $nuget pack nuget\CefSharp.Common.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+ . $nuget pack nuget\CefSharp.Common.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget -Properties "RedistVersion=$RedistVersion"
. $nuget pack nuget\CefSharp.Wpf.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
. $nuget pack nuget\CefSharp.WinForms.nuspec -NoPackageAnalysis -Version $Version -OutputDirectory nuget
+
+ # Invoke `AfterBuild` script if available (ie. upload packages to myget)
+ if(-not (Test-Path $WorkingDir\AfterBuild.ps1)) {
+ return
+ }
+
+ . $WorkingDir\AfterBuild.ps1 -Version $Version
}
function DownloadNuget()
@@ -232,10 +241,25 @@ function DownloadNuget()
}
}
+function WriteAssemblyVersion
+{
+ param()
+
+ $Filename = Join-Path $WorkingDir CefSharp\Properties\AssemblyInfo.cs
+ $Regex = 'public const string AssemblyVersion = "(.*)"';
+
+ $AssemblyInfo = Get-Content $Filename
+ $NewString = $AssemblyInfo -replace $Regex, "public const string AssemblyVersion = ""$Version"""
+
+ $NewString | Set-Content $Filename -Encoding UTF8
+}
+
DownloadNuget
NugetPackageRestore
+WriteAssemblyVersion
+
switch -Exact ($Target) {
"nupkg"
{