Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ public RequestContext(CefSharp.IRequestContextHandler requestContextHandler) { }
public virtual bool IsGlobal { get { throw null; } }
public virtual bool CanSetPreference(string name) { throw null; }
public virtual void ClearCertificateExceptions(CefSharp.ICompletionCallback callback) { }
public virtual void ClearHttpCache(CefSharp.ICompletionCallback callback) { }
public virtual void ClearHttpAuthCredentials(CefSharp.ICompletionCallback callback) { }
public virtual bool ClearSchemeHandlerFactories() { throw null; }
public virtual void CloseAllConnections(CefSharp.ICompletionCallback callback) { }
Expand Down
1 change: 1 addition & 0 deletions CefSharp.Core.Runtime/Internals/TypeConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ namespace CefSharp
item->IsInProgress = downloadItem->IsInProgress();
item->IsComplete = downloadItem->IsComplete();
item->IsCancelled = downloadItem->IsCanceled();
item->IsPaused = downloadItem->IsPaused();
item->CurrentSpeed = downloadItem->GetCurrentSpeed();
item->PercentComplete = downloadItem->GetPercentComplete();
item->TotalBytes = downloadItem->GetTotalBytes();
Expand Down
9 changes: 9 additions & 0 deletions CefSharp.Core.Runtime/RequestContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ namespace CefSharp
_requestContext->ClearCertificateExceptions(wrapper);
}

void RequestContext::ClearHttpCache(ICompletionCallback^ callback)
{
ThrowIfDisposed();

CefRefPtr<CefCompletionCallback> wrapper = callback == nullptr ? nullptr : new CefCompletionCallbackAdapter(callback);

_requestContext->ClearHttpCache(wrapper);
}

void RequestContext::ClearHttpAuthCredentials(ICompletionCallback^ callback)
{
ThrowIfDisposed();
Expand Down
7 changes: 7 additions & 0 deletions CefSharp.Core.Runtime/RequestContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ namespace CefSharp
/// completion. This param is optional</param>
virtual void ClearCertificateExceptions(ICompletionCallback^ callback);

/// <summary>
/// Clears the HTTP cache.
/// </summary>
/// <param name="callback">If is non-NULL it will be executed on the CEF UI thread after
/// completion. This param is optional</param>
virtual void ClearHttpCache(ICompletionCallback^ callback);

/// <summary>
/// Clears all HTTP authentication credentials that were added as part of handling
/// <see cref="IRequestHandler::GetAuthCredentials"/>.
Expand Down
6 changes: 6 additions & 0 deletions CefSharp.Core/RequestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ public void ClearCertificateExceptions(ICompletionCallback callback)
requestContext.ClearCertificateExceptions(callback);
}

/// <inheritdoc/>
public void ClearHttpCache(ICompletionCallback callback = null)
{
requestContext.ClearHttpCache(callback);
}

/// <inheritdoc/>
public void ClearHttpAuthCredentials(ICompletionCallback callback = null)
{
Expand Down
5 changes: 5 additions & 0 deletions CefSharp/DownloadItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public sealed class DownloadItem
/// </summary>
public bool IsCancelled { get; set; }

/// <summary>
/// Returns true if the download has been paused.
/// </summary>
public bool IsPaused { get; set; }

/// <summary>
/// Returns a simple speed estimate in bytes/s.
/// </summary>
Expand Down
7 changes: 7 additions & 0 deletions CefSharp/IRequestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ public interface IRequestContext : IDisposable
/// completion. This param is optional</param>
void ClearCertificateExceptions(ICompletionCallback callback);

/// <summary>
/// Clears the HTTP cache.
/// </summary>
/// <param name="callback">If is non-NULL it will be executed on the CEF UI thread after
/// completion. This param is optional</param>
void ClearHttpCache(ICompletionCallback callback = null);

/// <summary>
/// Clears all HTTP authentication credentials that were added as part of handling
/// <see cref="IRequestHandler.GetAuthCredentials"/>.
Expand Down