Merge remote-tracking branch 'remotes/upstream/master' into feature/geocallback

This commit is contained in:
amaitland
2015-09-28 07:21:14 +10:00
11 changed files with 109 additions and 33 deletions
@@ -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.3.2454.1317\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.3.2454.1317\build\cef.sdk.props')" />
<Import Project="$(SolutionDir)\packages\cef.sdk.3.2454.1317\build\cef.sdk.props" Condition="Exists('$(SolutionDir)\packages\cef.sdk.3.2454.1317\build\cef.sdk.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
+1 -1
View File
@@ -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.3.2454.1317\build\cef.sdk.props" Condition="Exists('..\packages\cef.sdk.3.2454.1317\build\cef.sdk.props')" />
<Import Project="$(SolutionDir)\packages\cef.sdk.3.2454.1317\build\cef.sdk.props" Condition="Exists('$(SolutionDir)\packages\cef.sdk.3.2454.1317\build\cef.sdk.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -241,6 +241,9 @@
<ClInclude Include="Internals\CefGetGeolocationCallbackWrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Internals\CefPdfPrintCallbackWrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Internals\CefSharpBrowserWrapper.h">
@@ -76,7 +76,11 @@ namespace CefSharp
{
if (_postData == nullptr)
{
_postData = gcnew CefPostDataWrapper(_wrappedRequest->GetPostData());
auto postData = _wrappedRequest->GetPostData();
if (postData.get())
{
_postData = gcnew CefPostDataWrapper(postData);
}
}
return _postData;
}
+22
View File
@@ -63,6 +63,28 @@ namespace CefSharp.Example
return true;
}
if (string.Equals(fileName, "/PostDataAjaxTest.html", StringComparison.OrdinalIgnoreCase))
{
var postData = request.PostData;
if(postData == null)
{
var resourceHandler = ResourceHandler.FromString("Post Data: null");
stream = (MemoryStream)resourceHandler.Stream;
mimeType = "text/html";
callback.Continue();
}
else
{
var postDataElement = postData.Elements.FirstOrDefault();
var resourceHandler = ResourceHandler.FromString("Post Data: " + (postDataElement == null ? "null" : postDataElement.GetBody()));
stream = (MemoryStream)resourceHandler.Stream;
mimeType = "text/html";
callback.Continue();
}
return true;
}
string resource;
if (ResourceDictionary.TryGetValue(fileName, out resource) && !string.IsNullOrEmpty(resource))
{
+9 -6
View File
@@ -68,15 +68,18 @@ namespace CefSharp.Example
{
using (var postData = request.PostData)
{
var elements = postData.Elements;
if(postData != null)
{
var elements = postData.Elements;
var charSet = request.GetCharSet();
var charSet = request.GetCharSet();
foreach (var element in elements)
{
if (element.Type == PostDataElementType.Bytes)
foreach (var element in elements)
{
var body = element.GetBody(charSet);
if (element.Type == PostDataElementType.Bytes)
{
var body = element.GetBody(charSet);
}
}
}
}
+1 -1
View File
@@ -207,7 +207,7 @@
</p>
<h3>Support for both x86 and x64</h3>
<p>
Chromium 43 supports both x86 and x64, and so do we as of CefSharp 43.0.0 For the time being, it does not
Chromium 45 supports both x86 and x64, and so do we as of CefSharp 45.0.0 For the time being, it does not
"auto-detect" the platform being used (since this is quite complex), so you have to choose either one for
your project. This practically means that you will have to compile &amp; package separate
binaries/installers of your app for x86 and x64 respectively if you want/need to support both of them.
+58 -14
View File
@@ -1,18 +1,62 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Scheme Handler Test</title>
</head>
<body>
<h1>Success</h1>
<p>Scheme Handler Functioned Correctly</p>
<head>
<title>Scheme Handler Test</title>
<form action="custom://cefsharp/PostDataTest.html" method="post" target="_blank">
User:<input type="text" name="user" value="lion" />
<br>
Pass:<input type="text" name="pass" value="123" />
<br>
<input type="submit" value="Test POST Data" />
</form>
</body>
<script type="text/javascript">
var htmlNode;
var newLine = "\n";
var showError = function (text)
{
if (!htmlNode)
{
htmlNode = document.createElement("div");
htmlNode.id = "debugWindow";
document.body.appendChild(htmlNode);
}
htmlNode.innerHTML += "<p>" + text + "</p>";
};
var doRequest = function (data, contentType)
{
var x = new XMLHttpRequest();
x.open("POST", "custom://cefsharp/PostDataAjaxTest.html");
x.setRequestHeader("Accept", "application/json, text/javascript");
x.setRequestHeader("Content-Type", "application/json");
x.onreadystatechange = function (event)
{
if (x.readyState !== 4)
{
return;
}
showError(event.responseText);
};
x.onerror = function (e)
{
showError(e);
};
x.send(data);
};
</script>
</head>
<body>
<h1>Success</h1>
<p>Scheme Handler Functioned Correctly</p>
<form action="custom://cefsharp/PostDataTest.html" method="post" target="_blank">
User:<input type="text" name="user" value="lion" />
<br>
Pass:<input type="text" name="pass" value="123" />
<br>
<input type="submit" value="Test POST Data" />
</form>
<h1>Custom Post using Ajax</h1>
<button onclick="doRequest('name=test&value=anotherValue'); return false;">Submit via ajax</button>
</body>
</html>
+6 -6
View File
@@ -1,6 +1,6 @@
# CefSharp - Embedded Chromium for .NET
This project contains .NET CLR bindings for The [Chromium Embedded Framework (CEF)](https://bitbucket.org/chromiumembedded/cef) by Marshall A. Greenblatt. A small [Core](https://github.com/cefsharp/CefSharp/tree/master/CefSharp.Core) of the bindings are written in C++/CLI but the majority of code here is C#. It can of course be used from any CLR language, e.g. C# or VB.
This project contains .NET CLR bindings for The [Chromium Embedded Framework (CEF)](https://bitbucket.org/chromiumembedded/cef) by Marshall A. Greenblatt. A small [Core](https://github.com/cefsharp/CefSharp/tree/master/CefSharp.Core) of the bindings are written in C++/CLI but the majority of code here is C#. It can of course be used from any CLR language, e.g. C# or VB. [The CefSharp GitHub project page](https://github.com/cefsharp/CefSharp) is the recommended starting place. This is the `official` CefSharp fork, as maintained by the CefSharp community. You can also view [the entire network of public forks/branches](https://github.com/cefsharp/CefSharp/network).
CefSharp provides both WPF and WinForms web browser control implementations. See the [CefSharp.Wpf.Example](https://github.com/cefsharp/CefSharp/tree/master/CefSharp.Wpf.Example) or [CefSharp.WinForms.Example](https://github.com/cefsharp/CefSharp/tree/master/CefSharp.WinForms.Example) projects for example web browsers built using this library; they are (at this moment) the best "documentation" of features. In addition see the [CefSharp.MinimalExample](https://github.com/cefsharp/CefSharp.MinimalExample/) repo for how CefSharp can actually be used via NuGet packages.
@@ -8,7 +8,7 @@ This project is [BSD](http://www.opensource.org/licenses/bsd-license.php "BSD Li
# Documentation, Contact etc.
Apart from code samples mentioned above work-in-progress documentation can be found [in the wiki](https://github.com/cefsharp/CefSharp/wiki). If something is missing/incomplete, please don't hesitate to ask on the [CefSharp Google Group](https://groups.google.com/forum/#!forum/cefsharp). You might also find help by searching the archive to that same Google Group for previous questions.
Apart from code samples mentioned above work-in-progress documentation can be found [in the wiki](https://github.com/cefsharp/CefSharp/wiki). If something is missing/incomplete, please don't hesitate to ask on the [CefSharp Google Group](https://groups.google.com/forum/#!forum/cefsharp). You might also find help by searching the archive to that same Google Group for previous questions. Before opening an issue or submitting a `PR` please read [Contributing.md](https://github.com/cefsharp/CefSharp/blob/master/CONTRIBUTING.md)
# NuGet Packages
@@ -27,16 +27,12 @@ Every commit on `master` produces a `Nuget` package. Use at your own risk! [CefS
[WinForms](http://www.nuget.org/packages/CefSharp.WinForms/) or
[OffScreen](http://www.nuget.org/packages/CefSharp.OffScreen/) now **including** JS Binding.
**Ultra stable/LTS** Read "He's dead Jim", based on Chromium 25. See the [CefSharp1](https://github.com/cefsharp/CefSharp/tree/CefSharp1#binary-release) branch README for CefSharp1 info. Please note that this version is no longer supported.
# Branches & Forks
![](http://img.shields.io/appveyor/ci/cefsharp/cefsharp.svg)
* Development is done in the `master` branch. New features are preferably added in feature branches, if the changes are more than trivial.
* When a new release is imminent a `version` branch is created. We try to avoid making public facing `API` changes in release branches (Adding new features is fine, just not breaking changes).
* Ultra-stable/LTS sources are in `CefSharp1`.
* [The CefSharp GitHub project page](https://github.com/cefsharp/CefSharp) is the recommended starting place. This is the "official" CefSharp fork, as maintained by the CefSharp community. You can also view [the entire network of public forks/branches](https://github.com/cefsharp/CefSharp/network).
### Version Branches
@@ -48,6 +44,10 @@ Every commit on `master` produces a `Nuget` package. Use at your own risk! [CefS
| [cefsharp/39](https://github.com/cefsharp/CefSharp/tree/cefsharp/39) | 2171 | 2012 | 4.0 |
| [cefsharp/37](https://github.com/cefsharp/CefSharp/tree/cefsharp/37) | 2062 | 2012 | 4.0 |
#### CefSharp1
**Ultra stable/LTS** Read "He's dead Jim", based on Chromium 25. See the [CefSharp1](https://github.com/cefsharp/CefSharp/tree/CefSharp1#binary-release) branch README for CefSharp1 info. Please note that this version is no longer developed or supported.
# Links
- [CefGlue](https://bitbucket.org/xilium/xilium.cefglue/): An alternative .NET CEF wrapper built using P/Invoke.
+2 -2
View File
@@ -1,7 +1,7 @@
environment:
VisualStudioVersion: 11.0
VisualStudioVersion: 12.0
version: 43.0.0-CI{build}
version: 45.0.0-CI{build}
shallow_clone: true
+1 -1
View File
@@ -1,7 +1,7 @@
param(
[ValidateSet("vs2013", "vs2015", "nupkg-only")]
[Parameter(Position = 0)]
[string] $Target = "vs2012",
[string] $Target = "vs2013",
[Parameter(Position = 1)]
[string] $Version = "45.0.0",
[Parameter(Position = 2)]