I have an application with DCEF (Chromium Embedded).
During a browser session I want to download a specific page into memory, without displaying it in Chromium (the page to download is an xml file which I want to encrypt before writing it to disk).
The current page in Chromium should remain the same during this download.
Using crm.Browser.MainFrame.LoadUrl and crm.onBeforeDownload like so:
procedure TMainForm.crmBeforeDownload(Sender: TObject;
const browser: ICefBrowser; const downloadItem: ICefDownloadItem;
const suggestedName: ustring; const callback: ICefBeforeDownloadCallback);
begin
callback.Cont(ExtractFilePath(ParamStr(0)) + 'myfile.xml', False);
end;
.. the file is written to disk.
Is there a way to get it in memory?