// Copyright © 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.
namespace CefSharp
{
///
/// Class used to handle file downloads.
/// The methods of this class will called on the CEF UI thread.
///
public interface IDownloadHandler
{
///
/// Called before a download begins.
///
/// the ChromiumWebBrowser control
/// The browser instance
/// Represents the file being downloaded.
/// Callback interface used to asynchronously continue a download.
void OnBeforeDownload(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback);
///
/// Called when a download's status or progress information has been updated. This may be called multiple times before and after .
///
/// the ChromiumWebBrowser control
/// The browser instance
/// Represents the file being downloaded.
/// The callback used to Cancel/Pause/Resume the process
void OnDownloadUpdated(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback);
}
}