From 43cb86a8235953928a0518d9c9ed4f7136f64e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salvador=20D=C3=ADaz=20Fau?= Date: Fri, 29 Sep 2017 18:42:12 +0200 Subject: [PATCH] Added the possibility to use independent request contexts when creating browsers - Modified MDIBrowser demo to test the child browsers with independent request contexts. --- demos/MDIBrowser/MDIBrowser.dpr | 1 + demos/MDIBrowser/MDIBrowser.dproj.local | 10 +- demos/MDIBrowser/MDIBrowser.dsk | 125 ++++++++++---------- demos/MDIBrowser/MDIBrowser.identcache | Bin 333 -> 441 bytes demos/MDIBrowser/MDIBrowser.stat | 12 +- demos/MDIBrowser/uChildForm.pas | 19 ++- demos/MDIBrowser/uMainForm.dfm | 8 ++ demos/MDIBrowser/uMainForm.pas | 1 + demos/TabbedBrowser/TabBrowser.dsk | 147 +++++++++++------------ demos/TabbedBrowser/TabBrowser.stat | 8 +- source/CEF4Delphi.dsk | 149 ++++++++++++------------ source/CEF4Delphi.stat | 6 +- source/uCEFApplication.pas | 12 +- source/uCEFChromium.pas | 37 ++++-- source/uCEFRequestContext.pas | 24 +++- 15 files changed, 319 insertions(+), 240 deletions(-) diff --git a/demos/MDIBrowser/MDIBrowser.dpr b/demos/MDIBrowser/MDIBrowser.dpr index 19edee8f..25bc276b 100644 --- a/demos/MDIBrowser/MDIBrowser.dpr +++ b/demos/MDIBrowser/MDIBrowser.dpr @@ -46,6 +46,7 @@ uses Forms, Windows, {$ENDIF } uCEFApplication, + uCEFTypes, uMainForm in 'uMainForm.pas' {MainForm}, uChildForm in 'uChildForm.pas' {ChildForm}; diff --git a/demos/MDIBrowser/MDIBrowser.dproj.local b/demos/MDIBrowser/MDIBrowser.dproj.local index 785999d0..14b2383a 100644 --- a/demos/MDIBrowser/MDIBrowser.dproj.local +++ b/demos/MDIBrowser/MDIBrowser.dproj.local @@ -2,10 +2,10 @@ 2017/05/01 10:03:03.000.353,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\about.pas= - 2017/05/01 11:22:18.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIAPP.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj - 2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas - 2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.dfm - 2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas - 2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.dfm + 2017/05/01 11:22:18.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIAPP.dproj + 2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.pas + 2017/05/01 12:25:35.000.397,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\Main.dfm + 2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.dfm + 2017/05/01 12:26:13.000.106,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\ChildWin.pas diff --git a/demos/MDIBrowser/MDIBrowser.dsk b/demos/MDIBrowser/MDIBrowser.dsk index f84400b9..0cdfb141 100644 --- a/demos/MDIBrowser/MDIBrowser.dsk +++ b/demos/MDIBrowser/MDIBrowser.dsk @@ -1,19 +1,19 @@ [Closed Files] -File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFLifeSpanHandler.pas',0,1,218,90,218,0,0,, -File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,2259,73,2287,0,0,, -File_2=TSourceModule,'c:\program files (x86)\embarcadero\studio\19.0\SOURCE\VCL\Vcl.Forms.pas',0,1,3703,39,3731,0,0,{{1747,4} -File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\FastMM4\FastMM4.pas',0,1,10238,1,10260,0,0,, -File_4=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,6306,1,6308,0,0,{{1729,4} -File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,53,20,81,0,0,, -File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MiniBrowser\uMiniBrowser.pas',0,1,1,22,38,0,0,, -File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,626,1,663,0,0,, -File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\SimpleBrowser\uSimpleBrowser.pas',0,1,1,1,1,0,0,, -File_9=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,1,289,21,334,0,0,, +File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRequestContext.pas',0,62,84,71,84,0,0,, +File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,207,34,235,0,0,, +File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFMiscFunctions.pas',0,1,486,3,515,0,0,, +File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,892,81,927,0,0,, +File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser_new\uChildForm.pas',0,1,106,1,147,0,0,, +File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser_new\uMainForm.pas',0,1,55,1,1,0,0,, +File_6=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\FastMM4\FastMM4.pas',0,1,10238,70,10281,0,0,, +File_7=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFLifeSpanHandler.pas',0,1,218,90,218,0,0,, +File_8=TSourceModule,'c:\program files (x86)\embarcadero\studio\19.0\SOURCE\VCL\Vcl.Forms.pas',0,1,3703,39,3731,0,0,{{1747,4} +File_9=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Forms.pas',0,1,6306,1,6308,0,0,{{1729,4} [Modules] Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj -Module1=default.htm -Module2=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas +Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas +Module2=default.htm Module3=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas Count=4 EditWindowCount=1 @@ -21,12 +21,12 @@ EditWindowCount=1 [C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dproj] ModuleType=TBaseProject -[default.htm] -ModuleType=TURLModule - [C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas] ModuleType=TSourceModule +[default.htm] +ModuleType=TURLModule + [C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas] ModuleType=TSourceModule @@ -53,18 +53,18 @@ ClientHeight=9417 DockedToMainForm=1 BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 TopPanelSize=0 -LeftPanelSize=1898 -LeftPanelClients=PropertyInspector,DockSite3 -LeftPanelData=00000800010100000000A219000000000000016A0700000000000001000000005D0E000009000000446F636B53697465330100000000972300001100000050726F7065727479496E73706563746F72FFFFFFFF +LeftPanelSize=0 RightPanelSize=2000 -RightPanelClients=DockSite2,DockSite4 -RightPanelData=00000800010100000000A21900000000000001D00700000000000001000000004312000009000000446F636B536974653201000000009723000009000000446F636B5369746534FFFFFFFF +RightPanelClients=DockSite2 +RightPanelData=00000800010100000000A21900000000000001D00700000000000001000000009723000009000000446F636B5369746532FFFFFFFF BottomPanelSize=0 BottomPanelClients=DockSite1,MessageView BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF BottomMiddlePanelSize=0 BottomMiddlePanelClients=DockSite0,GraphDrawingModel BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF +TabDockLeftClients=PropertyInspector=0,DockSite3=1 +TabDockRightClients=DockSite4=0 [View0] CustomEditViewType=TWelcomePageView @@ -73,9 +73,9 @@ WelcomePageURL=bds:/default.htm [View1] CustomEditViewType=TEditView Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\MDIBrowser.dpr -CursorX=1 -CursorY=43 -TopLine=37 +CursorX=41 +CursorY=59 +TopLine=25 LeftCol=1 Elisions= Bookmarks= @@ -84,9 +84,9 @@ EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\d [View2] CustomEditViewType=TEditView Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uChildForm.pas -CursorX=87 -CursorY=96 -TopLine=87 +CursorX=60 +CursorY=171 +TopLine=128 LeftCol=1 Elisions= Bookmarks= @@ -95,9 +95,9 @@ EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\d [View3] CustomEditViewType=TEditView Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\demos\MDIBrowser\uMainForm.pas -CursorX=3 -CursorY=56 -TopLine=31 +CursorX=48 +CursorY=187 +TopLine=144 LeftCol=1 Elisions= Bookmarks= @@ -168,11 +168,11 @@ State=0 Left=0 Top=0 Width=2000 -Height=4305 +Height=8935 MaxLeft=-1 MaxTop=-1 ClientWidth=2000 -ClientHeight=4305 +ClientHeight=8935 TBDockHeight=5897 LRDockWidth=2352 Dockable=1 @@ -205,12 +205,12 @@ Docked=1 State=0 Left=0 Top=0 -Width=2000 -Height=4383 +Width=1875 +Height=6738 MaxLeft=-1 MaxTop=-1 -ClientWidth=2000 -ClientHeight=4383 +ClientWidth=1875 +ClientHeight=6738 TBDockHeight=7152 LRDockWidth=2000 Dockable=1 @@ -260,8 +260,8 @@ Create=1 Visible=0 Docked=1 State=0 -Left=-121 -Top=-70 +Left=-8 +Top=-30 Width=1844 Height=3139 MaxLeft=-1 @@ -314,17 +314,17 @@ StayOnTop=0 [PropertyInspector] PercentageSizes=1 Create=1 -Visible=1 +Visible=0 Docked=1 State=0 -Left=0 -Top=357 +Left=78 +Top=386 Width=1898 -Height=5415 +Height=7164 MaxLeft=-1 MaxTop=-1 ClientWidth=1898 -ClientHeight=5415 +ClientHeight=7164 TBDockHeight=7164 LRDockWidth=1898 Dockable=1 @@ -375,8 +375,8 @@ Create=1 Visible=0 Docked=1 State=0 -Left=-1152 -Top=247 +Left=-8 +Top=287 Width=273 Height=359 MaxLeft=-1 @@ -432,6 +432,7 @@ Column0Width=145 Column1Width=100 Column2Width=115 Column3Width=250 +Column4Width=250 [LocalVarsWindow] PercentageSizes=1 @@ -627,12 +628,12 @@ Docked=1 State=0 Left=0 Top=0 -Width=1898 -Height=3554 +Width=1773 +Height=6738 MaxLeft=-1 MaxTop=-1 -ClientWidth=1898 -ClientHeight=3554 +ClientWidth=1773 +ClientHeight=6738 TBDockHeight=3677 LRDockWidth=1898 Dockable=1 @@ -738,11 +739,11 @@ State=0 Left=0 Top=18 Width=2000 -Height=4585 +Height=9215 MaxLeft=-1 MaxTop=-1 ClientWidth=2000 -ClientHeight=4585 +ClientHeight=9215 TBDockHeight=7164 LRDockWidth=2000 Dockable=1 @@ -752,21 +753,21 @@ ActiveTabID=ProjectManager TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm [DockSite3] -HostDockSite=DockLeftPanel +HostDockSite=LeftDockTabSet DockSiteType=1 PercentageSizes=1 Create=1 -Visible=1 +Visible=0 Docked=1 State=0 Left=0 -Top=18 +Top=0 Width=1898 -Height=3554 +Height=7164 MaxLeft=-1 MaxTop=-1 -ClientWidth=1898 -ClientHeight=3554 +ClientWidth=1773 +ClientHeight=6738 TBDockHeight=7164 LRDockWidth=1898 Dockable=1 @@ -776,21 +777,21 @@ ActiveTabID=StructureView TabDockClients=StructureView,ClassBrowserTool [DockSite4] -HostDockSite=DockRightPanel +HostDockSite=RightTabDock DockSiteType=1 PercentageSizes=1 Create=1 -Visible=1 +Visible=0 Docked=1 State=0 Left=0 -Top=449 +Top=0 Width=2000 -Height=4383 +Height=7164 MaxLeft=-1 MaxTop=-1 -ClientWidth=2000 -ClientHeight=4383 +ClientWidth=1875 +ClientHeight=6738 TBDockHeight=7164 LRDockWidth=2000 Dockable=1 diff --git a/demos/MDIBrowser/MDIBrowser.identcache b/demos/MDIBrowser/MDIBrowser.identcache index 2966cc53a02f1abad2b2a800838f58d4ae1708b1..846f55776a0044333aabf528d8ab778669a8800b 100644 GIT binary patch delta 56 zcmX@hw3C^Yg@J(~e&RzXwc`BJqU6+=QfF7Upwz nil) then + begin + TempArgs.instance := HINSTANCE; + Result := cef_execute_process(@TempArgs, FApp.Wrap, FWindowsSandboxInfo); + end + else + Result := 0; end; procedure TCefApplication.InitializeSettings(var aSettings : TCefSettings); @@ -719,7 +724,8 @@ begin InitializeSettings(FAppSettings); - Result := (cef_initialize(@HInstance, @FAppSettings, FApp.Wrap, FWindowsSandboxInfo) <> 0) and + Result := (FApp <> nil) and + (cef_initialize(@HInstance, @FAppSettings, FApp.Wrap, FWindowsSandboxInfo) <> 0) and InitializeCookies; except on e : exception do diff --git a/source/uCEFChromium.pas b/source/uCEFChromium.pas index 8a2f341c..7d0451de 100644 --- a/source/uCEFChromium.pas +++ b/source/uCEFChromium.pas @@ -386,8 +386,8 @@ type function CreateClientHandler(aIsOSR : boolean) : boolean; overload; function CreateClientHandler(var aClient : ICefClient) : boolean; overload; procedure CloseBrowser(aForceClose : boolean); - function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : string = '') : boolean; overload; - function CreateBrowser(aParentHandle : HWND; aParentRect : TRect; const aWindowName : string = '') : boolean; overload; + function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : string = ''; const aContext : ICefRequestContext = nil; const aCookiesPath : string = ''; aPersistSessionCookies : boolean = False) : boolean; overload; + function CreateBrowser(aParentHandle : HWND; aParentRect : TRect; const aWindowName : string = ''; const aContext : ICefRequestContext = nil; const aCookiesPath : string = ''; aPersistSessionCookies : boolean = False) : boolean; overload; procedure InitializeDragAndDrop(const aDropTargetCtrl : TWinControl); procedure ShutdownDragAndDrop; @@ -871,10 +871,14 @@ begin FOnCookiesDeleted := nil; end; -function TChromium.CreateBrowser(const aBrowserParent : TWinControl; const aWindowName : string) : boolean; +function TChromium.CreateBrowser(const aBrowserParent : TWinControl; + const aWindowName : string; + const aContext : ICefRequestContext; + const aCookiesPath : string; + aPersistSessionCookies : boolean) : boolean; var TempHandle : HWND; - TempRect : TRect; + TempRect : TRect; begin if (aBrowserParent <> nil) then begin @@ -887,10 +891,17 @@ begin TempRect := rect(0, 0, 0, 0); end; - Result := CreateBrowser(TempHandle, TempRect, aWindowName); + Result := CreateBrowser(TempHandle, TempRect, aWindowName, aContext, aCookiesPath, aPersistSessionCookies); end; -function TChromium.CreateBrowser(aParentHandle : HWND; aParentRect : TRect; const aWindowName : string = '') : boolean; +function TChromium.CreateBrowser(aParentHandle : HWND; + aParentRect : TRect; + const aWindowName : string; + const aContext : ICefRequestContext; + const aCookiesPath : string; + aPersistSessionCookies : boolean) : boolean; +var + TempCookieManager : ICefCookieManager; begin Result := False; @@ -910,11 +921,21 @@ begin WindowInfoAsChild(FWindowInfo, aParentHandle, aParentRect, aWindowName); + if (aContext <> nil) and (length(aCookiesPath) > 0) then + begin + TempCookieManager := aContext.GetDefaultCookieManager(nil); + + if (TempCookieManager = nil) or + not(TempCookieManager.SetStoragePath(aCookiesPath, aPersistSessionCookies, nil)) then + OutputDebugMessage('TChromium.CreateBrowser error : cookies cannot be accessed'); + end; + + if MultithreadApp then - Result := CreateBrowserHost(@FWindowInfo, FDefaultUrl, @FBrowserSettings, nil) + Result := CreateBrowserHost(@FWindowInfo, FDefaultUrl, @FBrowserSettings, aContext) else begin - FBrowser := CreateBrowserHostSync(@FWindowInfo, FDefaultUrl, @FBrowserSettings, nil); + FBrowser := CreateBrowserHostSync(@FWindowInfo, FDefaultUrl, @FBrowserSettings, aContext); if (FBrowser <> nil) then begin diff --git a/source/uCEFRequestContext.pas b/source/uCEFRequestContext.pas index 65f482bb..b8fc0177 100644 --- a/source/uCEFRequestContext.pas +++ b/source/uCEFRequestContext.pas @@ -80,7 +80,8 @@ type public class function UnWrap(data: Pointer): ICefRequestContext; class function Global: ICefRequestContext; - class function New(const settings: PCefRequestContextSettings; const handler: ICefRequestContextHandler): ICefRequestContext; + class function New(const settings: PCefRequestContextSettings; const handler: ICefRequestContextHandler = nil): ICefRequestContext; overload; + class function New(const aCache, aAcceptLanguageList : ustring; aPersistSessionCookies, aPersistUserPreferences, aIgnoreCertificateErrors, aEnableNetSecurityExpiration : boolean; const handler: ICefRequestContextHandler = nil): ICefRequestContext; overload; class function Shared(const other: ICefRequestContext; const handler: ICefRequestContextHandler): ICefRequestContext; end; @@ -146,6 +147,27 @@ begin Result := UnWrap(cef_request_context_create_context(settings, CefGetData(handler))); end; +class function TCefRequestContextRef.New(const aCache : ustring; + const aAcceptLanguageList : ustring; + aPersistSessionCookies : boolean; + aPersistUserPreferences : boolean; + aIgnoreCertificateErrors : boolean; + aEnableNetSecurityExpiration : boolean; + const handler : ICefRequestContextHandler): ICefRequestContext; +var + TempSettings : TCefRequestContextSettings; +begin + TempSettings.size := SizeOf(TCefRequestContextSettings); + TempSettings.cache_path := CefString(aCache); + TempSettings.persist_session_cookies := Ord(aPersistSessionCookies); + TempSettings.persist_user_preferences := Ord(aPersistUserPreferences); + TempSettings.ignore_certificate_errors := Ord(aIgnoreCertificateErrors); + TempSettings.enable_net_security_expiration := Ord(aEnableNetSecurityExpiration); + TempSettings.accept_language_list := CefString(aAcceptLanguageList); + + Result := UnWrap(cef_request_context_create_context(@TempSettings, CefGetData(handler))); +end; + procedure TCefRequestContextRef.PurgePluginListCache(reloadPages: Boolean); begin PCefRequestContext(FData).purge_plugin_list_cache(FData, Ord(reloadPages));