mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 11:42:36 +00:00
Add StartDownload wrapper
This commit is contained in:
@@ -236,6 +236,12 @@ bool CefSharpBrowserWrapper::SendProcessMessage(CefProcessId targetProcess, CefR
|
||||
return _browser->SendProcessMessage(targetProcess, message);
|
||||
}
|
||||
|
||||
void CefSharpBrowserWrapper::StartDownload(String^ url)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
_browser->GetHost()->StartDownload(StringUtils::ToNative(url));
|
||||
}
|
||||
|
||||
void CefSharpBrowserWrapper::ThrowIfDisposed()
|
||||
{
|
||||
if (_disposed)
|
||||
|
||||
@@ -195,6 +195,8 @@ namespace CefSharp
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool SendProcessMessage(CefProcessId targetProcess, CefRefPtr<CefProcessMessage> message);
|
||||
|
||||
virtual void StartDownload(String^ url);
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -154,5 +154,10 @@ namespace CefSharp
|
||||
//virtual bool SendProcessMessage(CefProcessId target_process,
|
||||
// CefRefPtr<CefProcessMessage> message) =0;
|
||||
|
||||
/// <summary>
|
||||
/// Download the file at url specified
|
||||
/// </summary>
|
||||
/// <param name="url">url to download</param>
|
||||
void StartDownload(string url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user