mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
add IDownload
This commit is contained in:
@@ -310,6 +310,10 @@
|
||||
RelativePath=".\ICookieVisitor.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IDownload.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\IKeyboardHandler.h"
|
||||
>
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace CefSharp
|
||||
return false;
|
||||
}
|
||||
|
||||
handler = new DownloadAdapter();
|
||||
handler = new DownloadAdapter(nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "include/cef_download_handler.h"
|
||||
#include "IDownload.h"
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
class DownloadAdapter : public CefDownloadHandler
|
||||
{
|
||||
gcroot<IDownload^> _download;
|
||||
|
||||
public:
|
||||
DownloadAdapter(IDownload^ download) : _download(download) { }
|
||||
|
||||
virtual bool ReceivedData(void* data, int data_size);
|
||||
virtual void Complete();
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "stdafx.h"
|
||||
#pragma once
|
||||
|
||||
namespace CefSharp
|
||||
{
|
||||
public interface class IDownload
|
||||
{
|
||||
public:
|
||||
bool ReceivedData(array<Byte>^ data);
|
||||
void Complete();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user