diff --git a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
index f56c4b679..3c923649d 100644
--- a/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
+++ b/CefSharp.BrowserSubprocess.Core/CefSharp.BrowserSubprocess.Core.vcxproj
@@ -1,6 +1,6 @@
-
+
Debug
@@ -194,4 +194,10 @@
+
+
+ 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.BrowserSubprocess.Core/packages.config b/CefSharp.BrowserSubprocess.Core/packages.config
index 337c7a6c1..b7adbc27a 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.Core/CefSharp.Core.vcxproj b/CefSharp.Core/CefSharp.Core.vcxproj
index b8cf17d3a..d39ac6d5e 100644
--- a/CefSharp.Core/CefSharp.Core.vcxproj
+++ b/CefSharp.Core/CefSharp.Core.vcxproj
@@ -1,6 +1,6 @@
-
+
Debug
@@ -281,4 +281,10 @@
+
+
+ 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/Internals/ClientAdapter.cpp b/CefSharp.Core/Internals/ClientAdapter.cpp
index aec1708a2..a425fdb43 100644
--- a/CefSharp.Core/Internals/ClientAdapter.cpp
+++ b/CefSharp.Core/Internals/ClientAdapter.cpp
@@ -250,7 +250,7 @@ namespace CefSharp
return handler->OnBeforeBrowse(_browserControl, wrapper, isRedirect);
}
- bool ClientAdapter::OnCertificateError(cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr callback)
+ bool ClientAdapter::OnCertificateError(CefRefPtr browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr ssl_info, CefRefPtr callback)
{
IRequestHandler^ handler = _browserControl->RequestHandler;
if (handler == nullptr)
@@ -535,8 +535,8 @@ namespace CefSharp
}
bool ClientAdapter::OnFileDialog(CefRefPtr browser, FileDialogMode mode, const CefString& title,
- const CefString& default_file_name, const std::vector& accept_types,
- CefRefPtr callback)
+ const CefString& default_file_path, const std::vector& accept_filters, int selected_accept_filter,
+ CefRefPtr callback)
{
IDialogHandler^ handler = _browserControl->DialogHandler;
@@ -545,14 +545,16 @@ namespace CefSharp
return false;
}
- bool handled;
+ List^ filePaths = nullptr;
- List^ resultString = nullptr;
+ if(handler->OnFileDialog(_browserControl, (CefFileDialogMode)mode, StringUtils::ToClr(title), StringUtils::ToClr(default_file_path), StringUtils::ToClr(accept_filters), selected_accept_filter, filePaths))
+ {
+ callback->Continue(selected_accept_filter, StringUtils::ToNative(filePaths));
- handled = handler->OnFileDialog(_browserControl, (CefFileDialogMode)mode, StringUtils::ToClr(title), StringUtils::ToClr(default_file_name), StringUtils::ToClr(accept_types), resultString);
- callback->Continue(StringUtils::ToNative(resultString));
+ return true;
+ }
- return handled;
+ return false;
}
bool ClientAdapter::OnDragEnter(CefRefPtr browser, CefRefPtr dragData, DragOperationsMask mask)
diff --git a/CefSharp.Core/Internals/ClientAdapter.h b/CefSharp.Core/Internals/ClientAdapter.h
index 25d022180..ae674d154 100644
--- a/CefSharp.Core/Internals/ClientAdapter.h
+++ b/CefSharp.Core/Internals/ClientAdapter.h
@@ -94,7 +94,7 @@ namespace CefSharp
virtual DECL bool GetAuthCredentials(CefRefPtr browser, CefRefPtr frame, bool isProxy,
const CefString& host, int port, const CefString& realm, const CefString& scheme, CefRefPtr callback) OVERRIDE;
virtual DECL bool OnBeforeBrowse(CefRefPtr browser, CefRefPtr frame, CefRefPtr request, bool isRedirect) OVERRIDE;
- virtual DECL bool OnCertificateError(cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr callback) OVERRIDE;
+ virtual DECL bool OnCertificateError(CefRefPtr browser, cef_errorcode_t cert_error, const CefString& request_url, CefRefPtr ssl_info, CefRefPtr callback) OVERRIDE;
virtual DECL bool OnBeforePluginLoad( CefRefPtr< CefBrowser > browser, const CefString& url, const CefString& policy_url, CefRefPtr< CefWebPluginInfo > info ) OVERRIDE;
virtual DECL void OnPluginCrashed(CefRefPtr browser, const CefString& plugin_path) OVERRIDE;
@@ -130,7 +130,7 @@ namespace CefSharp
// CefDialogHandler
virtual DECL bool OnFileDialog(CefRefPtr browser, FileDialogMode mode, const CefString& title,
- const CefString& default_file_name, const std::vector& accept_types,
+ const CefString& default_file_path, const std::vector& accept_filters, int selected_accept_filter,
CefRefPtr callback) OVERRIDE;
//CefDragHandler
diff --git a/CefSharp.Core/packages.config b/CefSharp.Core/packages.config
index 337c7a6c1..b7adbc27a 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/TempFileDialogHandler.cs b/CefSharp.Example/TempFileDialogHandler.cs
index 75581a266..845a8c427 100644
--- a/CefSharp.Example/TempFileDialogHandler.cs
+++ b/CefSharp.Example/TempFileDialogHandler.cs
@@ -1,12 +1,17 @@
-using System.Collections.Generic;
+// 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.
+
+using System.Collections.Generic;
using System.IO;
namespace CefSharp.Example
{
public class TempFileDialogHandler : IDialogHandler
{
- public bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFileName, List acceptTypes, out List result)
+ public bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, out int selectedAcceptFilter, out List result)
{
+ selectedAcceptFilter = 0;
result = new List { Path.GetRandomFileName() };
return true;
}
diff --git a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
index bc4aac74d..f4eb5e105 100644
--- a/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
+++ b/CefSharp.OffScreen.Example/CefSharp.OffScreen.Example.csproj
@@ -90,7 +90,13 @@
-
-
-
-
+
+
+
+ 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.OffScreen.Example/packages.config b/CefSharp.OffScreen.Example/packages.config
index 468defc7a..a2c1aa46e 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.Test/CefSharp.Test.csproj b/CefSharp.Test/CefSharp.Test.csproj
index e274a0ca4..d2091e505 100644
--- a/CefSharp.Test/CefSharp.Test.csproj
+++ b/CefSharp.Test/CefSharp.Test.csproj
@@ -138,7 +138,13 @@
-->
-
-
-
-
+
+
+
+ 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.Test/packages.config b/CefSharp.Test/packages.config
index e4bd01f61..17dbf4367 100644
--- a/CefSharp.Test/packages.config
+++ b/CefSharp.Test/packages.config
@@ -2,8 +2,8 @@
-
-
+
+
\ 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 a0f35419f..c4838c11c 100644
--- a/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
+++ b/CefSharp.WinForms.Example/CefSharp.WinForms.Example.csproj
@@ -164,7 +164,13 @@
-
-
-
-
+
+
+
+ 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.WinForms.Example/packages.config b/CefSharp.WinForms.Example/packages.config
index 468defc7a..a2c1aa46e 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 c58331317..11d0c64e0 100644
--- a/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
+++ b/CefSharp.Wpf.Example/CefSharp.Wpf.Example.csproj
@@ -169,7 +169,13 @@
-
-
-
-
+
+
+
+ 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.Wpf.Example/packages.config b/CefSharp.Wpf.Example/packages.config
index 468defc7a..a2c1aa46e 100644
--- a/CefSharp.Wpf.Example/packages.config
+++ b/CefSharp.Wpf.Example/packages.config
@@ -1,5 +1,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/CefSharp/IDialogHandler.cs b/CefSharp/IDialogHandler.cs
index a8b2d4cc8..fcac7964d 100644
--- a/CefSharp/IDialogHandler.cs
+++ b/CefSharp/IDialogHandler.cs
@@ -26,11 +26,15 @@ namespace CefSharp
/// represents the type of dialog to display
/// the title to be used for the dialog. It may be empty to show the default title ("Open" or "Save"
/// depending on the mode).
- /// the default file name to select in the dialog.
- /// a list of valid lower-cased MIME types or file extensions specified in an input element and
- /// is used to restrict selectable files to such types.
+ /// is the path with optional directory and/or file name component that
+ /// should be initially selected in the dialog.
+ /// are used to restrict the selectable file types and may any combination of
+ /// (a) valid lower-cased MIME types (e.g. "text/*" or "image/*"),
+ /// (b) individual file extensions (e.g. ".txt" or ".png"),
+ /// (c) combined description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
+ /// is the 0-based index of the filter that should be selected by default.
/// the filename(s) the dialog returns
/// To display a custom dialog return true. To display the default dialog return false.
- bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFileName, List acceptTypes, out List result);
+ bool OnFileDialog(IWebBrowser browser, CefFileDialogMode mode, string title, string defaultFilePath, List acceptFilters, out int selectedAcceptFilter, out List result);
}
}