You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Added TChromiumCore.ClearDataForOrigin procedure
Added a menu option to the MiniBrowser demo to clear all data from the current URL
This commit is contained in:
@@ -380,6 +380,10 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
Caption = 'Clear cache'
|
||||
OnClick = Clearcache1Click
|
||||
end
|
||||
object ClearallstorageforcurrentURL1: TMenuItem
|
||||
Caption = 'Clear all storage for current URL'
|
||||
OnClick = ClearallstorageforcurrentURL1Click
|
||||
end
|
||||
object akescreenshot1: TMenuItem
|
||||
Caption = 'Take screenshot'
|
||||
OnClick = akescreenshot1Click
|
||||
|
||||
@@ -137,6 +137,7 @@ type
|
||||
Clearcache1: TMenuItem;
|
||||
akescreenshot1: TMenuItem;
|
||||
Useragent1: TMenuItem;
|
||||
ClearallstorageforcurrentURL1: TMenuItem;
|
||||
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
@@ -204,6 +205,7 @@ type
|
||||
procedure Clearcache1Click(Sender: TObject);
|
||||
procedure akescreenshot1Click(Sender: TObject);
|
||||
procedure Useragent1Click(Sender: TObject);
|
||||
procedure ClearallstorageforcurrentURL1Click(Sender: TObject);
|
||||
|
||||
protected
|
||||
FScreenshotMsgID : integer;
|
||||
@@ -984,6 +986,11 @@ begin
|
||||
ShowStatusText('Zoom : ' + floattostr(aZoomPct) + '%');
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.ClearallstorageforcurrentURL1Click(Sender: TObject);
|
||||
begin
|
||||
Chromium1.ClearDataForOrigin(URLCbx.Text);
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.Clearcache1Click(Sender: TObject);
|
||||
begin
|
||||
Chromium1.ClearCache;
|
||||
|
||||
Reference in New Issue
Block a user