diff --git a/demos/SimpleBrowser/00-DeleteDCUs.bat b/demos/SimpleBrowser/00-DeleteDCUs.bat deleted file mode 100644 index 9cd24f09..00000000 --- a/demos/SimpleBrowser/00-DeleteDCUs.bat +++ /dev/null @@ -1,7 +0,0 @@ -del /s /q *.dcu -del /s /q *.dcp -del /s /q *.bpl -del /s /q *.bpi -del /s /q *.hpp -del /s /q *.exe -del /s /q *.~* diff --git a/demos/SimpleBrowser/LICENSE.txt b/demos/SimpleBrowser/LICENSE.txt deleted file mode 100644 index b69b1429..00000000 --- a/demos/SimpleBrowser/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c) -// 2006-2009 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/demos/SimpleBrowser/SimpleBrowser.dpr b/demos/SimpleBrowser/SimpleBrowser.dpr deleted file mode 100644 index 37965b33..00000000 --- a/demos/SimpleBrowser/SimpleBrowser.dpr +++ /dev/null @@ -1,59 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -program SimpleBrowser; - -uses - Vcl.Forms, - uCEFApplication, - uSimpleBrowser in 'uSimpleBrowser.pas' {Form1}; - -{$R *.res} - -begin - GlobalCEFApp := TCefApplication.Create; - - if GlobalCEFApp.StartMainProcess then - begin - Application.Initialize; - Application.MainFormOnTaskbar := True; - Application.CreateForm(TForm1, Form1); - Application.Run; - end; - - GlobalCEFApp.Free; -end. diff --git a/demos/SimpleBrowser/SimpleBrowser.dproj b/demos/SimpleBrowser/SimpleBrowser.dproj deleted file mode 100644 index d4e75895..00000000 --- a/demos/SimpleBrowser/SimpleBrowser.dproj +++ /dev/null @@ -1,537 +0,0 @@ - - - {55E00327-9D98-4DA3-A4E1-844942A01C6B} - 18.0 - VCL - SimpleBrowser.dpr - True - Debug - Win32 - 1 - Application - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - 3082 - SimpleBrowser - $(BDS)\bin\delphi_PROJECTICON.ico - System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) - .\$(Platform)\$(Config) - false - false - false - false - false - - - DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;Componentes;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;Componentes_Int;CEF4Delphi;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;Componentes_UI;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Componentes_Misc;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;Componentes_RTF;DBXInformixDriver;bindcompvcl;frxDB23;Componentes_vCard;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;frx23;fmxase;$(DCC_UsePackage) - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - true - $(BDS)\bin\default_app.manifest - 1033 - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - - - DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;bindcompvcl;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage) - - - DEBUG;$(DCC_Define) - true - false - true - true - true - - - true - 1033 - true - true - false - - - false - RELEASE;$(DCC_Define) - 0 - 0 - - - true - true - - - - MainSource - - -
Form1
- dfm -
- - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - Application - - - - SimpleBrowser.dpr - - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - - - SimpleBrowser.exe - true - - - - - 1 - - - 1 - - - - - Contents\Resources - 1 - - - - - classes - 1 - - - - - Contents\MacOS - 0 - - - 1 - - - Contents\MacOS - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - 0 - - - 1 - - - Contents\MacOS - 1 - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 1 - - - - - 0 - - - Contents\MacOS - 1 - .framework - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - 0 - - - 1 - - - Contents\MacOS - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-normal - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ../ - 1 - - - ../ - 1 - - - - - res\drawable-hdpi - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - Contents - 1 - - - - - ../ - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\values - 1 - - - - - res\drawable-small - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - - - res\drawable - 1 - - - - - 0 - - - 0 - - - Contents\Resources\StartUp\ - 0 - - - 0 - - - 0 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 0 - .bpl - - - 1 - .dylib - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-ldpi - 1 - - - - - 0 - .dll;.bpl - - - 1 - .dylib - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - - - - - - - - True - False - - - 12 - - - - -
diff --git a/demos/SimpleBrowser/SimpleBrowser.dproj.local b/demos/SimpleBrowser/SimpleBrowser.dproj.local deleted file mode 100644 index 3aa584d9..00000000 --- a/demos/SimpleBrowser/SimpleBrowser.dproj.local +++ /dev/null @@ -1,9 +0,0 @@ - - - - 2017/01/22 14:37:05.000.577,=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2017/01/22 14:41:11.000.096,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm - 2017/01/22 14:41:11.000.096,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2017/01/22 14:41:18.000.226,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\SimpleBrowser.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj - - diff --git a/demos/SimpleBrowser/SimpleBrowser.dsk b/demos/SimpleBrowser/SimpleBrowser.dsk deleted file mode 100644 index fe0b1692..00000000 --- a/demos/SimpleBrowser/SimpleBrowser.dsk +++ /dev/null @@ -1,770 +0,0 @@ -[Closed Files] -File_0=TSourceModule,'c:\program files\embarcadero\studio\17.0\CEF4Delphi\uCEFApplication.pas',0,1,180,17,208,0,0,, -File_1=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uEmailPanel.pas',0,1,4416,52,4438,0,0,,{1 -File_2=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uFeedPanel.pas',0,1,136,19,136,0,0,, -File_3=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Buttons.pas',0,1,24,35,48,0,0,, -File_4=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Controls.pas',0,1,2577,1,2601,0,0,, -File_5=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\cache\uEmailDBThread.pas',0,1,1800,89,1820,0,0,, -File_6=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\misc\uCEFConfigDlg.pas',0,1,79,43,97,0,0,, -File_7=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\cache\uBookmarksDBThread.pas',0,1,257,72,283,0,0,, -File_8=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\internet\uEMAILThread.pas',0,1,25,64,36,0,0,, -File_9=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uMessageEnumerator.pas',0,1,247,56,279,0,0,, - -[Modules] -Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\SimpleBrowser.dproj -Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.pas -Module2=default.htm -Count=3 -EditWindowCount=1 - -[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\SimpleBrowser.dproj] -ModuleType=TBaseProject - -[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.pas] -ModuleType=TSourceModule -FormState=1 -FormOnTop=0 - -[default.htm] -ModuleType=TURLModule - -[EditWindow0] -ViewCount=3 -CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\SimpleBrowser.dpr -View0=0 -View1=1 -View2=2 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=10000 -Height=9428 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=10000 -ClientHeight=9428 -DockedToMainForm=1 -BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 -TopPanelSize=0 -LeftPanelSize=2172 -LeftPanelClients=PropertyInspector,DockSite3 -LeftPanelData=00000800010100000000AA19000000000000017C080000000000000100000000CC07000009000000446F636B53697465330100000000A12300001100000050726F7065727479496E73706563746F72FFFFFFFF -RightPanelSize=2000 -RightPanelClients=DockSite2,DockSite4 -RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF -BottomPanelSize=0 -BottomPanelClients=DockSite1,MessageView -BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF -BottomMiddlePanelSize=0 -BottomMiddlePanelClients=DockSite0,GraphDrawingModel -BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF - -[View0] -CustomEditViewType=TWelcomePageView -WelcomePageURL=bds:/default.htm - -[View1] -CustomEditViewType=TEditView -Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.pas -CursorX=1 -CursorY=38 -TopLine=1 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.pas - -[View2] -CustomEditViewType=TEditView -Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\SimpleBrowser.dpr -CursorX=1 -CursorY=38 -TopLine=1 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\SimpleBrowser.dpr - -[Watches] -Count=0 - -[WatchWindow] -WatchColumnWidth=120 -WatchShowColumnHeaders=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=13602 -Dockable=1 -StayOnTop=0 - -[Breakpoints] -Count=0 - -[EmbarcaderoWin32Debugger_AddressBreakpoints] -Count=0 - -[EmbarcaderoWin64Debugger_AddressBreakpoints] -Count=0 - -[Main Window] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=0 -State=2 -Left=148 -Top=269 -Width=8930 -Height=8520 -MaxLeft=-8 -MaxTop=-11 -MaxWidth=8930 -MaxHeight=8520 -ClientWidth=10000 -ClientHeight=9753 -BottomPanelSize=9121 -BottomPanelClients=EditWindow0 -BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF - -[ProjectManager] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4226 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4226 -TBDockHeight=5897 -LRDockWidth=2352 -Dockable=1 -StayOnTop=0 - -[MessageView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2773 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2773 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=2773 -Dockable=1 -StayOnTop=0 - -[ToolForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7152 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 - -[ClipboardHistory] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1906 -Height=4989 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1781 -ClientHeight=4563 -TBDockHeight=4989 -LRDockWidth=1906 -Dockable=1 -StayOnTop=0 - -[ProjectStatistics] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=2062 -Height=5740 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1938 -ClientHeight=5314 -TBDockHeight=5740 -LRDockWidth=2062 -Dockable=1 -StayOnTop=0 - -[ClassBrowserTool] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-148 -Top=-137 -Width=1844 -Height=3139 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1844 -ClientHeight=3139 -TBDockHeight=3139 -LRDockWidth=1844 -Dockable=1 -StayOnTop=0 - -[MetricsView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[QAView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[PropertyInspector] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=207 -Width=2172 -Height=7108 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=7108 -TBDockHeight=7164 -LRDockWidth=2172 -Dockable=1 -StayOnTop=0 -SplitPos=142 - -[PropInspDesignerSelection] -ArrangeBy=Name -SelectedItem=Name, -ExpandedItems="LiveBindings Designer=0",LiveBindings=0 - -[frmDesignPreview] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=5964 -LRDockWidth=2508 -Dockable=1 -StayOnTop=0 - -[TFileExplorerForm] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-898 -Top=-137 -Width=2844 -Height=6200 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2844 -ClientHeight=6200 -TBDockHeight=6200 -LRDockWidth=2844 -Dockable=1 -StayOnTop=0 - -[TemplateView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-1026 -Top=-137 -Width=273 -Height=359 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=273 -ClientHeight=359 -TBDockHeight=359 -LRDockWidth=273 -Dockable=1 -StayOnTop=0 -Name=120 -Description=334 -filter=1 - -[DebugLogView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=415 -LRDockWidth=4953 -Dockable=1 -StayOnTop=0 - -[ThreadStatusWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=7406 -Dockable=1 -StayOnTop=0 -Column0Width=145 -Column1Width=100 -Column2Width=115 -Column3Width=250 - -[LocalVarsWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1536 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[CallStackWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=2063 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[FindReferencsForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=2321 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[RefactoringForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=3206 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[ToDo List] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=1155 -LRDockWidth=3680 -Dockable=1 -StayOnTop=0 -Column0Width=314 -Column1Width=30 -Column2Width=150 -Column3Width=172 -Column4Width=129 -SortOrder=4 -ShowHints=1 -ShowChecked=1 - -[DataExplorerContainer] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=7148 -Dockable=1 -StayOnTop=0 - -[GraphDrawingModel] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2859 -Height=3206 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2859 -ClientHeight=3206 -TBDockHeight=3206 -LRDockWidth=2859 -Dockable=1 -StayOnTop=0 - -[BreakpointWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1547 -LRDockWidth=8742 -Dockable=1 -StayOnTop=0 -Column0Width=200 -Column1Width=75 -Column2Width=200 -Column3Width=200 -Column4Width=200 -Column5Width=75 -Column6Width=75 - -[StructureView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2172 -Height=1760 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=1760 -TBDockHeight=3677 -LRDockWidth=1898 -Dockable=1 -StayOnTop=0 - -[ModelViewTool] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=5305 -Dockable=1 -StayOnTop=0 - -[BorlandEditorCodeExplorer@EditWindow0] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1828 -Height=6177 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1703 -ClientHeight=5751 -TBDockHeight=6177 -LRDockWidth=1828 -Dockable=1 -StayOnTop=0 - -[DockHosts] -DockHostCount=5 - -[DockSite0] -HostDockSite=DockBottomCenterPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1480 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1480 -TBDockHeight=1480 -LRDockWidth=2336 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=RefactoringForm -TabDockClients=RefactoringForm,FindReferencsForm,ToDo List,MetricsView,QAView - -[DockSite1] -HostDockSite=DockBottomPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=3820 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=DebugLogView -TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow - -[DockSite2] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2000 -Height=4529 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4529 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ProjectManager -TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm - -[DockSite3] -HostDockSite=DockLeftPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2172 -Height=1760 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=1760 -TBDockHeight=7164 -LRDockWidth=2172 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=StructureView -TabDockClients=StructureView,ClassBrowserTool - -[DockSite4] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=454 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ToolForm -TabDockClients=ToolForm,TemplateView - diff --git a/demos/SimpleBrowser/SimpleBrowser.identcache b/demos/SimpleBrowser/SimpleBrowser.identcache deleted file mode 100644 index 899be8c4..00000000 Binary files a/demos/SimpleBrowser/SimpleBrowser.identcache and /dev/null differ diff --git a/demos/SimpleBrowser/SimpleBrowser.res b/demos/SimpleBrowser/SimpleBrowser.res deleted file mode 100644 index 20ba5530..00000000 Binary files a/demos/SimpleBrowser/SimpleBrowser.res and /dev/null differ diff --git a/demos/SimpleBrowser/SimpleBrowser.stat b/demos/SimpleBrowser/SimpleBrowser.stat deleted file mode 100644 index a08def4e..00000000 --- a/demos/SimpleBrowser/SimpleBrowser.stat +++ /dev/null @@ -1,10 +0,0 @@ -[Stats] -EditorSecs=218 -DesignerSecs=239 -InspectorSecs=136 -CompileSecs=17812 -OtherSecs=129 -StartTime=22/01/2017 14:51:01 -RealKeys=0 -EffectiveKeys=0 -DebugSecs=79 diff --git a/demos/SimpleBrowser/cef.pak b/demos/SimpleBrowser/cef.pak deleted file mode 100644 index 78534bb2..00000000 Binary files a/demos/SimpleBrowser/cef.pak and /dev/null differ diff --git a/demos/SimpleBrowser/cef_100_percent.pak b/demos/SimpleBrowser/cef_100_percent.pak deleted file mode 100644 index 62c1fc60..00000000 Binary files a/demos/SimpleBrowser/cef_100_percent.pak and /dev/null differ diff --git a/demos/SimpleBrowser/cef_200_percent.pak b/demos/SimpleBrowser/cef_200_percent.pak deleted file mode 100644 index 662f0566..00000000 Binary files a/demos/SimpleBrowser/cef_200_percent.pak and /dev/null differ diff --git a/demos/SimpleBrowser/cef_extensions.pak b/demos/SimpleBrowser/cef_extensions.pak deleted file mode 100644 index d7c9c809..00000000 Binary files a/demos/SimpleBrowser/cef_extensions.pak and /dev/null differ diff --git a/demos/SimpleBrowser/chrome_elf.dll b/demos/SimpleBrowser/chrome_elf.dll deleted file mode 100644 index 8e43fb01..00000000 Binary files a/demos/SimpleBrowser/chrome_elf.dll and /dev/null differ diff --git a/demos/SimpleBrowser/d3dcompiler_43.dll b/demos/SimpleBrowser/d3dcompiler_43.dll deleted file mode 100644 index ab961619..00000000 Binary files a/demos/SimpleBrowser/d3dcompiler_43.dll and /dev/null differ diff --git a/demos/SimpleBrowser/d3dcompiler_47.dll b/demos/SimpleBrowser/d3dcompiler_47.dll deleted file mode 100644 index e636cb49..00000000 Binary files a/demos/SimpleBrowser/d3dcompiler_47.dll and /dev/null differ diff --git a/demos/SimpleBrowser/devtools_resources.pak b/demos/SimpleBrowser/devtools_resources.pak deleted file mode 100644 index 07e6d5a2..00000000 Binary files a/demos/SimpleBrowser/devtools_resources.pak and /dev/null differ diff --git a/demos/SimpleBrowser/icudtl.dat b/demos/SimpleBrowser/icudtl.dat deleted file mode 100644 index a313d4e6..00000000 Binary files a/demos/SimpleBrowser/icudtl.dat and /dev/null differ diff --git a/demos/SimpleBrowser/libEGL.dll b/demos/SimpleBrowser/libEGL.dll deleted file mode 100644 index 101547b1..00000000 Binary files a/demos/SimpleBrowser/libEGL.dll and /dev/null differ diff --git a/demos/SimpleBrowser/libGLESv2.dll b/demos/SimpleBrowser/libGLESv2.dll deleted file mode 100644 index 9121b600..00000000 Binary files a/demos/SimpleBrowser/libGLESv2.dll and /dev/null differ diff --git a/demos/SimpleBrowser/libcef.dll b/demos/SimpleBrowser/libcef.dll deleted file mode 100644 index 2989490f..00000000 Binary files a/demos/SimpleBrowser/libcef.dll and /dev/null differ diff --git a/demos/SimpleBrowser/locales/am.pak b/demos/SimpleBrowser/locales/am.pak deleted file mode 100644 index c1dbe254..00000000 Binary files a/demos/SimpleBrowser/locales/am.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ar.pak b/demos/SimpleBrowser/locales/ar.pak deleted file mode 100644 index e59654b4..00000000 Binary files a/demos/SimpleBrowser/locales/ar.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/bg.pak b/demos/SimpleBrowser/locales/bg.pak deleted file mode 100644 index ae20b103..00000000 Binary files a/demos/SimpleBrowser/locales/bg.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/bn.pak b/demos/SimpleBrowser/locales/bn.pak deleted file mode 100644 index b3a38bf9..00000000 Binary files a/demos/SimpleBrowser/locales/bn.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ca.pak b/demos/SimpleBrowser/locales/ca.pak deleted file mode 100644 index c2052236..00000000 Binary files a/demos/SimpleBrowser/locales/ca.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/cs.pak b/demos/SimpleBrowser/locales/cs.pak deleted file mode 100644 index 6514f89c..00000000 Binary files a/demos/SimpleBrowser/locales/cs.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/da.pak b/demos/SimpleBrowser/locales/da.pak deleted file mode 100644 index 46976264..00000000 Binary files a/demos/SimpleBrowser/locales/da.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/de.pak b/demos/SimpleBrowser/locales/de.pak deleted file mode 100644 index 33e933b0..00000000 Binary files a/demos/SimpleBrowser/locales/de.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/el.pak b/demos/SimpleBrowser/locales/el.pak deleted file mode 100644 index 46e7740e..00000000 Binary files a/demos/SimpleBrowser/locales/el.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/en-GB.pak b/demos/SimpleBrowser/locales/en-GB.pak deleted file mode 100644 index 24fd7c67..00000000 Binary files a/demos/SimpleBrowser/locales/en-GB.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/en-US.pak b/demos/SimpleBrowser/locales/en-US.pak deleted file mode 100644 index 15b520b6..00000000 Binary files a/demos/SimpleBrowser/locales/en-US.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/es-419.pak b/demos/SimpleBrowser/locales/es-419.pak deleted file mode 100644 index d5f77675..00000000 Binary files a/demos/SimpleBrowser/locales/es-419.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/es.pak b/demos/SimpleBrowser/locales/es.pak deleted file mode 100644 index be2a26a5..00000000 Binary files a/demos/SimpleBrowser/locales/es.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/et.pak b/demos/SimpleBrowser/locales/et.pak deleted file mode 100644 index e2f87a6d..00000000 Binary files a/demos/SimpleBrowser/locales/et.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/fa.pak b/demos/SimpleBrowser/locales/fa.pak deleted file mode 100644 index 69a4421e..00000000 Binary files a/demos/SimpleBrowser/locales/fa.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/fi.pak b/demos/SimpleBrowser/locales/fi.pak deleted file mode 100644 index 9be5dc6a..00000000 Binary files a/demos/SimpleBrowser/locales/fi.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/fil.pak b/demos/SimpleBrowser/locales/fil.pak deleted file mode 100644 index db321117..00000000 Binary files a/demos/SimpleBrowser/locales/fil.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/fr.pak b/demos/SimpleBrowser/locales/fr.pak deleted file mode 100644 index 9280bba3..00000000 Binary files a/demos/SimpleBrowser/locales/fr.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/gu.pak b/demos/SimpleBrowser/locales/gu.pak deleted file mode 100644 index fca95383..00000000 Binary files a/demos/SimpleBrowser/locales/gu.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/he.pak b/demos/SimpleBrowser/locales/he.pak deleted file mode 100644 index 8e85e343..00000000 Binary files a/demos/SimpleBrowser/locales/he.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/hi.pak b/demos/SimpleBrowser/locales/hi.pak deleted file mode 100644 index dc2b26c0..00000000 Binary files a/demos/SimpleBrowser/locales/hi.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/hr.pak b/demos/SimpleBrowser/locales/hr.pak deleted file mode 100644 index 3198d34a..00000000 Binary files a/demos/SimpleBrowser/locales/hr.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/hu.pak b/demos/SimpleBrowser/locales/hu.pak deleted file mode 100644 index ca5ef79f..00000000 Binary files a/demos/SimpleBrowser/locales/hu.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/id.pak b/demos/SimpleBrowser/locales/id.pak deleted file mode 100644 index 5bbc5af8..00000000 Binary files a/demos/SimpleBrowser/locales/id.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/it.pak b/demos/SimpleBrowser/locales/it.pak deleted file mode 100644 index c80f10d0..00000000 Binary files a/demos/SimpleBrowser/locales/it.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ja.pak b/demos/SimpleBrowser/locales/ja.pak deleted file mode 100644 index 3bff80b9..00000000 Binary files a/demos/SimpleBrowser/locales/ja.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/kn.pak b/demos/SimpleBrowser/locales/kn.pak deleted file mode 100644 index 08f17c96..00000000 Binary files a/demos/SimpleBrowser/locales/kn.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ko.pak b/demos/SimpleBrowser/locales/ko.pak deleted file mode 100644 index b6a18851..00000000 Binary files a/demos/SimpleBrowser/locales/ko.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/lt.pak b/demos/SimpleBrowser/locales/lt.pak deleted file mode 100644 index e4df025b..00000000 Binary files a/demos/SimpleBrowser/locales/lt.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/lv.pak b/demos/SimpleBrowser/locales/lv.pak deleted file mode 100644 index ba07599e..00000000 Binary files a/demos/SimpleBrowser/locales/lv.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ml.pak b/demos/SimpleBrowser/locales/ml.pak deleted file mode 100644 index d8cb4044..00000000 Binary files a/demos/SimpleBrowser/locales/ml.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/mr.pak b/demos/SimpleBrowser/locales/mr.pak deleted file mode 100644 index b1ae9aa5..00000000 Binary files a/demos/SimpleBrowser/locales/mr.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ms.pak b/demos/SimpleBrowser/locales/ms.pak deleted file mode 100644 index 4ffbd98d..00000000 Binary files a/demos/SimpleBrowser/locales/ms.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/nb.pak b/demos/SimpleBrowser/locales/nb.pak deleted file mode 100644 index 65b2b24b..00000000 Binary files a/demos/SimpleBrowser/locales/nb.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/nl.pak b/demos/SimpleBrowser/locales/nl.pak deleted file mode 100644 index f4030851..00000000 Binary files a/demos/SimpleBrowser/locales/nl.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/pl.pak b/demos/SimpleBrowser/locales/pl.pak deleted file mode 100644 index 8325ebe2..00000000 Binary files a/demos/SimpleBrowser/locales/pl.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/pt-BR.pak b/demos/SimpleBrowser/locales/pt-BR.pak deleted file mode 100644 index aa895c02..00000000 Binary files a/demos/SimpleBrowser/locales/pt-BR.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/pt-PT.pak b/demos/SimpleBrowser/locales/pt-PT.pak deleted file mode 100644 index 5cfb037e..00000000 Binary files a/demos/SimpleBrowser/locales/pt-PT.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ro.pak b/demos/SimpleBrowser/locales/ro.pak deleted file mode 100644 index c70333cd..00000000 Binary files a/demos/SimpleBrowser/locales/ro.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ru.pak b/demos/SimpleBrowser/locales/ru.pak deleted file mode 100644 index cdae5a85..00000000 Binary files a/demos/SimpleBrowser/locales/ru.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/sk.pak b/demos/SimpleBrowser/locales/sk.pak deleted file mode 100644 index 94c35418..00000000 Binary files a/demos/SimpleBrowser/locales/sk.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/sl.pak b/demos/SimpleBrowser/locales/sl.pak deleted file mode 100644 index 9e63309f..00000000 Binary files a/demos/SimpleBrowser/locales/sl.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/sr.pak b/demos/SimpleBrowser/locales/sr.pak deleted file mode 100644 index 64a2aa5a..00000000 Binary files a/demos/SimpleBrowser/locales/sr.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/sv.pak b/demos/SimpleBrowser/locales/sv.pak deleted file mode 100644 index 8e6300d1..00000000 Binary files a/demos/SimpleBrowser/locales/sv.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/sw.pak b/demos/SimpleBrowser/locales/sw.pak deleted file mode 100644 index 364886b9..00000000 Binary files a/demos/SimpleBrowser/locales/sw.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/ta.pak b/demos/SimpleBrowser/locales/ta.pak deleted file mode 100644 index ad08258d..00000000 Binary files a/demos/SimpleBrowser/locales/ta.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/te.pak b/demos/SimpleBrowser/locales/te.pak deleted file mode 100644 index 8bb4258e..00000000 Binary files a/demos/SimpleBrowser/locales/te.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/th.pak b/demos/SimpleBrowser/locales/th.pak deleted file mode 100644 index 120b7cfa..00000000 Binary files a/demos/SimpleBrowser/locales/th.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/tr.pak b/demos/SimpleBrowser/locales/tr.pak deleted file mode 100644 index 207205e1..00000000 Binary files a/demos/SimpleBrowser/locales/tr.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/uk.pak b/demos/SimpleBrowser/locales/uk.pak deleted file mode 100644 index 6b71acf0..00000000 Binary files a/demos/SimpleBrowser/locales/uk.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/vi.pak b/demos/SimpleBrowser/locales/vi.pak deleted file mode 100644 index b291df72..00000000 Binary files a/demos/SimpleBrowser/locales/vi.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/zh-CN.pak b/demos/SimpleBrowser/locales/zh-CN.pak deleted file mode 100644 index 5dfe7411..00000000 Binary files a/demos/SimpleBrowser/locales/zh-CN.pak and /dev/null differ diff --git a/demos/SimpleBrowser/locales/zh-TW.pak b/demos/SimpleBrowser/locales/zh-TW.pak deleted file mode 100644 index 1a2740e8..00000000 Binary files a/demos/SimpleBrowser/locales/zh-TW.pak and /dev/null differ diff --git a/demos/SimpleBrowser/natives_blob.bin b/demos/SimpleBrowser/natives_blob.bin deleted file mode 100644 index db046c5c..00000000 --- a/demos/SimpleBrowser/natives_blob.bin +++ /dev/null @@ -1,15148 +0,0 @@ - mirrors -(function(a,b){ -"use strict"; -var c=a.Array; -var d=a.isNaN; -var e=a.JSON.stringify; -var f; -var g; -var h=b.ImportNow("promise_state_symbol"); -var i=b.ImportNow("promise_result_symbol"); -var j; -var k; -b.Import(function(l){ -f=l.MapEntries; -g=l.MapIteratorNext; -j=l.SetIteratorNext; -k=l.SetValues; -}); -var m={ -UNDEFINED_TYPE:'undefined', -NULL_TYPE:'null', -BOOLEAN_TYPE:'boolean', -NUMBER_TYPE:'number', -STRING_TYPE:'string', -SYMBOL_TYPE:'symbol', -OBJECT_TYPE:'object', -FUNCTION_TYPE:'function', -REGEXP_TYPE:'regexp', -ERROR_TYPE:'error', -PROPERTY_TYPE:'property', -INTERNAL_PROPERTY_TYPE:'internalProperty', -FRAME_TYPE:'frame', -SCRIPT_TYPE:'script', -CONTEXT_TYPE:'context', -SCOPE_TYPE:'scope', -PROMISE_TYPE:'promise', -MAP_TYPE:'map', -SET_TYPE:'set', -ITERATOR_TYPE:'iterator', -GENERATOR_TYPE:'generator', -} -var n=0; -var o=-1; -var p=[]; -var q=true; -function MirrorCacheIsEmpty(){ -return n==0&&p.length==0; -} -function ToggleMirrorCache(r){ -q=r; -ClearMirrorCache(); -} -function ClearMirrorCache(r){ -n=0; -p=[]; -} -function ObjectIsPromise(r){ -return(%_IsJSReceiver(r))&& -!(%DebugGetProperty(r,h)===(void 0)); -} -function MakeMirror(r,s){ -var t; -if(!s&&q){ -for(var u in p){ -t=p[u]; -if(t.value()===r){ -return t; -} -if(t.isNumber()&&d(t.value())&& -typeof r=='number'&&d(r)){ -return t; -} -} -} -if((r===(void 0))){ -t=new UndefinedMirror(); -}else if((r===null)){ -t=new NullMirror(); -}else if((typeof(r)==='boolean')){ -t=new BooleanMirror(r); -}else if((typeof(r)==='number')){ -t=new NumberMirror(r); -}else if((typeof(r)==='string')){ -t=new StringMirror(r); -}else if((typeof(r)==='symbol')){ -t=new SymbolMirror(r); -}else if((%_IsArray(r))){ -t=new ArrayMirror(r); -}else if((%IsDate(r))){ -t=new DateMirror(r); -}else if((%IsFunction(r))){ -t=new FunctionMirror(r); -}else if((%_IsRegExp(r))){ -t=new RegExpMirror(r); -}else if((%_ClassOf(r)==='Error')){ -t=new ErrorMirror(r); -}else if((%_ClassOf(r)==='Script')){ -t=new ScriptMirror(r); -}else if((%_ClassOf(r)==='Map')||(%_ClassOf(r)==='WeakMap')){ -t=new MapMirror(r); -}else if((%_ClassOf(r)==='Set')||(%_ClassOf(r)==='WeakSet')){ -t=new SetMirror(r); -}else if((%_ClassOf(r)==='Map Iterator')||(%_ClassOf(r)==='Set Iterator')){ -t=new IteratorMirror(r); -}else if(ObjectIsPromise(r)){ -t=new PromiseMirror(r); -}else if((%_ClassOf(r)==='Generator')){ -t=new GeneratorMirror(r); -}else{ -t=new ObjectMirror(r,m.OBJECT_TYPE,s); -} -if(q)p[t.handle()]=t; -return t; -} -function LookupMirror(v){ -if(!q){ -throw %make_error(2,"Mirror cache is disabled"); -} -return p[v]; -} -function GetUndefinedMirror(){ -return MakeMirror((void 0)); -} -function inherits(w,x){ -var y=function(){}; -y.prototype=x.prototype; -w.super_=x.prototype; -w.prototype=new y(); -w.prototype.constructor=w; -} -var z=80; -var A={}; -A.Data=0; -A.DataConstant=2; -A.AccessorConstant=3; -var B={}; -B.None=0; -B.ReadOnly=1; -B.DontEnum=2; -B.DontDelete=4; -var C={Global:0, -Local:1, -With:2, -Closure:3, -Catch:4, -Block:5, -Script:6, -Eval:7, -}; -function Mirror(D){ -this.type_=D; -} -Mirror.prototype.type=function(){ -return this.type_; -}; -Mirror.prototype.isValue=function(){ -return this instanceof ValueMirror; -}; -Mirror.prototype.isUndefined=function(){ -return this instanceof UndefinedMirror; -}; -Mirror.prototype.isNull=function(){ -return this instanceof NullMirror; -}; -Mirror.prototype.isBoolean=function(){ -return this instanceof BooleanMirror; -}; -Mirror.prototype.isNumber=function(){ -return this instanceof NumberMirror; -}; -Mirror.prototype.isString=function(){ -return this instanceof StringMirror; -}; -Mirror.prototype.isSymbol=function(){ -return this instanceof SymbolMirror; -}; -Mirror.prototype.isObject=function(){ -return this instanceof ObjectMirror; -}; -Mirror.prototype.isFunction=function(){ -return this instanceof FunctionMirror; -}; -Mirror.prototype.isUnresolvedFunction=function(){ -return this instanceof UnresolvedFunctionMirror; -}; -Mirror.prototype.isArray=function(){ -return this instanceof ArrayMirror; -}; -Mirror.prototype.isDate=function(){ -return this instanceof DateMirror; -}; -Mirror.prototype.isRegExp=function(){ -return this instanceof RegExpMirror; -}; -Mirror.prototype.isError=function(){ -return this instanceof ErrorMirror; -}; -Mirror.prototype.isPromise=function(){ -return this instanceof PromiseMirror; -}; -Mirror.prototype.isGenerator=function(){ -return this instanceof GeneratorMirror; -}; -Mirror.prototype.isProperty=function(){ -return this instanceof PropertyMirror; -}; -Mirror.prototype.isInternalProperty=function(){ -return this instanceof InternalPropertyMirror; -}; -Mirror.prototype.isFrame=function(){ -return this instanceof FrameMirror; -}; -Mirror.prototype.isScript=function(){ -return this instanceof ScriptMirror; -}; -Mirror.prototype.isContext=function(){ -return this instanceof ContextMirror; -}; -Mirror.prototype.isScope=function(){ -return this instanceof ScopeMirror; -}; -Mirror.prototype.isMap=function(){ -return this instanceof MapMirror; -}; -Mirror.prototype.isSet=function(){ -return this instanceof SetMirror; -}; -Mirror.prototype.isIterator=function(){ -return this instanceof IteratorMirror; -}; -Mirror.prototype.allocateHandle_=function(){ -if(q)this.handle_=n++; -}; -Mirror.prototype.allocateTransientHandle_=function(){ -this.handle_=o--; -}; -Mirror.prototype.toText=function(){ -return"#<"+this.constructor.name+">"; -}; -function ValueMirror(D,r,E){ -%_Call(Mirror,this,D); -this.value_=r; -if(!E){ -this.allocateHandle_(); -}else{ -this.allocateTransientHandle_(); -} -} -inherits(ValueMirror,Mirror); -Mirror.prototype.handle=function(){ -return this.handle_; -}; -ValueMirror.prototype.isPrimitive=function(){ -var D=this.type(); -return D==='undefined'|| -D==='null'|| -D==='boolean'|| -D==='number'|| -D==='string'|| -D==='symbol'; -}; -ValueMirror.prototype.value=function(){ -return this.value_; -}; -function UndefinedMirror(){ -%_Call(ValueMirror,this,m.UNDEFINED_TYPE,(void 0)); -} -inherits(UndefinedMirror,ValueMirror); -UndefinedMirror.prototype.toText=function(){ -return'undefined'; -}; -function NullMirror(){ -%_Call(ValueMirror,this,m.NULL_TYPE,null); -} -inherits(NullMirror,ValueMirror); -NullMirror.prototype.toText=function(){ -return'null'; -}; -function BooleanMirror(r){ -%_Call(ValueMirror,this,m.BOOLEAN_TYPE,r); -} -inherits(BooleanMirror,ValueMirror); -BooleanMirror.prototype.toText=function(){ -return this.value_?'true':'false'; -}; -function NumberMirror(r){ -%_Call(ValueMirror,this,m.NUMBER_TYPE,r); -} -inherits(NumberMirror,ValueMirror); -NumberMirror.prototype.toText=function(){ -return %_NumberToString(this.value_); -}; -function StringMirror(r){ -%_Call(ValueMirror,this,m.STRING_TYPE,r); -} -inherits(StringMirror,ValueMirror); -StringMirror.prototype.length=function(){ -return this.value_.length; -}; -StringMirror.prototype.getTruncatedValue=function(F){ -if(F!=-1&&this.length()>F){ -return this.value_.substring(0,F)+ -'... (length: '+this.length()+')'; -} -return this.value_; -}; -StringMirror.prototype.toText=function(){ -return this.getTruncatedValue(z); -}; -function SymbolMirror(r){ -%_Call(ValueMirror,this,m.SYMBOL_TYPE,r); -} -inherits(SymbolMirror,ValueMirror); -SymbolMirror.prototype.description=function(){ -return %SymbolDescription(%ValueOf(this.value_)); -} -SymbolMirror.prototype.toText=function(){ -return %SymbolDescriptiveString(%ValueOf(this.value_)); -} -function ObjectMirror(r,D,E){ -D=D||m.OBJECT_TYPE; -%_Call(ValueMirror,this,D,r,E); -} -inherits(ObjectMirror,ValueMirror); -ObjectMirror.prototype.className=function(){ -return %_ClassOf(this.value_); -}; -ObjectMirror.prototype.constructorFunction=function(){ -return MakeMirror(%DebugGetProperty(this.value_,'constructor')); -}; -ObjectMirror.prototype.prototypeObject=function(){ -return MakeMirror(%DebugGetProperty(this.value_,'prototype')); -}; -ObjectMirror.prototype.protoObject=function(){ -return MakeMirror(%DebugGetPrototype(this.value_)); -}; -ObjectMirror.prototype.hasNamedInterceptor=function(){ -var G=%GetInterceptorInfo(this.value_); -return(G&2)!=0; -}; -ObjectMirror.prototype.hasIndexedInterceptor=function(){ -var G=%GetInterceptorInfo(this.value_); -return(G&1)!=0; -}; -ObjectMirror.prototype.propertyNames=function(){ -return %GetOwnPropertyKeys(this.value_,0); -}; -ObjectMirror.prototype.properties=function(){ -var H=this.propertyNames(); -var I=new c(H.length); -for(var J=0;J'; -}; -ObjectMirror.GetInternalProperties=function(r){ -var I=%DebugGetInternalProperties(r); -var O=[]; -for(var J=0;JV)return new c(); -var W=new c(V-U+1); -for(var J=U;J<=V;J++){ -var L=%DebugGetPropertyDetails(this.value_,(%_ToString(J))); -var r; -if(L){ -r=new PropertyMirror(this,J,L); -}else{ -r=GetUndefinedMirror(); -} -W[J-U]=r; -} -return W; -}; -function DateMirror(r){ -%_Call(ObjectMirror,this,r); -} -inherits(DateMirror,ObjectMirror); -DateMirror.prototype.toText=function(){ -var X=e(this.value_); -return X.substring(1,X.length-1); -}; -function RegExpMirror(r){ -%_Call(ObjectMirror,this,r,m.REGEXP_TYPE); -} -inherits(RegExpMirror,ObjectMirror); -RegExpMirror.prototype.source=function(){ -return this.value_.source; -}; -RegExpMirror.prototype.global=function(){ -return this.value_.global; -}; -RegExpMirror.prototype.ignoreCase=function(){ -return this.value_.ignoreCase; -}; -RegExpMirror.prototype.multiline=function(){ -return this.value_.multiline; -}; -RegExpMirror.prototype.sticky=function(){ -return this.value_.sticky; -}; -RegExpMirror.prototype.unicode=function(){ -return this.value_.unicode; -}; -RegExpMirror.prototype.toText=function(){ -return"/"+this.source()+"/"; -}; -function ErrorMirror(r){ -%_Call(ObjectMirror,this,r,m.ERROR_TYPE); -} -inherits(ErrorMirror,ObjectMirror); -ErrorMirror.prototype.message=function(){ -return this.value_.message; -}; -ErrorMirror.prototype.toText=function(){ -var Y; -try{ -Y=%ErrorToString(this.value_); -}catch(e){ -Y='#'; -} -return Y; -}; -function PromiseMirror(r){ -%_Call(ObjectMirror,this,r,m.PROMISE_TYPE); -} -inherits(PromiseMirror,ObjectMirror); -function PromiseGetStatus_(r){ -var Z=%DebugGetProperty(r,h); -if(Z==0)return"pending"; -if(Z==1)return"resolved"; -return"rejected"; -} -function PromiseGetValue_(r){ -return %DebugGetProperty(r,i); -} -PromiseMirror.prototype.status=function(){ -return PromiseGetStatus_(this.value_); -}; -PromiseMirror.prototype.promiseValue=function(){ -return MakeMirror(PromiseGetValue_(this.value_)); -}; -function MapMirror(r){ -%_Call(ObjectMirror,this,r,m.MAP_TYPE); -} -inherits(MapMirror,ObjectMirror); -MapMirror.prototype.entries=function(aa){ -var O=[]; -if((%_ClassOf(this.value_)==='WeakMap')){ -var ab=%GetWeakMapEntries(this.value_,aa||0); -for(var J=0;J3){ -this.exception_=L[3]; -this.getter_=L[4]; -this.setter_=L[5]; -} -} -inherits(PropertyMirror,Mirror); -PropertyMirror.prototype.isReadOnly=function(){ -return(this.attributes()&B.ReadOnly)!=0; -}; -PropertyMirror.prototype.isEnum=function(){ -return(this.attributes()&B.DontEnum)==0; -}; -PropertyMirror.prototype.canDelete=function(){ -return(this.attributes()&B.DontDelete)==0; -}; -PropertyMirror.prototype.name=function(){ -return this.name_; -}; -PropertyMirror.prototype.toText=function(){ -if((typeof(this.name_)==='symbol'))return %SymbolDescriptiveString(this.name_); -return this.name_; -}; -PropertyMirror.prototype.isIndexed=function(){ -for(var J=0;J0; -}; -FrameDetails.prototype.inlinedFrameIndex=function(){ -%CheckExecutionState(this.break_id_); -var aA=ay; -return(this.details_[ar]&aA)>>2; -}; -FrameDetails.prototype.argumentCount=function(){ -%CheckExecutionState(this.break_id_); -return this.details_[am]; -}; -FrameDetails.prototype.argumentName=function(R){ -%CheckExecutionState(this.break_id_); -if(R>=0&&R=0&&R=0&&R=0&&R0){ -for(var J=0;J0){ -O+=this.lineOffset(); -O+='-'; -O+=this.lineOffset()+this.lineCount()-1; -}else{ -O+=this.lineCount(); -} -O+=')'; -return O; -}; -function ContextMirror(bb){ -%_Call(Mirror,this,m.CONTEXT_TYPE); -this.data_=bb; -this.allocateHandle_(); -} -inherits(ContextMirror,Mirror); -ContextMirror.prototype.data=function(){ -return this.data_; -}; -function MakeMirrorSerializer(L,bc){ -return new JSONProtocolSerializer(L,bc); -} -function JSONProtocolSerializer(L,bc){ -this.details_=L; -this.options_=bc; -this.mirrors_=[]; -} -JSONProtocolSerializer.prototype.serializeReference=function(t){ -return this.serialize_(t,true,true); -}; -JSONProtocolSerializer.prototype.serializeValue=function(t){ -var bd=this.serialize_(t,false,true); -return bd; -}; -JSONProtocolSerializer.prototype.serializeReferencedObjects=function(){ -var be=[]; -var bf=this.mirrors_.length; -for(var J=0;Jthis.maxStringLength_()){ -var bh=t.getTruncatedValue(this.maxStringLength_()); -be.value=bh; -be.fromIndex=0; -be.toIndex=this.maxStringLength_(); -}else{ -be.value=t.value(); -} -be.length=t.length(); -break; -case m.SYMBOL_TYPE: -be.description=t.description(); -break; -case m.OBJECT_TYPE: -case m.FUNCTION_TYPE: -case m.ERROR_TYPE: -case m.REGEXP_TYPE: -case m.PROMISE_TYPE: -case m.GENERATOR_TYPE: -this.serializeObject_(t,be,L); -break; -case m.PROPERTY_TYPE: -case m.INTERNAL_PROPERTY_TYPE: -throw %make_error(2, -'PropertyMirror cannot be serialized independently'); -break; -case m.FRAME_TYPE: -this.serializeFrame_(t,be); -break; -case m.SCOPE_TYPE: -this.serializeScope_(t,be); -break; -case m.SCRIPT_TYPE: -if(t.name()){ -be.name=t.name(); -} -be.id=t.id(); -be.lineOffset=t.lineOffset(); -be.columnOffset=t.columnOffset(); -be.lineCount=t.lineCount(); -if(t.data()){ -be.data=t.data(); -} -if(this.includeSource_()){ -be.source=t.source(); -}else{ -var bi=t.source().substring(0,80); -be.sourceStart=bi; -} -be.sourceLength=t.source().length; -be.scriptType=t.scriptType(); -be.compilationType=t.compilationType(); -if(t.compilationType()==1&& -t.evalFromScript()){ -be.evalFromScript= -this.serializeReference(t.evalFromScript()); -var bj=t.evalFromLocation(); -if(bj){ -be.evalFromLocation={line:bj.line, -column:bj.column}; -} -if(t.evalFromFunctionName()){ -be.evalFromFunctionName=t.evalFromFunctionName(); -} -} -if(t.context()){ -be.context=this.serializeReference(t.context()); -} -break; -case m.CONTEXT_TYPE: -be.data=t.data(); -break; -} -be.text=t.toText(); -return be; -}; -JSONProtocolSerializer.prototype.serializeObject_=function(t,be, -L){ -be.className=t.className(); -be.constructorFunction= -this.serializeReference(t.constructorFunction()); -be.protoObject=this.serializeReference(t.protoObject()); -be.prototypeObject=this.serializeReference(t.prototypeObject()); -if(t.hasNamedInterceptor()){ -be.namedInterceptor=true; -} -if(t.hasIndexedInterceptor()){ -be.indexedInterceptor=true; -} -if(t.isFunction()){ -be.name=t.name(); -if(!(t.inferredName()===(void 0))){ -be.inferredName=t.inferredName(); -} -be.resolved=t.resolved(); -if(t.resolved()){ -be.source=t.source(); -} -if(t.script()){ -be.script=this.serializeReference(t.script()); -be.scriptId=t.script().id(); -serializeLocationFields(t.sourceLocation(),be); -} -be.scopes=[]; -for(var J=0;J0){ -var bn=[]; -for(var J=0;J0){ -return'Infinity'; -}else{ -return'-Infinity'; -} -} -return r; -} -b.InstallFunctions(a,2,[ -"MakeMirror",MakeMirror, -"MakeMirrorSerializer",MakeMirrorSerializer, -"LookupMirror",LookupMirror, -"ToggleMirrorCache",ToggleMirrorCache, -"MirrorCacheIsEmpty",MirrorCacheIsEmpty, -]); -b.InstallConstants(a,[ -"ScopeType",C, -"PropertyType",A, -"PropertyAttribute",B, -"Mirror",Mirror, -"ValueMirror",ValueMirror, -"UndefinedMirror",UndefinedMirror, -"NullMirror",NullMirror, -"BooleanMirror",BooleanMirror, -"NumberMirror",NumberMirror, -"StringMirror",StringMirror, -"SymbolMirror",SymbolMirror, -"ObjectMirror",ObjectMirror, -"FunctionMirror",FunctionMirror, -"UnresolvedFunctionMirror",UnresolvedFunctionMirror, -"ArrayMirror",ArrayMirror, -"DateMirror",DateMirror, -"RegExpMirror",RegExpMirror, -"ErrorMirror",ErrorMirror, -"PromiseMirror",PromiseMirror, -"MapMirror",MapMirror, -"SetMirror",SetMirror, -"IteratorMirror",IteratorMirror, -"GeneratorMirror",GeneratorMirror, -"PropertyMirror",PropertyMirror, -"InternalPropertyMirror",InternalPropertyMirror, -"FrameMirror",FrameMirror, -"ScriptMirror",ScriptMirror, -"ScopeMirror",ScopeMirror, -"FrameDetails",FrameDetails, -]); -b.InstallFunctions(b,2,[ -"ClearMirrorCache",ClearMirrorCache -]); -b.Export(function(bv){ -bv.MirrorType=m; -}); -}) - -debugf -(function(a,b){ -"use strict"; -var c=a.FrameMirror; -var d=a.Array; -var e=a.RegExp; -var f=a.isNaN; -var g=a.JSON.parse; -var h=a.JSON.stringify; -var i=a.LookupMirror; -var j=a.MakeMirror; -var k=a.MakeMirrorSerializer; -var l=a.Math.min; -var m=a.Mirror; -var n; -var o=a.parseInt; -var p=a.ValueMirror; -b.Import(function(q){ -n=q.MirrorType; -}); -var r=10; -var s={}; -var t=/^(?:\s*(?:\/\*.*?\*\/)*)*/; -s.DebugEvent={Break:1, -Exception:2, -NewFunction:3, -BeforeCompile:4, -AfterCompile:5, -CompileError:6, -AsyncTaskEvent:7}; -s.ExceptionBreak={Caught:0, -Uncaught:1}; -s.StepAction={StepOut:0, -StepNext:1, -StepIn:2, -StepFrame:3}; -s.ScriptType={Native:0, -Extension:1, -Normal:2, -Wasm:3}; -s.ScriptCompilationType={Host:0, -Eval:1, -JSON:2}; -s.ScriptBreakPointType={ScriptId:0, -ScriptName:1, -ScriptRegExp:2}; -s.BreakPositionAlignment={ -Statement:0, -BreakPosition:1 -}; -function ScriptTypeFlag(u){ -return(1<=this.frameCount()){ -throw %make_type_error(33); -} -return new c(this.break_id,aw); -}; -ExecutionState.prototype.setSelectedFrame=function(ax){ -var L=(%_ToNumber(ax)); -if(L<0||L>=this.frameCount()){ -throw %make_type_error(33); -} -this.selected_frame=L; -}; -ExecutionState.prototype.selectedFrame=function(){ -return this.selected_frame; -}; -ExecutionState.prototype.debugCommandProcessor=function(ay){ -return new DebugCommandProcessor(this,ay); -}; -function MakeBreakEvent(H,az){ -return new BreakEvent(H,az); -} -function BreakEvent(H,az){ -this.frame_=new c(H,0); -this.break_points_hit_=az; -} -BreakEvent.prototype.eventType=function(){ -return s.DebugEvent.Break; -}; -BreakEvent.prototype.func=function(){ -return this.frame_.func(); -}; -BreakEvent.prototype.sourceLine=function(){ -return this.frame_.sourceLine(); -}; -BreakEvent.prototype.sourceColumn=function(){ -return this.frame_.sourceColumn(); -}; -BreakEvent.prototype.sourceLineText=function(){ -return this.frame_.sourceLineText(); -}; -BreakEvent.prototype.breakPointsHit=function(){ -return this.break_points_hit_; -}; -BreakEvent.prototype.toJSONProtocol=function(){ -var aA={seq:v++, -type:"event", -event:"break", -body:{invocationText:this.frame_.invocationText()} -}; -var O=this.func().script(); -if(O){ -aA.body.sourceLine=this.sourceLine(), -aA.body.sourceColumn=this.sourceColumn(), -aA.body.sourceLineText=this.sourceLineText(), -aA.body.script=MakeScriptObject_(O,false); -} -if(this.breakPointsHit()){ -aA.body.breakpoints=[]; -for(var L=0;L0){ -aA.body.sourceLine=this.sourceLine(); -aA.body.sourceColumn=this.sourceColumn(); -aA.body.sourceLineText=this.sourceLineText(); -var O=this.func().script(); -if(O){ -aA.body.script=MakeScriptObject_(O,false); -} -}else{ -aA.body.sourceLine=-1; -} -return aA.toJSONProtocol(); -}; -function MakeCompileEvent(O,u){ -return new CompileEvent(O,u); -} -function CompileEvent(O,u){ -this.script_=j(O); -this.type_=u; -} -CompileEvent.prototype.eventType=function(){ -return this.type_; -}; -CompileEvent.prototype.script=function(){ -return this.script_; -}; -CompileEvent.prototype.toJSONProtocol=function(){ -var aA=new ProtocolMessage(); -aA.running=true; -switch(this.type_){ -case s.DebugEvent.BeforeCompile: -aA.event="beforeCompile"; -break; -case s.DebugEvent.AfterCompile: -aA.event="afterCompile"; -break; -case s.DebugEvent.CompileError: -aA.event="compileError"; -break; -} -aA.body={}; -aA.body.script=this.script_; -return aA.toJSONProtocol(); -}; -function MakeScriptObject_(O,aG){ -var aA={id:O.id(), -name:O.name(), -lineOffset:O.lineOffset(), -columnOffset:O.columnOffset(), -lineCount:O.lineCount(), -}; -if(!(O.data()===(void 0))){ -aA.data=O.data(); -} -if(aG){ -aA.source=O.source(); -} -return aA; -} -function MakeAsyncTaskEvent(aH){ -return new AsyncTaskEvent(aH); -} -function AsyncTaskEvent(aH){ -this.type_=aH.type; -this.name_=aH.name; -this.id_=aH.id; -} -AsyncTaskEvent.prototype.type=function(){ -return this.type_; -} -AsyncTaskEvent.prototype.name=function(){ -return this.name_; -} -AsyncTaskEvent.prototype.id=function(){ -return this.id_; -} -function DebugCommandProcessor(F,ay){ -this.exec_state_=F; -this.running_=ay||false; -} -DebugCommandProcessor.prototype.processDebugRequest=function(aI){ -return this.processDebugJSONRequest(aI); -}; -function ProtocolMessage(aI){ -this.seq=v++; -if(aI){ -this.type='response'; -this.request_seq=aI.seq; -this.command=aI.command; -}else{ -this.type='event'; -} -this.success=true; -this.running=(void 0); -} -ProtocolMessage.prototype.setOption=function(aJ,A){ -if(!this.options_){ -this.options_={}; -} -this.options_[aJ]=A; -}; -ProtocolMessage.prototype.failed=function(aK,aL){ -this.success=false; -this.message=aK; -if((typeof(aL)==='object')){ -this.error_details=aL; -} -}; -ProtocolMessage.prototype.toJSONProtocol=function(){ -var aM={}; -aM.seq=this.seq; -if(this.request_seq){ -aM.request_seq=this.request_seq; -} -aM.type=this.type; -if(this.event){ -aM.event=this.event; -} -if(this.command){ -aM.command=this.command; -} -if(this.success){ -aM.success=this.success; -}else{ -aM.success=false; -} -if(this.body){ -var aN; -var aO=k(true,this.options_); -if(this.body instanceof m){ -aN=aO.serializeValue(this.body); -}else if(this.body instanceof d){ -aN=[]; -for(var L=0;L=this.exec_state_.frameCount()){ -return aP.failed('Invalid frame "'+bn+'"'); -} -aP.body=this.exec_state_.frame(bE).evaluate( -by,(!!(bz)),bB); -return; -}else{ -aP.body=this.exec_state_.frame().evaluate( -by,(!!(bz)),bB); -return; -} -}; -DebugCommandProcessor.prototype.lookupRequest_=function(aI,aP){ -if(!aI.arguments){ -return aP.failed('Missing arguments'); -} -var bF=aI.arguments.handles; -if((bF===(void 0))){ -return aP.failed('Argument "handles" missing'); -} -if(!(aI.arguments.includeSource===(void 0))){ -var bG=(!!(aI.arguments.includeSource)); -aP.setOption('includeSource',bG); -} -var bH={}; -for(var L=0;L=this.exec_state_.frameCount()){ -return aP.failed('Invalid frame "'+bn+'"'); -} -bn=this.exec_state_.frame(bE); -} -} -var O=bn.func().script(); -if(!O){ -return aP.failed('No source'); -} -var bK=O.value(); -var bL=bK.line_offset; -var bM=%ScriptLineCount(bK); -bI=(bI===(void 0))?0:bI-bL; -bJ=(bJ===(void 0))?bM:bJ-bL; -if(bI<0)bI=0; -if(bJ>bM)bJ=bM; -if(bI>=bM||bJ<0||bI>bJ){ -return aP.failed('Invalid line interval'); -} -aP.body={}; -aP.body.fromLine=bI+bL; -aP.body.toLine=bJ+bL; -aP.body.fromPosition=%ScriptLineStartPosition(bK,bI); -aP.body.toPosition= -(bJ==0)?0:%ScriptLineEndPosition(bK,bJ-1); -aP.body.totalLines=%ScriptLineCount(bK); -aP.body.source=%_SubString(bK.source, -aP.body.fromPosition, -aP.body.toPosition); -}; -DebugCommandProcessor.prototype.scriptsRequest_=function(aI,aP){ -var bN=ScriptTypeFlag(s.ScriptType.Normal); -var bG=false; -var bO=null; -if(aI.arguments){ -if(!(aI.arguments.types===(void 0))){ -bN=(%_ToNumber(aI.arguments.types)); -if(f(bN)||bN<0){ -return aP.failed('Invalid types "'+ -aI.arguments.types+'"'); -} -} -if(!(aI.arguments.includeSource===(void 0))){ -bG=(!!(aI.arguments.includeSource)); -aP.setOption('includeSource',bG); -} -if((%_IsArray(aI.arguments.ids))){ -bO={}; -var bP=aI.arguments.ids; -for(var L=0;L=0){ -bT=true; -} -} -if(!bT)continue; -} -if(bN&ScriptTypeFlag(Y[L].type)){ -aP.body.push(j(Y[L])); -} -} -}; -DebugCommandProcessor.prototype.suspendRequest_=function(aI,aP){ -aP.running=false; -}; -DebugCommandProcessor.prototype.versionRequest_=function(aI,aP){ -aP.body={ -V8Version:%GetV8Version() -}; -}; -DebugCommandProcessor.prototype.changeLiveRequest_=function( -aI,aP){ -if(!aI.arguments){ -return aP.failed('Missing arguments'); -} -var bU=aI.arguments.script_id; -var bV=!!aI.arguments.preview_only; -var bW=scriptById(bU); -if(!bW){ -aP.failed('Script not found'); -return; -} -var bX=new d(); -if(!(typeof(aI.arguments.new_source)==='string')){ -throw"new_source argument expected"; -} -var bY=aI.arguments.new_source; -var bZ; -try{ -bZ=s.LiveEdit.SetScriptSource(bW, -bY,bV,bX); -}catch(e){ -if(e instanceof s.LiveEdit.Failure&&"details"in e){ -aP.failed(e.message,e.details); -return; -} -throw e; -} -aP.body={change_log:bX,result:bZ}; -if(!bV&&!this.running_&&bZ.stack_modified){ -aP.body.stepin_recommended=true; -} -}; -DebugCommandProcessor.prototype.restartFrameRequest_=function( -aI,aP){ -if(!aI.arguments){ -return aP.failed('Missing arguments'); -} -var bn=aI.arguments.frame; -if(this.exec_state_.frameCount()==0){ -return aP.failed('No frames'); -} -var ca; -if(!(bn===(void 0))){ -var bE=(%_ToNumber(bn)); -if(bE<0||bE>=this.exec_state_.frameCount()){ -return aP.failed('Invalid frame "'+bn+'"'); -} -ca=this.exec_state_.frame(bE); -}else{ -ca=this.exec_state_.frame(); -} -var bZ=ca.restart(); -aP.body={result:bZ}; -}; -DebugCommandProcessor.prototype.debuggerFlagsRequest_=function(aI, -aP){ -if(!aI.arguments){ -aP.failed('Missing arguments'); -return; -} -var cb=aI.arguments.flags; -aP.body={flags:[]}; -if(!(cb===(void 0))){ -for(var L=0;LP[E].start_position){ -R=E; -} -} -if(R!=x){ -var S=P[R]; -var T=Q[R]; -P[R]=P[x]; -Q[R]=Q[x]; -P[x]=S; -Q[x]=T; -} -} -var U=0; -function ResetIndexes(V,W){ -var X=-1; -while(U=aK.pos1+aK.len1){ -return aE+aK.pos2+aK.len2-aK.pos1-aK.len1; -} -if(!aF){ -aF=PosTranslator.DefaultInsideChunkHandler; -} -return aF(aE,aK); -}; -PosTranslator.DefaultInsideChunkHandler=function(aE,aL){ -Assert(false,"Cannot translate position in changed area"); -}; -PosTranslator.ShiftWithTopInsideChunkHandler= -function(aE,aL){ -return aE-aL.pos1+aL.pos2; -}; -var i={ -UNCHANGED:"unchanged", -SOURCE_CHANGED:"source changed", -CHANGED:"changed", -DAMAGED:"damaged" -}; -function CodeInfoTreeNode(aM,aN,aO){ -this.info=aM; -this.children=aN; -this.array_index=aO; -this.parent=(void 0); -this.status=i.UNCHANGED; -this.status_explanation=(void 0); -this.new_start_pos=(void 0); -this.new_end_pos=(void 0); -this.corresponding_node=(void 0); -this.unmatched_new_nodes=(void 0); -this.textual_corresponding_node=(void 0); -this.textually_unmatched_new_nodes=(void 0); -this.live_shared_function_infos=(void 0); -} -function BuildCodeInfoTree(aP){ -var aQ=0; -function BuildNode(){ -var aR=aQ; -aQ++; -var aS=new e(); -while(aQ=ay.length;}; -this.TranslatePos=function(aE){return aE+aX;}; -}; -function ProcessInternals(aY){ -aY.new_start_pos=aV.TranslatePos( -aY.info.start_position); -var aZ=0; -var ba=false; -var bb=false; -while(!aV.done()&& -aV.current().pos1= -aV.current().pos1+aV.current().len1){ -ba=true; -aV.next(); -continue; -}else if(bc.info.start_position<=aV.current().pos1&& -bc.info.end_position>=aV.current().pos1+ -aV.current().len1){ -ProcessInternals(bc); -bb=bb|| -(bc.status!=i.UNCHANGED); -ba=ba|| -(bc.status==i.DAMAGED); -aZ++; -continue; -}else{ -ba=true; -bc.status=i.DAMAGED; -bc.status_explanation= -"Text diff overlaps with function boundary"; -aZ++; -continue; -} -}else{ -if(aV.current().pos1+aV.current().len1<= -aY.info.end_position){ -aY.status=i.CHANGED; -aV.next(); -continue; -}else{ -aY.status=i.DAMAGED; -aY.status_explanation= -"Text diff overlaps with function boundary"; -return; -} -} -Assert("Unreachable",false); -} -while(aZ0){ -return bp; -} -} -function TraverseTree(w){ -w.live_shared_function_infos=FindFunctionInfos(w.info); -for(var x=0;x ["+bx+"]"; -} -return; -} -var by; -function CheckStackActivations(old_shared_wrapper_list, -new_shared_list, -Z){ -var bz=new e(); -for(var x=0;x0){ -Z.push({dropped_from_stack:bC}); -} -if(bB.length>0){ -Z.push({functions_on_stack:bB}); -throw new Failure("Blocked by functions on stack"); -} -return bC.length; -} -var by={ -AVAILABLE_FOR_PATCH:1, -BLOCKED_ON_ACTIVE_STACK:2, -BLOCKED_ON_OTHER_STACK:3, -BLOCKED_UNDER_NATIVE_CODE:4, -REPLACED_ON_ACTIVE_STACK:5, -BLOCKED_UNDER_GENERATOR:6, -BLOCKED_ACTIVE_GENERATOR:7, -BLOCKED_NO_NEW_TARGET_ON_RESTART:8 -}; -by.SymbolName=function(bF){ -var bG=by; -for(var bH in bG){ -if(bG[bH]==bF){ -return bH; -} -} -}; -function Failure(as){ -this.message=as; -} -Failure.prototype.toString=function(){ -return"LiveEdit Failure: "+this.message; -}; -function CopyErrorPositionToDetails(bI,p){ -function createPositionStruct(N,bJ){ -if(bJ==-1)return; -var bK=N.locationFromPosition(bJ,true); -if(bK==null)return; -return{ -line:bK.line+1, -column:bK.column+1, -position:bJ -}; -} -if(!("scriptObject"in bI)||!("startPosition"in bI)){ -return; -} -var N=bI.scriptObject; -var bL={ -start:createPositionStruct(N,bI.startPosition), -end:createPositionStruct(N,bI.endPosition) -}; -p.position=bL; -} -function SetScriptSource(N,bM,bN,Z){ -var j=N.source; -var bO=CompareStrings(j,bM); -return ApplyPatchMultiChunk(N,bO,bM,bN, -Z); -} -function CompareStrings(bP,bQ){ -return %LiveEditCompareStrings(bP,bQ); -} -function ApplySingleChunkPatch(N,change_pos,change_len,new_str, -Z){ -var j=N.source; -var bM=j.substring(0,change_pos)+ -new_str+j.substring(change_pos+change_len); -return ApplyPatchMultiChunk(N, -[change_pos,change_pos+change_len,change_pos+new_str.length], -bM,false,Z); -} -function DescribeChangeTree(bd){ -function ProcessOldNode(w){ -var bR=[]; -for(var x=0;x>1); -var m=2|4|1; -for(var n=0;n>1); -for(var n=0;n>1)+(fields?fields.length:0); -if(v>=4){ -%OptimizeObjectForAddingMultipleProperties(u,v); -} -if(fields){ -for(var n=0;n9007199254740991)throw %make_range_error(i); -return j; -} -function MaxSimple(k,l){ -return k>l?k:l; -} -function MinSimple(k,l){ -return k>l?l:k; -} -%SetForceInlineFlag(MaxSimple); -%SetForceInlineFlag(MinSimple); -function SpeciesConstructor(m,n){ -var o=m.constructor; -if((o===(void 0))){ -return n; -} -if(!(%_IsJSReceiver(o))){ -throw %make_type_error(28); -} -var p=o[f]; -if((p==null)){ -return n; -} -if(%IsConstructor(p)){ -return p; -} -throw %make_type_error(236); -} -%FunctionSetPrototype(c,new c(0)); -b.Export(function(q){ -q.MaxSimple=MaxSimple; -q.MinSimple=MinSimple; -q.ToPositiveInteger=ToPositiveInteger; -q.ToIndex=ToIndex; -q.SpeciesConstructor=SpeciesConstructor; -}); -}) - -$v8natives12 -(function(a,b){ -%CheckIsBootstrapping(); -var c=a.Number; -var d=a.Object; -var e=b.ImportNow("iterator_symbol"); -var f=%GetRootNaN(); -var g=b.ImportNow("object_to_string"); -function GlobalParseInt(h,i){ -if((i===(void 0))||i===10||i===0){ -if(%_IsSmi(h))return h; -if((typeof(h)==='number')&& -((0.01>2; -var I=%EstimateNumberOfElements(q); -return(II*4); -} -function Stack(){ -this.length=0; -this.values=new g(); -} -Stack.prototype.length=null; -Stack.prototype.values=null; -function StackPush(J,K){ -J.values[J.length++]=K; -} -function StackPop(J){ -J.values[--J.length]=null -} -function StackHas(J,L){ -var r=J.length; -var M=J.values; -for(var y=0;y=P){ -var T=q[E]; -if(!(T===(void 0))||E in q){ -%CreateDataProperty(S,E-P,T); -} -} -} -} -} -function SparseMove(q,P,Q,R,V){ -if(V===Q)return; -var W=new g( -j(R-Q+V,0xffffffff)); -var X; -var v=%GetArrayKeys(q,R); -if((typeof(v)==='number')){ -var w=v; -for(var y=0;y=P+Q){ -var T=q[E]; -if(!(T===(void 0))||E in q){ -var Y=E-Q+V; -W[Y]=T; -if(Y>0xfffffffe){ -X=X||new g(); -X.push(Y); -} -} -} -} -} -%MoveArrayContents(W,q); -if(!(X===(void 0))){ -var r=X.length; -for(var y=0;yQ){ -for(var y=R-Q;y>P;y--){ -var aa=y+Q-1; -var ab=y+V-1; -if(aa in q){ -q[ab]=q[aa]; -}else{ -delete q[ab]; -} -} -}else{ -for(var y=P;yR-Q+V;y--){ -delete q[y-1]; -} -} -} -} -function ArrayToString(){ -var q; -var ac; -if((%_IsArray(this))){ -ac=this.join; -if(ac===ArrayJoin){ -return Join(this,this.length,',',false); -} -q=this; -}else{ -q=(%_ToObject(this)); -ac=q.join; -} -if(!(typeof(ac)==='function')){ -return %_Call(l,q); -} -return %_Call(ac,q); -} -function InnerArrayToLocaleString(q,r){ -return Join(q,(%_ToLength(r)),',',true); -} -function ArrayToLocaleString(){ -var q=(%_ToObject(this)); -var ad=q.length; -return InnerArrayToLocaleString(q,ad); -} -function InnerArrayJoin(B,q,r){ -if((B===(void 0))){ -B=','; -}else{ -B=(%_ToString(B)); -} -if(r===1){ -var z=q[0]; -if((z==null))return''; -return(%_ToString(z)); -} -return Join(q,r,B,false); -} -function ArrayJoin(B){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.join"); -var q=(%_ToObject(this)); -var r=(%_ToLength(q.length)); -return InnerArrayJoin(B,q,r); -} -function ArrayPop(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.pop"); -var q=(%_ToObject(this)); -var ae=(%_ToLength(q.length)); -if(ae==0){ -q.length=ae; -return; -} -ae--; -var K=q[ae]; -%DeleteProperty_Strict(q,ae); -q.length=ae; -return K; -} -function ArrayPush(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.push"); -var q=(%_ToObject(this)); -var ae=(%_ToLength(q.length)); -var af=arguments.length; -if(af>9007199254740991-ae)throw %make_type_error(228,af,ae); -for(var y=0;y=y){ -al=y; -while(x[++ai]==y){} -am=R-y-1; -} -var an=q[al]; -if(!(an===(void 0))||al in q){ -var ao=q[am]; -if(!(ao===(void 0))||am in q){ -q[al]=ao; -q[am]=an; -}else{ -q[am]=an; -delete q[al]; -} -}else{ -var ao=q[am]; -if(!(ao===(void 0))||am in q){ -q[al]=ao; -delete q[am]; -} -} -} -} -function PackedArrayReverse(q,R){ -var aj=R-1; -for(var y=0;y0&&UseSparseVariant(q,R,(%_IsArray(q)),R)&& -!%object_is_sealed(q)){ -SparseMove(q,0,0,R,as); -}else{ -SimpleMove(q,0,0,R,as); -} -for(var y=0;yR)P=R; -} -if(av<0){ -av+=R; -if(av<0)av=0; -}else{ -if(av>R)av=R; -} -var aw=ArraySpeciesCreate(q,i(av-P,0)); -if(avR?R:P; -} -function ComputeSpliceDeleteCount(ax,as,R,P){ -var Q=0; -if(as==1) -return R-P; -Q=(%_ToInteger(ax)); -if(Q<0) -return 0; -if(Q>R-P) -return R-P; -return Q; -} -function ArraySplice(at,ax){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.splice"); -var as=arguments.length; -var q=(%_ToObject(this)); -var R=(%_ToLength(q.length)); -var P=ComputeSpliceStartIndex((%_ToInteger(at)),R); -var Q=ComputeSpliceDeleteCount(ax,as,R, -P); -var S=ArraySpeciesCreate(q,Q); -S.length=Q; -var ay=as>2?as-2:0; -if(Q!=ay&&%object_is_sealed(q)){ -throw %make_type_error(13); -}else if(Q>0&&%object_is_frozen(q)){ -throw %make_type_error(12); -} -var az=Q; -if(ay!=Q){ -az+=R-P-Q; -} -if(UseSparseVariant(q,R,(%_IsArray(q)),az)){ -%NormalizeElements(q); -if((%_IsArray(S)))%NormalizeElements(S); -SparseSlice(q,P,Q,R,S); -SparseMove(q,P,Q,R,ay); -}else{ -SimpleSlice(q,P,Q,R,S); -SimpleMove(q,P,Q,R,ay); -} -var y=P; -var aA=2; -var aB=arguments.length; -while(aA=p;aj--){ -var aH=t[aj]; -var aI=aC(aH,aG); -if(aI>0){ -t[aj+1]=aH; -}else{ -break; -} -} -t[aj+1]=aG; -} -}; -var aJ=function(t,p,aF){ -var aK=new g(); -var aL=200+((aF-p)&15); -var aj=0; -p+=1; -aF-=1; -for(var y=p;y>1][0]; -return aM; -} -var aN=function QuickSort(t,p,aF){ -var aM=0; -while(true){ -if(aF-p<=10){ -aE(t,p,aF); -return; -} -if(aF-p>1000){ -aM=aJ(t,p,aF); -}else{ -aM=p+((aF-p)>>1); -} -var aO=t[p]; -var aP=t[aF-1]; -var aQ=t[aM]; -var aR=aC(aO,aP); -if(aR>0){ -var aH=aO; -aO=aP; -aP=aH; -} -var aS=aC(aO,aQ); -if(aS>=0){ -var aH=aO; -aO=aQ; -aQ=aP; -aP=aH; -}else{ -var aT=aC(aP,aQ); -if(aT>0){ -var aH=aP; -aP=aQ; -aQ=aH; -} -} -t[p]=aO; -t[aF-1]=aQ; -var aU=aP; -var aV=p+1; -var aW=aF-1; -t[aM]=t[aV]; -t[aV]=aU; -partition:for(var y=aV+1;y0){ -do{ -aW--; -if(aW==y)break partition; -var aX=t[aW]; -aI=aC(aX,aU); -}while(aI>0); -t[y]=t[aW]; -t[aW]=aG; -if(aI<0){ -aG=t[y]; -t[y]=t[aV]; -t[aV]=aG; -aV++; -} -} -} -if(aF-aW=ba){ba=y+1;} -} -} -}else{ -for(var y=0;y=ba){ba=Z+1;} -} -} -} -} -return ba; -}; -var bd=function(aZ,p,aF){ -for(var bb=%object_get_prototype_of(aZ);bb; -bb=%object_get_prototype_of(bb)){ -var v=(%_IsJSProxy(bb))?aF:%GetArrayKeys(bb,aF); -if((typeof(v)==='number')){ -var bc=v; -for(var y=p;y=r)Z=r-1; -} -var bo=0; -var ba=Z; -if(UseSparseVariant(q,r,(%_IsArray(q)),Z)){ -%NormalizeElements(q); -var v=%GetArrayKeys(q,Z+1); -if((typeof(v)==='number')){ -ba=v; -}else{ -if(v.length==0)return-1; -var bp=GetSortedArrayKeys(q,v); -var y=bp.length-1; -while(y>=0){ -var E=bp[y]; -if(q[E]===aG)return E; -y--; -} -return-1; -} -} -if(!(aG===(void 0))){ -for(var y=ba;y>=bo;y--){ -if(q[y]===aG)return y; -} -return-1; -} -for(var y=ba;y>=bo;y--){ -if((q[y]===(void 0))&&y in q){ -return y; -} -} -return-1; -} -function ArrayLastIndexOf(aG,Z){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.lastIndexOf"); -var r=(%_ToLength(this.length)); -return InnerArrayLastIndexOf(this,aG,Z,r, -arguments.length); -} -function InnerArrayReduce(bq,T,q,r,bn){ -if(!(typeof(bq)==='function')){ -throw %make_type_error(15,bq); -} -var y=0; -find_initial:if(bn<2){ -for(;y=0;y--){ -if(y in q){ -T=q[y--]; -break find_initial; -} -} -throw %make_type_error(122); -} -for(;y>=0;y--){ -if(y in q){ -var aG=q[y]; -T=bq(T,aG,y,q); -} -} -return T; -} -function ArrayReduceRight(bq,T){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.reduceRight"); -var q=(%_ToObject(this)); -var r=(%_ToLength(q.length)); -return InnerArrayReduceRight(bq,T,q,r, -arguments.length); -} -function InnerArrayCopyWithin(br,at,au,q,r){ -br=(%_ToInteger(br)); -var aF; -if(br<0){ -aF=i(r+br,0); -}else{ -aF=j(br,r); -} -at=(%_ToInteger(at)); -var p; -if(at<0){ -p=i(r+at,0); -}else{ -p=j(at,r); -} -au=(au===(void 0))?r:(%_ToInteger(au)); -var bs; -if(au<0){ -bs=i(r+au,0); -}else{ -bs=j(au,r); -} -var bt=j(bs-p,r-aF); -var bu=1; -if(p0){ -if(p in q){ -q[aF]=q[p]; -}else{ -delete q[aF]; -} -p=p+bu; -aF=aF+bu; -bt--; -} -return q; -} -function ArrayCopyWithin(br,at,au){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.copyWithin"); -var q=(%_ToObject(this)); -var r=(%_ToLength(q.length)); -return InnerArrayCopyWithin(br,at,au,q,r); -} -function InnerArrayFind(bv,bw,q,r){ -if(!(typeof(bv)==='function')){ -throw %make_type_error(15,bv); -} -for(var y=0;yr)y=r; -} -if(au<0){ -au+=r; -if(au<0)au=0; -}else{ -if(au>r)au=r; -} -if((au-y)>0&&%object_is_frozen(q)){ -throw %make_type_error(12); -} -for(;yv.length)w=v.length; -return %StringIndexOf(v,t,w); -} -%FunctionSetLength(StringIndexOf,1); -function StringMatchJS(t){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.match"); -if(!(t==null)){ -var x=t[k]; -if(!(x===(void 0))){ -return %_Call(x,t,this); -} -} -var v=(%_ToString(this)); -var y=%_NewObject(e,e); -j(y,t); -return y[k](v); -} -function StringReplace(z,A){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.replace"); -if(!(z==null)){ -var B=z[l]; -if(!(B===(void 0))){ -return %_Call(B,z,this,A); -} -} -var v=(%_ToString(this)); -z=(%_ToString(z)); -if(z.length==1&& -v.length>0xFF&& -(typeof(A)==='string')&& -%StringIndexOf(A,'$',0)<0){ -return %StringReplaceOneCharWithString(v,z,A); -} -var C=%StringIndexOf(v,z,0); -if(C<0)return v; -var D=C+z.length; -var E=%_SubString(v,0,C); -if((typeof(A)==='function')){ -E+=A(z,C,v); -}else{ -const captures={length:1}; -const matched=%_SubString(v,C,D); -E+=d(matched,v,C,captures, -(%_ToString(A))); -} -return E+%_SubString(v,D,v.length); -} -function StringSearch(t){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.search"); -if(!(t==null)){ -var F=t[m]; -if(!(F===(void 0))){ -return %_Call(F,t,this); -} -} -var v=(%_ToString(this)); -var y=%_NewObject(e,e); -j(y,t); -return %_Call(y[m],y,v); -} -function StringSlice(C,D){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.slice"); -var q=(%_ToString(this)); -var G=q.length; -var H=(%_ToInteger(C)); -var I=G; -if(!(D===(void 0))){ -I=(%_ToInteger(D)); -} -if(H<0){ -H+=G; -if(H<0){ -H=0; -} -}else{ -if(H>G){ -return''; -} -} -if(I<0){ -I+=G; -if(I<0){ -return''; -} -}else{ -if(I>G){ -I=G; -} -} -if(I<=H){ -return''; -} -return %_SubString(q,H,I); -} -function StringSplitJS(J,K){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.split"); -if(!(J==null)){ -var L=J[n]; -if(!(L===(void 0))){ -return %_Call(L,J,this,K); -} -} -var v=(%_ToString(this)); -K=((K===(void 0)))?4294967295:((K)>>>0); -var M=v.length; -var N=(%_ToString(J)); -if(K===0)return[]; -if((J===(void 0)))return[v]; -var O=N.length; -if(O===0)return %StringToArray(v,K); -return %StringSplit(v,N,K); -} -function StringToLowerCaseJS(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLowerCase"); -return %StringToLowerCase((%_ToString(this))); -} -function StringToLocaleLowerCase(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleLowerCase"); -return %StringToLowerCase((%_ToString(this))); -} -function StringToUpperCaseJS(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toUpperCase"); -return %StringToUpperCase((%_ToString(this))); -} -function StringToLocaleUpperCase(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleUpperCase"); -return %StringToUpperCase((%_ToString(this))); -} -function HtmlEscape(P){ -return %_Call(StringReplace,(%_ToString(P)),/"/g,"""); -} -function StringAnchor(Q){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.anchor"); -return""+(%_ToString(this))+ -""; -} -function StringBig(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.big"); -return""+(%_ToString(this))+""; -} -function StringBlink(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.blink"); -return""+(%_ToString(this))+""; -} -function StringBold(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.bold"); -return""+(%_ToString(this))+""; -} -function StringFixed(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.fixed"); -return""+(%_ToString(this))+""; -} -function StringFontcolor(R){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.fontcolor"); -return""+(%_ToString(this))+ -""; -} -function StringFontsize(S){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.fontsize"); -return""+(%_ToString(this))+ -""; -} -function StringItalics(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.italics"); -return""+(%_ToString(this))+""; -} -function StringLink(q){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.link"); -return""+(%_ToString(this))+""; -} -function StringSmall(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.small"); -return""+(%_ToString(this))+""; -} -function StringStrike(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.strike"); -return""+(%_ToString(this))+""; -} -function StringSub(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.sub"); -return""+(%_ToString(this))+""; -} -function StringSup(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.sup"); -return""+(%_ToString(this))+""; -} -function StringRepeat(T){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.repeat"); -var q=(%_ToString(this)); -var U=(%_ToInteger(T)); -if(U<0||U===(1/0))throw %make_range_error(158); -if(q.length===0)return""; -if(U>%_MaxSmi())throw %make_range_error(158); -var V=""; -while(true){ -if(U&1)V+=q; -U>>=1; -if(U===0)return V; -q+=q; -} -} -function StringStartsWith(W,u){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.startsWith"); -var q=(%_ToString(this)); -if(g(W)){ -throw %make_type_error(40,"String.prototype.startsWith"); -} -var X=(%_ToString(W)); -var Y=(%_ToInteger(u)); -var G=q.length; -var C=i(h(Y,0),G); -var Z=X.length; -if(Z+C>G){ -return false; -} -return %_SubString(q,C,C+Z)===X; -} -%FunctionSetLength(StringStartsWith,1); -function StringEndsWith(W,u){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.endsWith"); -var q=(%_ToString(this)); -if(g(W)){ -throw %make_type_error(40,"String.prototype.endsWith"); -} -var X=(%_ToString(W)); -var G=q.length; -var Y=!(u===(void 0))?(%_ToInteger(u)):G -var D=i(h(Y,0),G); -var Z=X.length; -var C=D-Z; -if(C<0){ -return false; -} -return %_SubString(q,C,C+Z)===X; -} -%FunctionSetLength(StringEndsWith,1); -function StringIncludes(W,u){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.includes"); -var aa=(%_ToString(this)); -if(g(W)){ -throw %make_type_error(40,"String.prototype.includes"); -} -W=(%_ToString(W)); -var Y=(%_ToInteger(u)); -var ab=aa.length; -if(Y<0)Y=0; -if(Y>ab)Y=ab; -var ac=W.length; -if(ac+Y>ab){ -return false; -} -return %StringIndexOf(aa,W,Y)!==-1; -} -%FunctionSetLength(StringIncludes,1); -function StringCodePointAt(Y){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.codePointAt"); -var aa=(%_ToString(this)); -var S=aa.length; -Y=(%_ToInteger(Y)); -if(Y<0||Y>=S){ -return(void 0); -} -var ad=%_StringCharCodeAt(aa,Y); -if(ad<0xD800||ad>0xDBFF||Y+1==S){ -return ad; -} -var ae=%_StringCharCodeAt(aa,Y+1); -if(ae<0xDC00||ae>0xDFFF){ -return ad; -} -return(ad-0xD800)*0x400+ae+0x2400; -} -function StringRaw(af){ -"use strict"; -var ag=arguments.length; -var ah=(%_ToObject(af)); -var ai=(%_ToObject(ah.raw)); -var aj=(%_ToLength(ai.length)); -if(aj<=0)return""; -var E=(%_ToString(ai[0])); -for(var s=1;s=E.length)return false; -var F=%_StringCharCodeAt(E,A); -if(F<0xD800||F>0xDBFF)return false; -var G=%_StringCharCodeAt(E,A+1); -return G>=0xDC00&&G<=0xDFFF; -} -function RegExpSplit(z,H){ -if(!(%_IsRegExp(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@split",this); -} -var I=this; -var E=(%_ToString(z)); -H=((H===(void 0)))?4294967295:((H)>>>0); -var J=E.length; -if(H===0)return[]; -if(J===0){ -if(DoRegExpExec(I,E,0,0)!==null)return[]; -return[E]; -} -var K=0; -var L=0; -var M=0; -var C=new g(); -outer_loop: -while(true){ -if(L===J){ -C[C.length]=%_SubString(E,K,J); -break; -} -var N=DoRegExpExec(I,E,L); -if(N===null||J===(M=N[3])){ -C[C.length]=%_SubString(E,K,J); -break; -} -var O=N[4]; -if(L===O&&O===K){ -if((%_RegExpFlags(this)&16)&&AtSurrogatePair(E,L)){ -L+=2; -}else{ -L++; -} -continue; -} -C[C.length]=%_SubString(E,K,M); -if(C.length===H)break; -var P=((N)[0])+3; -for(var Q=3+2;Q=0; -var W=%StringIndexOf(x,'y',0)>=0; -var X=W?x:x+"y"; -var Y=new U(this,X); -var Z=new c(); -var aa=0; -var ab=((H===(void 0)))?4294967295:((H)>>>0); -var ac=z.length; -var ad=0; -if(ab===0)return Z; -var C; -if(ac===0){ -C=RegExpSubclassExec(Y,z); -if((C===null))%AddElement(Z,0,z); -return Z; -} -var ae=ad; -while(ae0){ -an=(ao>>11)+(ao&0x7ff); -}else{ -an=al[++Q]-ao; -} -}else{ -var ap=ak(ao,an,E); -al[Q]=(%_ToString(ap)); -an+=ao.length; -} -} -}else{ -for(var Q=0;Q>1; -var au; -if(at==1){ -var av=%_SubString(E,A,as); -au=ak(av,A,E); -}else{ -var aw=new g(at+2); -for(var ax=0;ax>1; -this.match=ay; -this.subject=E; -} -MatchInfoCaptureWrapper.prototype.at=function(az){ -const D=this.match; -const R=D[(3+(az<<1))]; -if(R<0)return(void 0); -return %_SubString(this.subject,R,D[(3+((az<<1)+1))]); -}; -%SetForceInlineFlag(MatchInfoCaptureWrapper.prototype.at); -function ArrayCaptureWrapper(Z){ -this.length=Z.length; -this.array=Z; -} -ArrayCaptureWrapper.prototype.at=function(az){ -return this.array[az]; -}; -%SetForceInlineFlag(ArrayCaptureWrapper.prototype.at); -function RegExpReplace(z,ak){ -if(!(%_IsRegExp(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@replace",this); -} -var E=(%_ToString(z)); -var aA=this; -if(!(typeof(ak)==='function')){ -ak=(%_ToString(ak)); -if(!(%_RegExpFlags(aA)&1)){ -var D=DoRegExpExec(aA,E,0); -if(D==null){ -aA.lastIndex=0 -return E; -} -if(ak.length==0){ -return %_SubString(E,0,D[3])+ -%_SubString(E,D[4],E.length) -} -const captures=new MatchInfoCaptureWrapper(D,E); -const R=D[3]; -const S=D[4]; -const prefix=%_SubString(E,0,R); -const matched=%_SubString(E,R,S); -const suffix=%_SubString(E,S,E.length); -return prefix+ -GetSubstitution(matched,E,R,captures,ak)+ -suffix; -} -aA.lastIndex=0; -return %StringReplaceGlobalRegExpWithString( -E,aA,ak,s); -} -if((%_RegExpFlags(aA)&1)){ -return StringReplaceGlobalRegExpWithFunction(E,aA,ak); -} -return StringReplaceNonGlobalRegExpWithFunction(E,aA,ak); -} -function GetSubstitution(aB,z,aC,aD,au){ -var aE=aB.length; -var aF=z.length; -var aG=aD.length; -var aH=aC+aE; -var C=""; -var aI,aJ,aK,aL,aM,aN,aO; -var aL=%StringIndexOf(au,'$',0); -if(aL<0){ -C+=au; -return C; -} -if(aL>0)C+=%_SubString(au,0,aL); -while(true){ -aJ='$'; -aI=aL+1; -if(aI=48&&aK<=57){ -aM=(aK-48); -aN=1; -if(aI+1=48&&aL<=57){ -aO=aM*10+((aL-48)); -if(aOaI){ -C+=%_SubString(au,aI,aL); -} -} -return C; -} -function AdvanceStringIndex(z,A,V){ -var aQ=1; -if(V){ -var F=%_StringCharCodeAt(z,A); -if(F>=0xD800&&F<=0xDBFF&&z.length>A+1){ -var G=%_StringCharCodeAt(z,A+1); -if(G>=0xDC00&&G<=0xDFFF){ -aQ=2; -} -} -} -return aQ; -} -function SetAdvancedStringIndex(y,z,V){ -var aR=y.lastIndex; -y.lastIndex=aR+ -AdvanceStringIndex(z,aR,V); -} -function RegExpSubclassReplace(z,ak){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@replace",this); -} -z=(%_ToString(z)); -var J=z.length; -var aS=(typeof(ak)==='function'); -if(!aS)ak=(%_ToString(ak)); -var a=(!!(this.global)); -if(a){ -var V=(!!(this.unicode)); -this.lastIndex=0; -} -var B; -if((%_IsRegExp(this))){ -B=this.exec; -if(B===k){ -return %_Call(RegExpReplace,this,z,ak); -} -} -var aT=new g(); -var C,au; -while(true){ -C=RegExpSubclassExec(this,z,B); -B=(void 0); -if((C===null)){ -break; -}else{ -aT.push(C); -if(!a)break; -var ah=(%_ToString(C[0])); -if(ah==="")SetAdvancedStringIndex(this,z,V); -} -} -var aU=""; -var aV=0; -for(var Q=0;Q=aV){ -aU+= -%_SubString(z,aV,aC)+au; -aV=aC+aW; -} -} -if(aV>=J)return aU; -return aU+%_SubString(z,aV,J); -} -%FunctionRemovePrototype(RegExpSubclassReplace); -function RegExpSubclassSearch(z){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@search",this); -} -z=(%_ToString(z)); -var aX=this.lastIndex; -if(aX!=0)this.lastIndex=0; -var C=RegExpSubclassExec(this,z); -var aY=this.lastIndex; -if(aY!=aX)this.lastIndex=aX; -if((C===null))return-1; -return C.index; -} -%FunctionRemovePrototype(RegExpSubclassSearch); -function RegExpGetLastMatch(){ -var aZ=((s)[1]); -return %_SubString(aZ, -s[3], -s[4]); -} -function RegExpGetLastParen(){ -var J=((s)[0]); -if(J<=2)return''; -var aZ=((s)[1]); -var R=s[(3+(J-2))]; -var S=s[(3+(J-1))]; -if(R!=-1&&S!=-1){ -return %_SubString(aZ,R,S); -} -return""; -} -function RegExpGetLeftContext(){ -var ba; -var E; -ba=s[3]; -E=((s)[1]); -return %_SubString(E,0,ba); -} -function RegExpGetRightContext(){ -var ba; -var E; -ba=s[4]; -E=((s)[1]); -return %_SubString(E,ba,E.length); -} -function RegExpMakeCaptureGetter(ag){ -return function foo(){ -var A=ag*2; -if(A>=((s)[0]))return''; -var bb=s[(3+(A))]; -var bc=s[(3+(A+1))]; -if(bb==-1||bc==-1)return''; -return %_SubString(((s)[1]),bb,bc); -}; -} -function RegExpGetFlags(){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error( -124,"RegExp.prototype.flags",(%_ToString(this))); -} -var C=''; -if(this.global)C+='g'; -if(this.ignoreCase)C+='i'; -if(this.multiline)C+='m'; -if(this.unicode)C+='u'; -if(this.sticky)C+='y'; -return C; -} -function RegExpGetGlobal(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(31); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.global"); -} -return(!!((%_RegExpFlags(this)&1))); -} -%SetForceInlineFlag(RegExpGetGlobal); -function RegExpGetIgnoreCase(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(31); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.ignoreCase"); -} -return(!!((%_RegExpFlags(this)&2))); -} -function RegExpGetMultiline(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(31); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.multiline"); -} -return(!!((%_RegExpFlags(this)&4))); -} -function RegExpGetSource(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(30); -return"(?:)"; -} -throw %make_type_error(125,"RegExp.prototype.source"); -} -return(%_RegExpSource(this)); -} -function RegExpGetSticky(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(11); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.sticky"); -} -return(!!((%_RegExpFlags(this)&8))); -} -%SetForceInlineFlag(RegExpGetSticky); -function RegExpGetUnicode(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(13); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.unicode"); -} -return(!!((%_RegExpFlags(this)&16))); -} -%SetForceInlineFlag(RegExpGetUnicode); -function RegExpSpecies(){ -return this; -} -b.InstallGetter(e,o,RegExpSpecies); -b.InstallFunctions(e.prototype,2,[ -"test",RegExpSubclassTest, -"toString",RegExpToString, -"compile",RegExpCompileJS, -l,RegExpSubclassMatch, -m,RegExpSubclassReplace, -n,RegExpSubclassSearch, -p,RegExpSubclassSplit, -]); -b.InstallGetter(e.prototype,'flags',RegExpGetFlags); -b.InstallGetter(e.prototype,'global',RegExpGetGlobal); -b.InstallGetter(e.prototype,'ignoreCase',RegExpGetIgnoreCase); -b.InstallGetter(e.prototype,'multiline',RegExpGetMultiline); -b.InstallGetter(e.prototype,'source',RegExpGetSource); -b.InstallGetter(e.prototype,'sticky',RegExpGetSticky); -b.InstallGetter(e.prototype,'unicode',RegExpGetUnicode); -var bd=function(){ -var be=((s)[2]); -return(be===(void 0))?"":be; -}; -var bf=function(z){ -((s)[2])=(%_ToString(z)); -}; -%OptimizeObjectForAddingMultipleProperties(e,22); -b.InstallGetterSetter(e,'input',bd,bf, -2); -b.InstallGetterSetter(e,'$_',bd,bf, -2); -var bg=function(bh){}; -b.InstallGetterSetter(e,'lastMatch',RegExpGetLastMatch, -bg,2); -b.InstallGetterSetter(e,'$&',RegExpGetLastMatch,bg, -2); -b.InstallGetterSetter(e,'lastParen',RegExpGetLastParen, -bg,2); -b.InstallGetterSetter(e,'$+',RegExpGetLastParen,bg, -2); -b.InstallGetterSetter(e,'leftContext',RegExpGetLeftContext, -bg,2); -b.InstallGetterSetter(e,'$`',RegExpGetLeftContext,bg, -2); -b.InstallGetterSetter(e,'rightContext',RegExpGetRightContext, -bg,2); -b.InstallGetterSetter(e,"$'",RegExpGetRightContext,bg, -2); -for(var Q=1;Q<10;++Q){ -b.InstallGetterSetter(e,'$'+Q,RegExpMakeCaptureGetter(Q), -bg,2); -} -%ToFastProperties(e); -%InstallToContext(["regexp_last_match_info",s]); -var bi={ -0:2, -1:"", -2:(void 0), -3:0, -4:0 -}; -function InternalRegExpMatch(y,E){ -var N=%_RegExpExec(y,E,0,bi); -if(!(N===null)){ -var bj=((N)[0])>>1; -var R=N[3]; -var S=N[4]; -var F=%_SubString(E,R,S); -var C=%_RegExpConstructResult(bj,R,E); -C[0]=F; -if(bj==1)return C; -var ax=3+2; -for(var Q=1;Q%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 1!==0){ -throw %make_range_error(169, -"start offset","Uint8Array",1); -} -} -var ah; -if((ae===(void 0))){ -if(af % 1!==0){ -throw %make_range_error(169, -"byte length","Uint8Array",1); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint8Array",1); -} -}else{ -ah=ae*1; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,1,ac,ag,ah,true); -} -function Uint8ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*1; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,1,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,1,null,0,aj,true); -} -} -function Uint8ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*1; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,1,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,1,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 1!==0){ -throw %make_range_error(169, -"start offset","Int8Array",1); -} -} -var ah; -if((ae===(void 0))){ -if(af % 1!==0){ -throw %make_range_error(169, -"byte length","Int8Array",1); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Int8Array",1); -} -}else{ -ah=ae*1; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,2,ac,ag,ah,true); -} -function Int8ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*1; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,2,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,2,null,0,aj,true); -} -} -function Int8ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*1; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,2,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,2,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 2!==0){ -throw %make_range_error(169, -"start offset","Uint16Array",2); -} -} -var ah; -if((ae===(void 0))){ -if(af % 2!==0){ -throw %make_range_error(169, -"byte length","Uint16Array",2); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint16Array",2); -} -}else{ -ah=ae*2; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,3,ac,ag,ah,true); -} -function Uint16ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*2; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,3,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,3,null,0,aj,true); -} -} -function Uint16ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*2; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,3,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,3,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 2!==0){ -throw %make_range_error(169, -"start offset","Int16Array",2); -} -} -var ah; -if((ae===(void 0))){ -if(af % 2!==0){ -throw %make_range_error(169, -"byte length","Int16Array",2); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Int16Array",2); -} -}else{ -ah=ae*2; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,4,ac,ag,ah,true); -} -function Int16ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*2; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,4,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,4,null,0,aj,true); -} -} -function Int16ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*2; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,4,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,4,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 4!==0){ -throw %make_range_error(169, -"start offset","Uint32Array",4); -} -} -var ah; -if((ae===(void 0))){ -if(af % 4!==0){ -throw %make_range_error(169, -"byte length","Uint32Array",4); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint32Array",4); -} -}else{ -ah=ae*4; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,5,ac,ag,ah,true); -} -function Uint32ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*4; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,5,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,5,null,0,aj,true); -} -} -function Uint32ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*4; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,5,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,5,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 4!==0){ -throw %make_range_error(169, -"start offset","Int32Array",4); -} -} -var ah; -if((ae===(void 0))){ -if(af % 4!==0){ -throw %make_range_error(169, -"byte length","Int32Array",4); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Int32Array",4); -} -}else{ -ah=ae*4; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,6,ac,ag,ah,true); -} -function Int32ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*4; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,6,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,6,null,0,aj,true); -} -} -function Int32ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*4; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,6,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,6,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 4!==0){ -throw %make_range_error(169, -"start offset","Float32Array",4); -} -} -var ah; -if((ae===(void 0))){ -if(af % 4!==0){ -throw %make_range_error(169, -"byte length","Float32Array",4); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Float32Array",4); -} -}else{ -ah=ae*4; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,7,ac,ag,ah,true); -} -function Float32ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*4; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,7,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,7,null,0,aj,true); -} -} -function Float32ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*4; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,7,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,7,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 8!==0){ -throw %make_range_error(169, -"start offset","Float64Array",8); -} -} -var ah; -if((ae===(void 0))){ -if(af % 8!==0){ -throw %make_range_error(169, -"byte length","Float64Array",8); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Float64Array",8); -} -}else{ -ah=ae*8; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,8,ac,ag,ah,true); -} -function Float64ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*8; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,8,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,8,null,0,aj,true); -} -} -function Float64ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*8; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,8,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,8,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 1!==0){ -throw %make_range_error(169, -"start offset","Uint8ClampedArray",1); -} -} -var ah; -if((ae===(void 0))){ -if(af % 1!==0){ -throw %make_range_error(169, -"byte length","Uint8ClampedArray",1); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint8ClampedArray",1); -} -}else{ -ah=ae*1; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,9,ac,ag,ah,true); -} -function Uint8ClampedArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*1; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,9,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,9,null,0,aj,true); -} -} -function Uint8ClampedArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*1; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,9,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,9,ak,ai); -} -if(!al){ -for(var am=0;am0){ -for(var am=0;am=aL&&aJ>=aK; -aM--){ -aE[ag+aM]=aF[aM]; -aJ-=aI; -aK-=aH; -} -return aM; -} -var aM=CopyRightPart(); -var aN=new g(aM+1-aL); -for(var am=aL;am<=aM;am++){ -aN[am-aL]=aF[am]; -} -for(am=aL;am<=aM;am++){ -aE[ag+am]=aN[am-aL]; -} -} -function TypedArraySet(ab,ag){ -var aO=(ag===(void 0))?0:(%_ToInteger(ag)); -if(aO<0)throw %make_type_error(182); -if(aO>%_MaxSmi()){ -throw %make_range_error(183); -} -switch(%TypedArraySetFastCases(this,ab,aO)){ -case 0: -return; -case 1: -TypedArraySetFromOverlappingTypedArray(this,ab,aO); -return; -case 2: -TypedArraySetFromArrayLike(this, -ab,%_TypedArrayGetLength(ab),aO); -return; -case 3: -var ai=ab.length; -if((ai===(void 0))){ -if((typeof(ab)==='number')){ -throw %make_type_error(47); -} -return; -} -ai=(%_ToLength(ai)); -if(aO+ai>%_TypedArrayGetLength(this)){ -throw %make_range_error(183); -} -TypedArraySetFromArrayLike(this,ab,ai,aO); -return; -} -} -%FunctionSetLength(TypedArraySet,1); -function TypedArrayGetToStringTag(){ -if(!(%_IsTypedArray(this)))return; -var aP=%_ClassOf(this); -if((aP===(void 0)))return; -return aP; -} -function TypedArrayCopyWithin(aE,aQ,ay){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -return k(aE,aQ,ay,this,ae); -} -%FunctionSetLength(TypedArrayCopyWithin,2); -function TypedArrayEvery(aR,aS){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -return l(aR,aS,this,ae); -} -%FunctionSetLength(TypedArrayEvery,1); -function TypedArrayForEach(aR,aS){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -q(aR,aS,this,ae); -} -%FunctionSetLength(TypedArrayForEach,1); -function TypedArrayFill(as,aQ,ay){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -return m(as,aQ,ay,this,ae); -} -%FunctionSetLength(TypedArrayFill,1); -function TypedArrayFilter(aR,aT){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -if(!(typeof(aR)==='function'))throw %make_type_error(15,aR); -var aU=new x(); -n(aR,aT,this,ae,aU); -var aV=aU.length; -var aW=TypedArraySpeciesCreate(this,aV); -for(var am=0;amaZ){ -return 1; -}else if((!%_IsSmi(%IS_VAR(aY))&&!(aY==aY))&&(!%_IsSmi(%IS_VAR(aZ))&&!(aZ==aZ))){ -return(!%_IsSmi(%IS_VAR(aZ))&&!(aZ==aZ))?0:1; -}else if((!%_IsSmi(%IS_VAR(aY))&&!(aY==aY))){ -return 1; -} -return 0; -} -function TypedArraySort(ba){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -if((ba===(void 0))){ -ba=TypedArrayComparefn; -} -return v(this,ae,ba); -} -function TypedArrayIndexOf(bb,bc){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -if(ae===0)return-1; -if(!(typeof(bb)==='number'))return-1; -var bd=(%_ToInteger(bc)); -var be; -if(bd===0){ -be=0; -}else if(bd>0){ -be=bd; -}else{ -be=ae+bd; -if(be<0){ -be=0; -} -} -while(be=0){ -if(ae<=bd){ -be=ae-1; -}else if(bd===0){ -be=0; -}else{ -be=bd; -} -}else{ -be=ae+bd; -} -while(be>=0){ -var bf=this[be]; -if(bb===bf){ -return be; -} ---be; -} -return-1; -} -%FunctionSetLength(TypedArrayLastIndexOf,1); -function TypedArrayMap(aR,aT){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -var aU=TypedArraySpeciesCreate(this,ae); -if(!(typeof(aR)==='function'))throw %make_type_error(15,aR); -for(var am=0;am=0){ -be=bd; -}else{ -be=ae+bd; -if(be<0){ -be=0; -} -} -while(be>>12); -n=n+(n<<2); -n=n^(n>>>4); -n=(n*2057)|0; -n=n^(n>>>16); -return n&0x3fffffff; -} -%SetForceInlineFlag(ComputeIntegerHash); -function GetExistingHash(q){ -if(%_IsSmi(q)){ -return ComputeIntegerHash(q,0); -} -if((typeof(q)==='string')){ -var v=%_StringGetRawHashField(q); -if((v&1)===0){ -return v>>>2; -} -}else if((%_IsJSReceiver(q))&&!(%_IsJSProxy(q))&&!(%_ClassOf(q)==='global')){ -var n=(q[f]); -return n; -} -return %GenericHash(q); -} -%SetForceInlineFlag(GetExistingHash); -function GetHash(q){ -var n=GetExistingHash(q); -if((n===(void 0))){ -n=(g()*0x40000000)|0; -if(n===0)n=1; -(q[f]=n); -} -return n; -} -%SetForceInlineFlag(GetHash); -function SetConstructor(w){ -if((new.target===(void 0))){ -throw %make_type_error(27,"Set"); -} -%_SetInitialize(this); -if(!(w==null)){ -var x=this.add; -if(!(typeof(x)==='function')){ -throw %make_type_error(87,x,'add',this); -} -for(var y of w){ -%_Call(x,this,y); -} -} -} -function SetAdd(q){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45,'Set.prototype.add',this); -} -if(q===0){ -q=0; -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -if(SetFindEntry(m,o,q,n)!==-1)return this; -var z=((%_FixedArrayGet(m,(1)|0))); -var A=((%_FixedArrayGet(m,(2)|0))); -var B=o<<1; -if((z+A)>=B){ -%SetGrow(this); -m=%_JSCollectionGetTable(this); -o=((%_FixedArrayGet(m,(0)|0))); -z=((%_FixedArrayGet(m,(1)|0))); -A=((%_FixedArrayGet(m,(2)|0))); -} -var r=z+A; -var C=(3+(o)+((r)<<1)); -var p=(n&((o)-1)); -var D=((%_FixedArrayGet(m,(3+(p))|0))); -((%_FixedArraySet(m,(3+(p))|0,r))); -(((%_FixedArraySet(m,(1)|0,(z+1)|0)))); -(%_FixedArraySet(m,(C)|0,q)); -((%_FixedArraySet(m,(C+1)|0,(D)|0))); -return this; -} -function SetHas(q){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45,'Set.prototype.has',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetExistingHash(q); -if((n===(void 0)))return false; -return SetFindEntry(m,o,q,n)!==-1; -} -function SetDelete(q){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.delete',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetExistingHash(q); -if((n===(void 0)))return false; -var r=SetFindEntry(m,o,q,n); -if(r===-1)return false; -var z=((%_FixedArrayGet(m,(1)|0)))-1; -var A=((%_FixedArrayGet(m,(2)|0)))+1; -var C=(3+(o)+((r)<<1)); -(%_FixedArraySet(m,(C)|0,%_TheHole())); -(((%_FixedArraySet(m,(1)|0,(z)|0)))); -(((%_FixedArraySet(m,(2)|0,(A)|0)))); -if(z<(o>>>1))%SetShrink(this); -return true; -} -function SetGetSize(){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.size',this); -} -var m=%_JSCollectionGetTable(this); -return((%_FixedArrayGet(m,(1)|0))); -} -function SetClearJS(){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.clear',this); -} -%_SetClear(this); -} -function SetForEach(E,F){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.forEach',this); -} -if(!(typeof(E)==='function'))throw %make_type_error(15,E); -var G=new i(this,2); -var q; -var H=[(void 0)]; -while(%SetIteratorNext(G,H)){ -q=H[0]; -%_Call(E,F,q,q,this); -} -} -function SetSpecies(){ -return this; -} -%SetCode(e,SetConstructor); -%FunctionSetLength(e,0); -%FunctionSetPrototype(e,new d()); -%AddNamedProperty(e.prototype,"constructor",e,2); -%AddNamedProperty(e.prototype,k,"Set", -2|1); -%FunctionSetLength(SetForEach,1); -b.InstallGetter(e,j,SetSpecies); -b.InstallGetter(e.prototype,"size",SetGetSize); -b.InstallFunctions(e.prototype,2,[ -"add",SetAdd, -"has",SetHas, -"delete",SetDelete, -"clear",SetClearJS, -"forEach",SetForEach -]); -function MapConstructor(w){ -if((new.target===(void 0))){ -throw %make_type_error(27,"Map"); -} -%_MapInitialize(this); -if(!(w==null)){ -var x=this.set; -if(!(typeof(x)==='function')){ -throw %make_type_error(87,x,'set',this); -} -for(var I of w){ -if(!(%_IsJSReceiver(I))){ -throw %make_type_error(52,I); -} -%_Call(x,this,I[0],I[1]); -} -} -} -function MapGet(q){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.get',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetExistingHash(q); -if((n===(void 0)))return(void 0); -var r=MapFindEntry(m,o,q,n); -if(r===-1)return(void 0); -return((%_FixedArrayGet(m,((3+(o)+((r)*3))+1)|0))); -} -function MapSet(q,y){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.set',this); -} -if(q===0){ -q=0; -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -var r=MapFindEntry(m,o,q,n); -if(r!==-1){ -var J=(3+(o)+((r)*3)); -(%_FixedArraySet(m,(J+1)|0,y)); -return this; -} -var z=((%_FixedArrayGet(m,(1)|0))); -var A=((%_FixedArrayGet(m,(2)|0))); -var B=o<<1; -if((z+A)>=B){ -%MapGrow(this); -m=%_JSCollectionGetTable(this); -o=((%_FixedArrayGet(m,(0)|0))); -z=((%_FixedArrayGet(m,(1)|0))); -A=((%_FixedArrayGet(m,(2)|0))); -} -r=z+A; -var C=(3+(o)+((r)*3)); -var p=(n&((o)-1)); -var D=((%_FixedArrayGet(m,(3+(p))|0))); -((%_FixedArraySet(m,(3+(p))|0,r))); -(((%_FixedArraySet(m,(1)|0,(z+1)|0)))); -(%_FixedArraySet(m,(C)|0,q)); -(%_FixedArraySet(m,(C+1)|0,y)); -(%_FixedArraySet(m,(C+2)|0,D)); -return this; -} -function MapHas(q){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.has',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -return MapFindEntry(m,o,q,n)!==-1; -} -function MapDelete(q){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.delete',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -var r=MapFindEntry(m,o,q,n); -if(r===-1)return false; -var z=((%_FixedArrayGet(m,(1)|0)))-1; -var A=((%_FixedArrayGet(m,(2)|0)))+1; -var C=(3+(o)+((r)*3)); -(%_FixedArraySet(m,(C)|0,%_TheHole())); -(%_FixedArraySet(m,(C+1)|0,%_TheHole())); -(((%_FixedArraySet(m,(1)|0,(z)|0)))); -(((%_FixedArraySet(m,(2)|0,(A)|0)))); -if(z<(o>>>1))%MapShrink(this); -return true; -} -function MapGetSize(){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.size',this); -} -var m=%_JSCollectionGetTable(this); -return((%_FixedArrayGet(m,(1)|0))); -} -function MapClearJS(){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.clear',this); -} -%_MapClear(this); -} -function MapForEach(E,F){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.forEach',this); -} -if(!(typeof(E)==='function'))throw %make_type_error(15,E); -var G=new h(this,3); -var H=[(void 0),(void 0)]; -while(%MapIteratorNext(G,H)){ -%_Call(E,F,H[1],H[0],this); -} -} -function MapSpecies(){ -return this; -} -%SetCode(c,MapConstructor); -%FunctionSetLength(c,0); -%FunctionSetPrototype(c,new d()); -%AddNamedProperty(c.prototype,"constructor",c,2); -%AddNamedProperty( -c.prototype,k,"Map",2|1); -%FunctionSetLength(MapForEach,1); -b.InstallGetter(c,j,MapSpecies); -b.InstallGetter(c.prototype,"size",MapGetSize); -b.InstallFunctions(c.prototype,2,[ -"get",MapGet, -"set",MapSet, -"has",MapHas, -"delete",MapDelete, -"clear",MapClearJS, -"forEach",MapForEach -]); -%InstallToContext([ -"map_get",MapGet, -"map_set",MapSet, -"map_has",MapHas, -"map_delete",MapDelete, -"set_add",SetAdd, -"set_has",SetHas, -"set_delete",SetDelete, -]); -b.Export(function(K){ -K.GetExistingHash=GetExistingHash; -K.GetHash=GetHash; -}); -}) - -{ -if(x===true)return; -x=true; -ResolvePromise(v,value); -}; -var z=reason=>{ -if(x===true)return; -x=true; -RejectPromise(v,reason,w); -}; -return{ -__proto__:null, -resolve:y, -reject:z -}; -} -var A=function Promise(B){ -if(B===m){ -return %_NewObject(A,new.target); -} -if((new.target===(void 0)))throw %make_type_error(66,this); -if(!(typeof(B)==='function')){ -throw %make_type_error(128,B); -} -var v=PromiseInit(%_NewObject(A,new.target)); -var C=CreateResolvingFunctions(v,true); -var D=(%_DebugIsActive()!=0); -try{ -if(D)%DebugPushPromise(v); -B(C.resolve,C.reject); -}%catch(e){ -%_Call(C.reject,(void 0),e); -}finally{ -if(D)%DebugPopPromise(); -} -return v; -} -function PromiseSet(v,E,F){ -(v[n]=E); -(v[o]=F); -(v[j]=(void 0)); -(v[i]=(void 0)); -(v[k]=(void 0)); -return v; -} -function PromiseCreateAndSet(E,F){ -var v=new A(m); -if((%_DebugIsActive()!=0))PromiseSet(v,kPending,(void 0)); -return PromiseSet(v,E,F); -} -function PromiseInit(v){ -return PromiseSet(v,kPending,(void 0)); -} -function FulfillPromise(v,E,F,G){ -if((v[n])===kPending){ -var H=(v[G]); -if(!(H===(void 0))){ -var I=(v[k]); -PromiseEnqueue(F,H,I,E); -} -PromiseSet(v,E,F); -} -} -function PromiseHandle(F,J,K){ -var D=(%_DebugIsActive()!=0); -try{ -if(D)%DebugPushPromise(K.promise); -var L=J(F); -K.resolve(L); -}%catch(exception){ -try{K.reject(exception);}catch(e){} -}finally{ -if(D)%DebugPopPromise(); -} -} -function PromiseEnqueue(F,H,I,E){ -var M,N,O=(%_DebugIsActive()!=0); -%EnqueueMicrotask(function(){ -if(O){ -%DebugAsyncTaskEvent({type:"willHandle",id:M,name:N}); -} -if((%_IsArray(H))){ -for(var P=0;P{ -if(!(L.resolve===(void 0))||!(L.reject===(void 0))) -throw %make_type_error(84); -L.resolve=y; -L.reject=z; -}); -if(!(typeof(L.resolve)==='function')||!(typeof(L.reject)==='function')) -throw %make_type_error(85); -return L; -} -function PromiseReject(X){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,PromiseResolve); -} -if(this===A){ -var v=PromiseCreateAndSet(kRejected,X); -%PromiseRejectEventFromStack(v,X); -return v; -}else{ -var ag=NewPromiseCapability(this,true); -%_Call(ag.reject,(void 0),X); -return ag.promise; -} -} -function PerformPromiseThen(v,Q,R,ah){ -if(!(typeof(Q)==='function'))Q=PromiseIdResolveHandler; -if(!(typeof(R)==='function'))R=PromiseIdRejectHandler; -var E=(v[n]); -switch(E){ -case kPending: -PromiseAttachCallbacks(v,ah,Q,R); -break; -case kFulfilled: -PromiseEnqueue((v[o]), -Q,ah,kFulfilled); -break; -case kRejected: -if(!(!(v[h]===(void 0)))){ -%PromiseRevokeReject(v); -} -PromiseEnqueue((v[o]), -R,ah,kRejected); -break; -} -(v[h]=true); -return ah.promise; -} -function PromiseThen(Q,R){ -var E=(this[n]); -if((E===(void 0))){ -throw %make_type_error(66,this); -} -var ai=p(this,A); -var ah=NewPromiseCapability(ai,false); -return PerformPromiseThen(this,Q,R,ah); -} -function PromiseCatch(R){ -return this.then((void 0),R); -} -function PromiseResolve(W){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,PromiseResolve); -} -if(IsPromise(W)&&W.constructor===this)return W; -if(this===A){ -var v=PromiseCreate(); -var aj=ResolvePromise(v,W); -return v; -} -var ag=NewPromiseCapability(this,true); -var aj=%_Call(ag.resolve,(void 0),W); -return ag.promise; -} -function PromiseAll(ak){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,"Promise.all"); -} -var K=NewPromiseCapability(this,false); -var al=new d(); -var am; -var O=(%_DebugIsActive()!=0); -if(O){ -(K.reject[g]=true); -} -function CreateResolveElementFunction(an,ao,ag){ -var ap=false; -return(W)=>{ -if(ap===true)return; -ap=true; -ao[an]=W; -if(--am===0){ -var aq=[]; -%MoveArrayContents(ao,aq); -%_Call(ag.resolve,(void 0),aq); -} -}; -} -try{ -var P=0; -am=1; -for(var F of ak){ -var ar=this.resolve(F); -++am; -var as=ar.then( -CreateResolveElementFunction(P,al,K), -K.reject); -if(O&&IsPromise(as)){ -(as[f]=K.promise); -} -++P; -} -if(--am===0){ -var aq=[]; -%MoveArrayContents(al,aq); -%_Call(K.resolve,(void 0),aq); -} -}catch(e){ -%_Call(K.reject,(void 0),e); -} -return K.promise; -} -function PromiseRace(ak){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,PromiseRace); -} -var K=NewPromiseCapability(this,false); -var O=(%_DebugIsActive()!=0); -if(O){ -(K.reject[g]=true); -} -try{ -for(var F of ak){ -var as=this.resolve(F).then(K.resolve, -K.reject); -if(O&&IsPromise(as)){ -(as[f]=K.promise); -} -} -}catch(e){ -K.reject(e) -} -return K.promise; -} -function PromiseHasUserDefinedRejectHandlerCheck(J,K){ -if((J[g])){ -return PromiseHasUserDefinedRejectHandlerRecursive(K.promise); -} -return true; -} -function PromiseHasUserDefinedRejectHandlerRecursive(v){ -if((v[l]))return true; -var at=(v[f]); -if(at&& -PromiseHasUserDefinedRejectHandlerRecursive(at)){ -return true; -} -var au=(v[i]); -var I=(v[k]); -if((au===(void 0)))return false; -if(!(%_IsArray(au))){ -return PromiseHasUserDefinedRejectHandlerCheck(au,I); -} -for(var P=0;P>>0); -if(q>=s){ -(n[e]=(void 0)); -}else{ -(n[d]=q+1); -if(r==2){ -o=k[q]; -}else if(r==3){ -o=[q,k[q]]; -}else{ -o=q; -} -p=false; -} -} -return %_CreateIterResultObject(o,p); -} -function ArrayEntries(){ -return CreateArrayIterator(this,3); -} -function ArrayValues(){ -return CreateArrayIterator(this,2); -} -function ArrayKeys(){ -return CreateArrayIterator(this,1); -} -function TypedArrayEntries(){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -return %_Call(ArrayEntries,this); -} -function TypedArrayValues(){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -return %_Call(ArrayValues,this); -} -function TypedArrayKeys(){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -return %_Call(ArrayKeys,this); -} -%FunctionSetPrototype(ArrayIterator,{__proto__:g}); -%FunctionSetInstanceClassName(ArrayIterator,'Array Iterator'); -b.InstallFunctions(ArrayIterator.prototype,2,[ -'next',ArrayIteratorNext -]); -b.SetFunctionName(ArrayIteratorIterator,h); -%AddNamedProperty(ArrayIterator.prototype,i, -"Array Iterator",1|2); -b.InstallFunctions(f.prototype,2,[ -'entries',ArrayEntries, -'keys',ArrayKeys -]); -b.SetFunctionName(ArrayValues,'values'); -%FunctionRemovePrototype(ArrayValues); -%SetNativeFlag(ArrayValues); -%AddNamedProperty(f.prototype,h,ArrayValues, -2); -b.InstallFunctions(j.prototype,2,[ -'entries',TypedArrayEntries, -'keys',TypedArrayKeys, -'values',TypedArrayValues -]); -%AddNamedProperty(j.prototype, -h,TypedArrayValues,2); -b.Export(function(t){ -t.ArrayValues=ArrayValues; -}); -%InstallToContext(["array_values_iterator",ArrayValues]); -}) - -$templates -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.Map; -var d=b.InternalArray; -var e=new c; -var f=c.prototype.get; -var g=c.prototype.set; -function SameCallSiteElements(h,i){ -var j=h.length; -var i=i.raw; -if(j!==i.length)return false; -for(var k=0;k%JSProxyRevoke(f)}; -} -b.InstallFunctions(c,2,[ -"revocable",ProxyCreateRevocable -]); -}) - -,async-await5 -(function(a,b,c){ -"use strict"; -%CheckIsBootstrapping(); -var d; -var e; -var f; -var g; -var h; -var i; -var j; -var k; -var l; -var m; -b.Import(function(n){ -d=n.AsyncFunctionNext; -e=n.AsyncFunctionThrow; -f=n.GlobalPromise; -g=n.IsPromise; -h=n.NewPromiseCapability; -i=n.PerformPromiseThen; -j=n.PromiseCreate; -k=n.PromiseNextMicrotaskID; -l=n.RejectPromise; -m=n.ResolvePromise; -}); -var o= -b.ImportNow("promise_async_stack_id_symbol"); -var p= -b.ImportNow("promise_handled_by_symbol"); -var q= -b.ImportNow("promise_forwarding_handler_symbol"); -var r= -b.ImportNow("promise_handled_hint_symbol"); -var s= -b.ImportNow("promise_has_handler_symbol"); -function PromiseCastResolved(t){ -if(g(t)){ -return t; -}else{ -var u=j(); -m(u,t); -return u; -} -} -function AsyncFunctionAwait(v,w,x){ -var u=PromiseCastResolved(w); -var y=sentValue=>{ -%_Call(d,v,sentValue); -return; -}; -var z=sentError=>{ -%_Call(e,v,sentError); -return; -} -var A=h(f,false); -(A.promise[s]=true); -if((%_DebugIsActive()!=0)){ -if(g(w)){ -(z[q]=true); -} -(A.promise[p]=x); -} -i(u,y,z,A); -} -function AsyncFunctionAwaitUncaught(v,w,x){ -AsyncFunctionAwait(v,w,x); -} -function AsyncFunctionAwaitCaught(v,w,x){ -if((%_DebugIsActive()!=0)&&g(w)){ -(w[r]=true); -} -AsyncFunctionAwait(v,w,x); -} -function RejectPromiseNoDebugEvent(u,B){ -return l(u,B,false); -} -function AsyncFunctionPromiseCreate(){ -var u=j(); -if((%_DebugIsActive()!=0)){ -%DebugPushPromise(u); -var C=k(); -(u[o]=C); -%DebugAsyncTaskEvent({ -type:"enqueueRecurring", -id:C, -name:"async function", -}); -} -return u; -} -function AsyncFunctionPromiseRelease(u){ -if((%_DebugIsActive()!=0)){ -var C=(u[o]); -%DebugAsyncTaskEvent({ -type:"cancel", -id:C, -name:"async function", -}); -%DebugPopPromise(); -} -} -%InstallToContext([ -"async_function_await_caught",AsyncFunctionAwaitCaught, -"async_function_await_uncaught",AsyncFunctionAwaitUncaught, -"reject_promise_no_debug_event",RejectPromiseNoDebugEvent, -"async_function_promise_create",AsyncFunctionPromiseCreate, -"async_function_promise_release",AsyncFunctionPromiseRelease, -]); -}) - -i18næ -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c; -var d; -var e=a.Date; -var f=a.Number; -var g=a.RegExp; -var h=a.String; -var i=b.InstallFunctions; -var j=b.InstallGetter; -var k=b.InternalArray; -var l; -var m -var n=b.ImportNow("ObjectHasOwnProperty"); -var o=b.OverrideFunction; -var p=b.ImportNow("intl_pattern_symbol"); -var q=b.ImportNow("intl_resolved_symbol"); -var r=b.SetFunctionName; -var s; -var t=h.prototype.substr; -var u=h.prototype.substring; -b.Import(function(v){ -c=v.ArrayJoin; -d=v.ArrayPush; -l=v.InternalRegExpMatch; -m=v.InternalRegExpReplace; -s=v.StringIndexOf; -}); -function InstallFunction(w,x,y){ -i(w,2,[x,y]); -} -function InstallConstructor(w,x,y){ -%CheckIsBootstrapping(); -r(y,x); -%AddNamedProperty(w,x,y,2); -%SetNativeFlag(y); -%ToFastProperties(w); -} -function AddBoundMethod(z,A,B,C,D){ -%CheckIsBootstrapping(); -var E=%CreatePrivateSymbol(A); -var F=(0,(function(){ -if(!%IsInitializedIntlObjectOfType(this,D)){ -throw %make_type_error(54,A); -} -if((this[E]===(void 0))){ -var G; -if((C===(void 0))||C===2){ -G=(0,((x,y)=>B(this,x,y))); -}else if(C===1){ -G=(0,(x=>B(this,x))); -}else{ -G=(0,((...args)=>{ -if(args.length>0){ -return B(this,args[0]); -}else{ -return B(this); -} -})); -} -%SetNativeFlag(G); -this[E]=G; -} -return this[E]; -})); -%FunctionRemovePrototype(F); -%DefineGetterPropertyUnchecked(z.prototype,A,F,2); -%SetNativeFlag(F); -} -var H={}; -%AddNamedProperty(a,"Intl",H,2); -var I={ -'collator':(void 0), -'numberformat':(void 0), -'dateformat':(void 0), -'breakiterator':(void 0) -}; -var J=(void 0); -function GetDefaultICULocaleJS(){ -if((J===(void 0))){ -J=%GetDefaultICULocale(); -} -return J; -} -var K=(void 0); -function GetUnicodeExtensionRE(){ -if(((void 0)===(void 0))){ -K=new g('-u(-[a-z0-9]{2,8})+','g'); -} -return K; -} -var L=(void 0); -function GetAnyExtensionRE(){ -if((L===(void 0))){ -L=new g('-[a-z0-9]{1}-.*','g'); -} -return L; -} -var M=(void 0); -function GetQuotedStringRE(){ -if((M===(void 0))){ -M=new g("'[^']+'",'g'); -} -return M; -} -var N=(void 0); -function GetServiceRE(){ -if((N===(void 0))){ -N= -new g('^(collator|numberformat|dateformat|breakiterator)$'); -} -return N; -} -var O=(void 0); -function GetLanguageTagRE(){ -if((O===(void 0))){ -BuildLanguageTagREs(); -} -return O; -} -var P=(void 0); -function GetLanguageVariantRE(){ -if((P===(void 0))){ -BuildLanguageTagREs(); -} -return P; -} -var Q=(void 0); -function GetLanguageSingletonRE(){ -if((Q===(void 0))){ -BuildLanguageTagREs(); -} -return Q; -} -var R=(void 0); -function GetTimezoneNameCheckRE(){ -if((R===(void 0))){ -R=new g( -'^([A-Za-z]+)/([A-Za-z_-]+)((?:\/[A-Za-z_-]+)+)*$'); -} -return R; -} -var S=(void 0); -function GetTimezoneNameLocationPartRE(){ -if((S===(void 0))){ -S= -new g('^([A-Za-z]+)((?:[_-][A-Za-z]+)+)*$'); -} -return S; -} -function supportedLocalesOf(T,U,V){ -if((l(GetServiceRE(),T)===null)){ -throw %make_error(7,T); -} -if((V===(void 0))){ -V={}; -}else{ -V=(%_ToObject(V)); -} -var W=V.localeMatcher; -if(!(W===(void 0))){ -W=(%_ToString(W)); -if(W!=='lookup'&&W!=='best fit'){ -throw %make_range_error(175,W); -} -}else{ -W='best fit'; -} -var X=initializeLocaleList(U); -if((I[T]===(void 0))){ -I[T]=getAvailableLocalesOf(T); -} -if(W==='best fit'){ -return initializeLocaleList(bestFitSupportedLocalesOf( -X,I[T])); -} -return initializeLocaleList(lookupSupportedLocalesOf( -X,I[T])); -} -function lookupSupportedLocalesOf(X,Y){ -var Z=new k(); -for(var aa=0;aa=3&&C<=8&&!(ao===(void 0))){ -if((ai===(void 0))){ -ai=ap; -}else{ -ai=ai+"-"+ap; -} -}else{ -return{}; -} -} -if(!(ao===(void 0))&&!(ao in an)){ -an[ao]=ai; -} -return an; -} -function setOptions(aq,an,ar,ae,as){ -var al=''; -var at=function updateExtension(ao,ai){ -return'-'+ao+'-'+(%_ToString(ai)); -} -var au=function updateProperty(af,D,ai){ -if(D==='boolean'&&(typeof ai==='string')){ -ai=(ai==='true')?true:false; -} -if(!(af===(void 0))){ -defineWEProperty(as,af,ai); -} -} -for(var ao in ar){ -if((%_Call(n,ar,ao))){ -var ai=(void 0); -var av=ar[ao]; -if(!(av.property===(void 0))){ -ai=ae(av.property,av.type,av.values); -} -if(!(ai===(void 0))){ -au(av.property,av.type,ai); -al+=at(ao,ai); -continue; -} -if((%_Call(n,an,ao))){ -ai=an[ao]; -if(!(ai===(void 0))){ -au(av.property,av.type,ai); -al+=at(ao,ai); -}else if(av.type==='boolean'){ -au(av.property,av.type,true); -al+=at(ao,true); -} -} -} -} -return al===''?'':'-u'+al; -} -function freezeArray(aw){ -var ax=[]; -var ay=aw.length; -for(var aa=0;aabw){ -throw %make_range_error(178,af); -} -return %math_floor(ai); -} -return bx; -} -var by={ -get(){ -%IncrementUseCounter(15); -return this[p]; -}, -set(ai){ -this[p]=ai; -} -}; -function initializeNumberFormat(bz,U,V){ -if(%IsInitializedIntlObject(bz)){ -throw %make_type_error(126,"NumberFormat"); -} -if((V===(void 0))){ -V={}; -} -var ae=getGetOption(V,'numberformat'); -var ab=resolveLocale('numberformat',U,V); -var bk={}; -defineWEProperty(bk,'style',ae( -'style','string',['decimal','percent','currency'],'decimal')); -var bu=ae('currency','string'); -if(!(bu===(void 0))&&!isWellFormedCurrencyCode(bu)){ -throw %make_range_error(159,bu); -} -if(bk.style==='currency'&&(bu===(void 0))){ -throw %make_type_error(29); -} -var bA=ae( -'currencyDisplay','string',['code','symbol','name'],'symbol'); -if(bk.style==='currency'){ -defineWEProperty(bk,'currency',%StringToUpperCase(bu)); -defineWEProperty(bk,'currencyDisplay',bA); -} -var bB=getNumberOption(V,'minimumIntegerDigits',1,21,1); -defineWEProperty(bk,'minimumIntegerDigits',bB); -var bC=V['minimumFractionDigits']; -var bD=V['maximumFractionDigits']; -if(!(bC===(void 0))||bk.style!=='currency'){ -bC=getNumberOption(V,'minimumFractionDigits',0,20,0); -defineWEProperty(bk,'minimumFractionDigits',bC); -} -if(!(bD===(void 0))||bk.style!=='currency'){ -var bE=bk.style==='percent'?0:3; -bC=(bC===(void 0))?0:bC; -var bF=(bC>bE)?bC:bE; -bD=getNumberOption(V,'maximumFractionDigits',bC,20,bF); -defineWEProperty(bk,'maximumFractionDigits',bD); -} -var bG=V['minimumSignificantDigits']; -var bH=V['maximumSignificantDigits']; -if(!(bG===(void 0))||!(bH===(void 0))){ -bG=getNumberOption(V,'minimumSignificantDigits',1,21,0); -defineWEProperty(bk,'minimumSignificantDigits',bG); -bH=getNumberOption(V,'maximumSignificantDigits',bG,21,21); -defineWEProperty(bk,'maximumSignificantDigits',bH); -} -defineWEProperty(bk,'useGrouping',ae( -'useGrouping','boolean',(void 0),true)); -var an=parseExtension(ab.extension); -var bI={ -'nu':{'property':(void 0),'type':'string'} -}; -var al=setOptions(V,an,bI, -ae,bk); -var bp=ab.locale+al; -var aj=%object_define_properties({},{ -currency:{writable:true}, -currencyDisplay:{writable:true}, -locale:{writable:true}, -maximumFractionDigits:{writable:true}, -minimumFractionDigits:{writable:true}, -minimumIntegerDigits:{writable:true}, -numberingSystem:{writable:true}, -requestedLocale:{value:bp,writable:true}, -style:{value:bk.style,writable:true}, -useGrouping:{writable:true} -}); -if((%_Call(n,bk,'minimumSignificantDigits'))){ -defineWEProperty(aj,'minimumSignificantDigits',(void 0)); -} -if((%_Call(n,bk,'maximumSignificantDigits'))){ -defineWEProperty(aj,'maximumSignificantDigits',(void 0)); -} -var bJ=%CreateNumberFormat(bp, -bk, -aj); -if(bk.style==='currency'){ -%object_define_property(aj,'currencyDisplay', -{value:bA,writable:true}); -} -%MarkAsInitializedIntlObjectOfType(bz,'numberformat',bJ); -bz[q]=aj; -return bz; -} -InstallConstructor(H,'NumberFormat',function(){ -var U=arguments[0]; -var V=arguments[1]; -if(!this||this===H){ -return new H.NumberFormat(U,V); -} -return initializeNumberFormat((%_ToObject(this)),U,V); -} -); -InstallFunction(H.NumberFormat.prototype,'resolvedOptions',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if(!%IsInitializedIntlObjectOfType(this,'numberformat')){ -throw %make_type_error(127,"NumberFormat"); -} -var bK=this; -var ab=getOptimalLanguageTag(bK[q].requestedLocale, -bK[q].locale); -var aG={ -locale:ab, -numberingSystem:bK[q].numberingSystem, -style:bK[q].style, -useGrouping:bK[q].useGrouping, -minimumIntegerDigits:bK[q].minimumIntegerDigits, -minimumFractionDigits:bK[q].minimumFractionDigits, -maximumFractionDigits:bK[q].maximumFractionDigits, -}; -if(aG.style==='currency'){ -defineWECProperty(aG,'currency',bK[q].currency); -defineWECProperty(aG,'currencyDisplay', -bK[q].currencyDisplay); -} -if((%_Call(n,bK[q],'minimumSignificantDigits'))){ -defineWECProperty(aG,'minimumSignificantDigits', -bK[q].minimumSignificantDigits); -} -if((%_Call(n,bK[q],'maximumSignificantDigits'))){ -defineWECProperty(aG,'maximumSignificantDigits', -bK[q].maximumSignificantDigits); -} -return aG; -} -); -InstallFunction(H.NumberFormat,'supportedLocalesOf',function(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -return supportedLocalesOf('numberformat',U,arguments[1]); -} -); -function formatNumber(bJ,ai){ -var bL=(%_ToNumber(ai))+0; -return %InternalNumberFormat(%GetImplFromInitializedIntlObject(bJ), -bL); -} -AddBoundMethod(H.NumberFormat,'format',formatNumber,1,'numberformat'); -function toLDMLString(V){ -var ae=getGetOption(V,'dateformat'); -var bM=''; -var bN=ae('weekday','string',['narrow','short','long']); -bM+=appendToLDMLString( -bN,{narrow:'EEEEE',short:'EEE',long:'EEEE'}); -bN=ae('era','string',['narrow','short','long']); -bM+=appendToLDMLString( -bN,{narrow:'GGGGG',short:'GGG',long:'GGGG'}); -bN=ae('year','string',['2-digit','numeric']); -bM+=appendToLDMLString(bN,{'2-digit':'yy','numeric':'y'}); -bN=ae('month','string', -['2-digit','numeric','narrow','short','long']); -bM+=appendToLDMLString(bN,{'2-digit':'MM','numeric':'M', -'narrow':'MMMMM','short':'MMM','long':'MMMM'}); -bN=ae('day','string',['2-digit','numeric']); -bM+=appendToLDMLString( -bN,{'2-digit':'dd','numeric':'d'}); -var bO=ae('hour12','boolean'); -bN=ae('hour','string',['2-digit','numeric']); -if((bO===(void 0))){ -bM+=appendToLDMLString(bN,{'2-digit':'jj','numeric':'j'}); -}else if(bO===true){ -bM+=appendToLDMLString(bN,{'2-digit':'hh','numeric':'h'}); -}else{ -bM+=appendToLDMLString(bN,{'2-digit':'HH','numeric':'H'}); -} -bN=ae('minute','string',['2-digit','numeric']); -bM+=appendToLDMLString(bN,{'2-digit':'mm','numeric':'m'}); -bN=ae('second','string',['2-digit','numeric']); -bM+=appendToLDMLString(bN,{'2-digit':'ss','numeric':'s'}); -bN=ae('timeZoneName','string',['short','long']); -bM+=appendToLDMLString(bN,{short:'z',long:'zzzz'}); -return bM; -} -function appendToLDMLString(bN,bP){ -if(!(bN===(void 0))){ -return bP[bN]; -}else{ -return''; -} -} -function fromLDMLString(bM){ -bM=m(GetQuotedStringRE(),bM,''); -var V={}; -var aF=l(/E{3,5}/,bM); -V=appendToDateTimeObject( -V,'weekday',aF,{EEEEE:'narrow',EEE:'short',EEEE:'long'}); -aF=l(/G{3,5}/,bM); -V=appendToDateTimeObject( -V,'era',aF,{GGGGG:'narrow',GGG:'short',GGGG:'long'}); -aF=l(/y{1,2}/,bM); -V=appendToDateTimeObject( -V,'year',aF,{y:'numeric',yy:'2-digit'}); -aF=l(/M{1,5}/,bM); -V=appendToDateTimeObject(V,'month',aF,{MM:'2-digit', -M:'numeric',MMMMM:'narrow',MMM:'short',MMMM:'long'}); -aF=l(/L{1,5}/,bM); -V=appendToDateTimeObject(V,'month',aF,{LL:'2-digit', -L:'numeric',LLLLL:'narrow',LLL:'short',LLLL:'long'}); -aF=l(/d{1,2}/,bM); -V=appendToDateTimeObject( -V,'day',aF,{d:'numeric',dd:'2-digit'}); -aF=l(/h{1,2}/,bM); -if(aF!==null){ -V['hour12']=true; -} -V=appendToDateTimeObject( -V,'hour',aF,{h:'numeric',hh:'2-digit'}); -aF=l(/H{1,2}/,bM); -if(aF!==null){ -V['hour12']=false; -} -V=appendToDateTimeObject( -V,'hour',aF,{H:'numeric',HH:'2-digit'}); -aF=l(/m{1,2}/,bM); -V=appendToDateTimeObject( -V,'minute',aF,{m:'numeric',mm:'2-digit'}); -aF=l(/s{1,2}/,bM); -V=appendToDateTimeObject( -V,'second',aF,{s:'numeric',ss:'2-digit'}); -aF=l(/z|zzzz/,bM); -V=appendToDateTimeObject( -V,'timeZoneName',aF,{z:'short',zzzz:'long'}); -return V; -} -function appendToDateTimeObject(V,bN,aF,bP){ -if((aF===null)){ -if(!(%_Call(n,V,bN))){ -defineWEProperty(V,bN,(void 0)); -} -return V; -} -var af=aF[0]; -defineWEProperty(V,bN,bP[af]); -return V; -} -function toDateTimeOptions(V,bQ,bR){ -if((V===(void 0))){ -V={}; -}else{ -V=(%_ToObject(V)); -} -var bS=true; -if((bQ==='date'||bQ==='any')&& -(!(V.weekday===(void 0))||!(V.year===(void 0))|| -!(V.month===(void 0))||!(V.day===(void 0)))){ -bS=false; -} -if((bQ==='time'||bQ==='any')&& -(!(V.hour===(void 0))||!(V.minute===(void 0))|| -!(V.second===(void 0)))){ -bS=false; -} -if(bS&&(bR==='date'||bR==='all')){ -%object_define_property(V,'year',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'month',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'day',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -} -if(bS&&(bR==='time'||bR==='all')){ -%object_define_property(V,'hour',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'minute',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'second',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -} -return V; -} -function initializeDateTimeFormat(bT,U,V){ -if(%IsInitializedIntlObject(bT)){ -throw %make_type_error(126,"DateTimeFormat"); -} -if((V===(void 0))){ -V={}; -} -var ab=resolveLocale('dateformat',U,V); -V=toDateTimeOptions(V,'any','date'); -var ae=getGetOption(V,'dateformat'); -var W=ae('formatMatcher','string', -['basic','best fit'],'best fit'); -var bM=toLDMLString(V); -var bU=canonicalizeTimeZoneID(V.timeZone); -var bk={}; -var an=parseExtension(ab.extension); -var bV={ -'ca':{'property':(void 0),'type':'string'}, -'nu':{'property':(void 0),'type':'string'} -}; -var al=setOptions(V,an,bV, -ae,bk); -var bp=ab.locale+al; -var aj=%object_define_properties({},{ -calendar:{writable:true}, -day:{writable:true}, -era:{writable:true}, -hour12:{writable:true}, -hour:{writable:true}, -locale:{writable:true}, -minute:{writable:true}, -month:{writable:true}, -numberingSystem:{writable:true}, -[p]:{writable:true}, -requestedLocale:{value:bp,writable:true}, -second:{writable:true}, -timeZone:{writable:true}, -timeZoneName:{writable:true}, -tz:{value:bU,writable:true}, -weekday:{writable:true}, -year:{writable:true} -}); -var bJ=%CreateDateTimeFormat( -bp,{skeleton:bM,timeZone:bU},aj); -if(aj.timeZone==="Etc/Unknown"){ -throw %make_range_error(184,bU); -} -%MarkAsInitializedIntlObjectOfType(bT,'dateformat',bJ); -bT[q]=aj; -return bT; -} -InstallConstructor(H,'DateTimeFormat',function(){ -var U=arguments[0]; -var V=arguments[1]; -if(!this||this===H){ -return new H.DateTimeFormat(U,V); -} -return initializeDateTimeFormat((%_ToObject(this)),U,V); -} -); -InstallFunction(H.DateTimeFormat.prototype,'resolvedOptions',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if(!%IsInitializedIntlObjectOfType(this,'dateformat')){ -throw %make_type_error(127,"DateTimeFormat"); -} -var bW={ -'gregorian':'gregory', -'ethiopic-amete-alem':'ethioaa' -}; -var bK=this; -var bX=fromLDMLString(bK[q][p]); -var bY=bW[bK[q].calendar]; -if((bY===(void 0))){ -bY=bK[q].calendar; -} -var ab=getOptimalLanguageTag(bK[q].requestedLocale, -bK[q].locale); -var aG={ -locale:ab, -numberingSystem:bK[q].numberingSystem, -calendar:bY, -timeZone:bK[q].timeZone -}; -addWECPropertyIfDefined(aG,'timeZoneName',bX.timeZoneName); -addWECPropertyIfDefined(aG,'era',bX.era); -addWECPropertyIfDefined(aG,'year',bX.year); -addWECPropertyIfDefined(aG,'month',bX.month); -addWECPropertyIfDefined(aG,'day',bX.day); -addWECPropertyIfDefined(aG,'weekday',bX.weekday); -addWECPropertyIfDefined(aG,'hour12',bX.hour12); -addWECPropertyIfDefined(aG,'hour',bX.hour); -addWECPropertyIfDefined(aG,'minute',bX.minute); -addWECPropertyIfDefined(aG,'second',bX.second); -return aG; -} -); -InstallFunction(H.DateTimeFormat,'supportedLocalesOf',function(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -return supportedLocalesOf('dateformat',U,arguments[1]); -} -); -function formatDate(bJ,bZ){ -var ca; -if((bZ===(void 0))){ -ca=%DateCurrentTime(); -}else{ -ca=(%_ToNumber(bZ)); -} -if(!(%_IsSmi(%IS_VAR(ca))||((ca==ca)&&(ca!=1/0)&&(ca!=-1/0))))throw %make_range_error(150); -return %InternalDateFormat(%GetImplFromInitializedIntlObject(bJ), -new e(ca)); -} -function FormatDateToParts(bZ){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Intl.DateTimeFormat.prototype.formatToParts"); -if(!(typeof(this)==='object')){ -throw %make_type_error(16,this); -} -var ca; -if((bZ===(void 0))){ -ca=%DateCurrentTime(); -}else{ -ca=(%_ToNumber(bZ)); -} -if(!(%_IsSmi(%IS_VAR(ca))||((ca==ca)&&(ca!=1/0)&&(ca!=-1/0))))throw %make_range_error(150); -return %InternalDateFormatToParts( -%GetImplFromInitializedIntlObject(this),new e(ca)); -} -%FunctionSetLength(FormatDateToParts,0); -AddBoundMethod(H.DateTimeFormat,'format',formatDate,0,'dateformat'); -function canonicalizeTimeZoneID(cb){ -if((cb===(void 0))){ -return cb; -} -cb=(%_ToString(cb)); -var cc=%StringToUpperCase(cb); -if(cc==='UTC'||cc==='GMT'|| -cc==='ETC/UTC'||cc==='ETC/GMT'){ -return'UTC'; -} -var aF=l(GetTimezoneNameCheckRE(),cb); -if((aF===null))throw %make_range_error(151,cb); -var aG=toTitleCaseTimezoneLocation(aF[1])+'/'+ -toTitleCaseTimezoneLocation(aF[2]); -if(!(aF[3]===(void 0))&&30?U[0]:GetDefaultICULocaleJS(); -} -var ac=%_Call(s,bf,'-'); -if(ac!=-1){ -bf=%_Call(u,bf,0,ac); -} -var cp=['az','el','lt','tr']; -var cq=%ArrayIndexOf(cp,bf,0); -if(cq==-1){ -return co?%StringToUpperCaseI18N(cn):%StringToLowerCaseI18N(cn); -} -return %StringLocaleConvertCase(cn,co, -cp[cq]); -} -o(h.prototype,'localeCompare',function(cr){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((this==null)){ -throw %make_type_error(55); -} -var U=arguments[1]; -var V=arguments[2]; -var bj=cachedOrNewService('collator',U,V); -return compare(bj,this,cr); -} -); -o(h.prototype,'normalize',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.normalize"); -var cn=(%_ToString(this)); -var cs=arguments[0]; -var ct=(cs===(void 0))?'NFC':(%_ToString(cs)); -var cu=['NFC','NFD','NFKC','NFKD']; -var cv=%ArrayIndexOf(cu,ct,0); -if(cv===-1){ -throw %make_range_error(176, -%_Call(c,cu,', ')); -} -return %StringNormalize(cn,cv); -} -); -function ToLowerCaseI18N(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLowerCase"); -var cn=(%_ToString(this)); -return %StringToLowerCaseI18N(cn); -} -function ToUpperCaseI18N(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toUpperCase"); -var cn=(%_ToString(this)); -return %StringToUpperCaseI18N(cn); -} -function ToLocaleLowerCaseI18N(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleLowerCase"); -return LocaleConvertCase((%_ToString(this)),U,false); -} -%FunctionSetLength(ToLocaleLowerCaseI18N,0); -function ToLocaleUpperCaseI18N(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleUpperCase"); -return LocaleConvertCase((%_ToString(this)),U,true); -} -%FunctionSetLength(ToLocaleUpperCaseI18N,0); -%FunctionRemovePrototype(ToLowerCaseI18N); -%FunctionRemovePrototype(ToUpperCaseI18N); -%FunctionRemovePrototype(ToLocaleLowerCaseI18N); -%FunctionRemovePrototype(ToLocaleUpperCaseI18N); -b.Export(function(cw){ -cw.ToLowerCaseI18N=ToLowerCaseI18N; -cw.ToUpperCaseI18N=ToUpperCaseI18N; -cw.ToLocaleLowerCaseI18N=ToLocaleLowerCaseI18N; -cw.ToLocaleUpperCaseI18N=ToLocaleUpperCaseI18N; -}); -o(f.prototype,'toLocaleString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if(!(this instanceof f)&&typeof(this)!=='number'){ -throw %make_type_error(56,"Number"); -} -var U=arguments[0]; -var V=arguments[1]; -var bz=cachedOrNewService('numberformat',U,V); -return formatNumber(bz,this); -} -); -function toLocaleDateTime(cx,U,V,bQ,bR,T){ -if(!(cx instanceof e)){ -throw %make_type_error(56,"Date"); -} -var bZ=(%_ToNumber(cx)); -if((!%_IsSmi(%IS_VAR(bZ))&&!(bZ==bZ)))return'Invalid Date'; -var bk=toDateTimeOptions(V,bQ,bR); -var bT= -cachedOrNewService(T,U,V,bk); -return formatDate(bT,cx); -} -o(e.prototype,'toLocaleString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -var U=arguments[0]; -var V=arguments[1]; -return toLocaleDateTime( -this,U,V,'any','all','dateformatall'); -} -); -o(e.prototype,'toLocaleDateString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -var U=arguments[0]; -var V=arguments[1]; -return toLocaleDateTime( -this,U,V,'date','date','dateformatdate'); -} -); -o(e.prototype,'toLocaleTimeString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -var U=arguments[0]; -var V=arguments[1]; -return toLocaleDateTime( -this,U,V,'time','time','dateformattime'); -} -); -%FunctionRemovePrototype(FormatDateToParts); -b.Export(function(cw){ -cw.FormatDateToParts=FormatDateToParts; -}); -}) - -=i){ -throw %make_range_error(156); -} -return k; -} -function AtomicsCompareExchangeJS(l,h,m,n){ -CheckSharedIntegerTypedArray(l); -h=ValidateIndex(h,%_TypedArrayGetLength(l)); -m=(%_ToNumber(m)); -n=(%_ToNumber(n)); -return %_AtomicsCompareExchange(l,h,m,n); -} -function AtomicsAddJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsAdd(g,h,o); -} -function AtomicsSubJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsSub(g,h,o); -} -function AtomicsAndJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsAnd(g,h,o); -} -function AtomicsOrJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsOr(g,h,o); -} -function AtomicsXorJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsXor(g,h,o); -} -function AtomicsExchangeJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsExchange(g,h,o); -} -function AtomicsIsLockFreeJS(p){ -return %_AtomicsIsLockFree(p); -} -function AtomicsWaitJS(g,h,o,q){ -CheckSharedInteger32TypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -if((q===(void 0))){ -q=(1/0); -}else{ -q=(%_ToNumber(q)); -if((!%_IsSmi(%IS_VAR(q))&&!(q==q))){ -q=(1/0); -}else{ -q=d(0,q); -} -} -return %AtomicsWait(g,h,o,q); -} -function AtomicsWakeJS(g,h,r){ -CheckSharedInteger32TypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -r=d(0,(%_ToInteger(r))); -return %AtomicsWake(g,h,r); -} -var s=a.Atomics; -%AddNamedProperty(s,e,"Atomics",1|2); -b.InstallFunctions(s,2,[ -"compareExchange",AtomicsCompareExchangeJS, -"add",AtomicsAddJS, -"sub",AtomicsSubJS, -"and",AtomicsAndJS, -"or",AtomicsOrJS, -"xor",AtomicsXorJS, -"exchange",AtomicsExchangeJS, -"isLockFree",AtomicsIsLockFreeJS, -"wait",AtomicsWaitJS, -"wake",AtomicsWakeJS, -]); -}) - -0harmony-simdŽ´ -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.SIMD; -var d=b.ImportNow("to_string_tag_symbol"); -var e=c.Float32x4; - - -var f=c.Int32x4; - -var g=c.Int16x8; - -var h=c.Int8x16; - - -var i=c.Uint32x4; - -var j=c.Uint16x8; - -var k=c.Uint8x16; - - -var l=c.Bool32x4; - -var m=c.Bool16x8; - -var n=c.Bool8x16; - - - -function Float32x4CheckJS(o){ -return %Float32x4Check(o); -} -function Float32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='float32x4'){ -throw %make_type_error(45, -"Float32x4.prototype.toString",this); -} -var q="SIMD.Float32x4("; -q+=%Float32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Float32x4ExtractLane(p,r); -} -return q+")"; -} -function Float32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='float32x4'){ -throw %make_type_error(45, -"Float32x4.prototype.toLocaleString",this); -} -var q="SIMD.Float32x4("; -q+=%Float32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Float32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Float32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='float32x4'){ -throw %make_type_error(45, -"Float32x4.prototype.valueOf",this); -} -return p; -} -function Float32x4ExtractLaneJS(s,t){ -return %Float32x4ExtractLane(s,t); -} - - -function Int32x4CheckJS(o){ -return %Int32x4Check(o); -} -function Int32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int32x4'){ -throw %make_type_error(45, -"Int32x4.prototype.toString",this); -} -var q="SIMD.Int32x4("; -q+=%Int32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Int32x4ExtractLane(p,r); -} -return q+")"; -} -function Int32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int32x4'){ -throw %make_type_error(45, -"Int32x4.prototype.toLocaleString",this); -} -var q="SIMD.Int32x4("; -q+=%Int32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Int32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Int32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='int32x4'){ -throw %make_type_error(45, -"Int32x4.prototype.valueOf",this); -} -return p; -} -function Int32x4ExtractLaneJS(s,t){ -return %Int32x4ExtractLane(s,t); -} - -function Int16x8CheckJS(o){ -return %Int16x8Check(o); -} -function Int16x8ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int16x8'){ -throw %make_type_error(45, -"Int16x8.prototype.toString",this); -} -var q="SIMD.Int16x8("; -q+=%Int16x8ExtractLane(p,0); -for(var r=1;r<8;r++){ -q+=", "+%Int16x8ExtractLane(p,r); -} -return q+")"; -} -function Int16x8ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int16x8'){ -throw %make_type_error(45, -"Int16x8.prototype.toLocaleString",this); -} -var q="SIMD.Int16x8("; -q+=%Int16x8ExtractLane(p,0).toLocaleString(); -for(var r=1;r<8;r++){ -q+=", "+%Int16x8ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Int16x8ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='int16x8'){ -throw %make_type_error(45, -"Int16x8.prototype.valueOf",this); -} -return p; -} -function Int16x8ExtractLaneJS(s,t){ -return %Int16x8ExtractLane(s,t); -} - -function Int8x16CheckJS(o){ -return %Int8x16Check(o); -} -function Int8x16ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int8x16'){ -throw %make_type_error(45, -"Int8x16.prototype.toString",this); -} -var q="SIMD.Int8x16("; -q+=%Int8x16ExtractLane(p,0); -for(var r=1;r<16;r++){ -q+=", "+%Int8x16ExtractLane(p,r); -} -return q+")"; -} -function Int8x16ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int8x16'){ -throw %make_type_error(45, -"Int8x16.prototype.toLocaleString",this); -} -var q="SIMD.Int8x16("; -q+=%Int8x16ExtractLane(p,0).toLocaleString(); -for(var r=1;r<16;r++){ -q+=", "+%Int8x16ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Int8x16ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='int8x16'){ -throw %make_type_error(45, -"Int8x16.prototype.valueOf",this); -} -return p; -} -function Int8x16ExtractLaneJS(s,t){ -return %Int8x16ExtractLane(s,t); -} - - -function Uint32x4CheckJS(o){ -return %Uint32x4Check(o); -} -function Uint32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint32x4'){ -throw %make_type_error(45, -"Uint32x4.prototype.toString",this); -} -var q="SIMD.Uint32x4("; -q+=%Uint32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Uint32x4ExtractLane(p,r); -} -return q+")"; -} -function Uint32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint32x4'){ -throw %make_type_error(45, -"Uint32x4.prototype.toLocaleString",this); -} -var q="SIMD.Uint32x4("; -q+=%Uint32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Uint32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Uint32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint32x4'){ -throw %make_type_error(45, -"Uint32x4.prototype.valueOf",this); -} -return p; -} -function Uint32x4ExtractLaneJS(s,t){ -return %Uint32x4ExtractLane(s,t); -} - -function Uint16x8CheckJS(o){ -return %Uint16x8Check(o); -} -function Uint16x8ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint16x8'){ -throw %make_type_error(45, -"Uint16x8.prototype.toString",this); -} -var q="SIMD.Uint16x8("; -q+=%Uint16x8ExtractLane(p,0); -for(var r=1;r<8;r++){ -q+=", "+%Uint16x8ExtractLane(p,r); -} -return q+")"; -} -function Uint16x8ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint16x8'){ -throw %make_type_error(45, -"Uint16x8.prototype.toLocaleString",this); -} -var q="SIMD.Uint16x8("; -q+=%Uint16x8ExtractLane(p,0).toLocaleString(); -for(var r=1;r<8;r++){ -q+=", "+%Uint16x8ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Uint16x8ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint16x8'){ -throw %make_type_error(45, -"Uint16x8.prototype.valueOf",this); -} -return p; -} -function Uint16x8ExtractLaneJS(s,t){ -return %Uint16x8ExtractLane(s,t); -} - -function Uint8x16CheckJS(o){ -return %Uint8x16Check(o); -} -function Uint8x16ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint8x16'){ -throw %make_type_error(45, -"Uint8x16.prototype.toString",this); -} -var q="SIMD.Uint8x16("; -q+=%Uint8x16ExtractLane(p,0); -for(var r=1;r<16;r++){ -q+=", "+%Uint8x16ExtractLane(p,r); -} -return q+")"; -} -function Uint8x16ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint8x16'){ -throw %make_type_error(45, -"Uint8x16.prototype.toLocaleString",this); -} -var q="SIMD.Uint8x16("; -q+=%Uint8x16ExtractLane(p,0).toLocaleString(); -for(var r=1;r<16;r++){ -q+=", "+%Uint8x16ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Uint8x16ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint8x16'){ -throw %make_type_error(45, -"Uint8x16.prototype.valueOf",this); -} -return p; -} -function Uint8x16ExtractLaneJS(s,t){ -return %Uint8x16ExtractLane(s,t); -} - - -function Bool32x4CheckJS(o){ -return %Bool32x4Check(o); -} -function Bool32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool32x4'){ -throw %make_type_error(45, -"Bool32x4.prototype.toString",this); -} -var q="SIMD.Bool32x4("; -q+=%Bool32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Bool32x4ExtractLane(p,r); -} -return q+")"; -} -function Bool32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool32x4'){ -throw %make_type_error(45, -"Bool32x4.prototype.toLocaleString",this); -} -var q="SIMD.Bool32x4("; -q+=%Bool32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Bool32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Bool32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool32x4'){ -throw %make_type_error(45, -"Bool32x4.prototype.valueOf",this); -} -return p; -} -function Bool32x4ExtractLaneJS(s,t){ -return %Bool32x4ExtractLane(s,t); -} - -function Bool16x8CheckJS(o){ -return %Bool16x8Check(o); -} -function Bool16x8ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool16x8'){ -throw %make_type_error(45, -"Bool16x8.prototype.toString",this); -} -var q="SIMD.Bool16x8("; -q+=%Bool16x8ExtractLane(p,0); -for(var r=1;r<8;r++){ -q+=", "+%Bool16x8ExtractLane(p,r); -} -return q+")"; -} -function Bool16x8ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool16x8'){ -throw %make_type_error(45, -"Bool16x8.prototype.toLocaleString",this); -} -var q="SIMD.Bool16x8("; -q+=%Bool16x8ExtractLane(p,0).toLocaleString(); -for(var r=1;r<8;r++){ -q+=", "+%Bool16x8ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Bool16x8ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool16x8'){ -throw %make_type_error(45, -"Bool16x8.prototype.valueOf",this); -} -return p; -} -function Bool16x8ExtractLaneJS(s,t){ -return %Bool16x8ExtractLane(s,t); -} - -function Bool8x16CheckJS(o){ -return %Bool8x16Check(o); -} -function Bool8x16ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool8x16'){ -throw %make_type_error(45, -"Bool8x16.prototype.toString",this); -} -var q="SIMD.Bool8x16("; -q+=%Bool8x16ExtractLane(p,0); -for(var r=1;r<16;r++){ -q+=", "+%Bool8x16ExtractLane(p,r); -} -return q+")"; -} -function Bool8x16ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool8x16'){ -throw %make_type_error(45, -"Bool8x16.prototype.toLocaleString",this); -} -var q="SIMD.Bool8x16("; -q+=%Bool8x16ExtractLane(p,0).toLocaleString(); -for(var r=1;r<16;r++){ -q+=", "+%Bool8x16ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Bool8x16ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool8x16'){ -throw %make_type_error(45, -"Bool8x16.prototype.valueOf",this); -} -return p; -} -function Bool8x16ExtractLaneJS(s,t){ -return %Bool8x16ExtractLane(s,t); -} - - - -function Int32x4ShiftLeftByScalarJS(s,u){ -return %Int32x4ShiftLeftByScalar(s,u); -} -function Int32x4ShiftRightByScalarJS(s,u){ -return %Int32x4ShiftRightByScalar(s,u); -} - -function Int16x8ShiftLeftByScalarJS(s,u){ -return %Int16x8ShiftLeftByScalar(s,u); -} -function Int16x8ShiftRightByScalarJS(s,u){ -return %Int16x8ShiftRightByScalar(s,u); -} - -function Int8x16ShiftLeftByScalarJS(s,u){ -return %Int8x16ShiftLeftByScalar(s,u); -} -function Int8x16ShiftRightByScalarJS(s,u){ -return %Int8x16ShiftRightByScalar(s,u); -} - - -function Uint32x4ShiftLeftByScalarJS(s,u){ -return %Uint32x4ShiftLeftByScalar(s,u); -} -function Uint32x4ShiftRightByScalarJS(s,u){ -return %Uint32x4ShiftRightByScalar(s,u); -} - -function Uint16x8ShiftLeftByScalarJS(s,u){ -return %Uint16x8ShiftLeftByScalar(s,u); -} -function Uint16x8ShiftRightByScalarJS(s,u){ -return %Uint16x8ShiftRightByScalar(s,u); -} - -function Uint8x16ShiftLeftByScalarJS(s,u){ -return %Uint8x16ShiftLeftByScalar(s,u); -} -function Uint8x16ShiftRightByScalarJS(s,u){ -return %Uint8x16ShiftRightByScalar(s,u); -} - - -function Int16x8AddSaturateJS(o,v){ -return %Int16x8AddSaturate(o,v); -} -function Int16x8SubSaturateJS(o,v){ -return %Int16x8SubSaturate(o,v); -} - -function Int8x16AddSaturateJS(o,v){ -return %Int8x16AddSaturate(o,v); -} -function Int8x16SubSaturateJS(o,v){ -return %Int8x16SubSaturate(o,v); -} - -function Uint8x16AddSaturateJS(o,v){ -return %Uint8x16AddSaturate(o,v); -} -function Uint8x16SubSaturateJS(o,v){ -return %Uint8x16SubSaturate(o,v); -} - -function Uint16x8AddSaturateJS(o,v){ -return %Uint16x8AddSaturate(o,v); -} -function Uint16x8SubSaturateJS(o,v){ -return %Uint16x8SubSaturate(o,v); -} - - -function Float32x4NegJS(o){ -return %Float32x4Neg(o); -} - - -function Int32x4NegJS(o){ -return %Int32x4Neg(o); -} - -function Int16x8NegJS(o){ -return %Int16x8Neg(o); -} - -function Int8x16NegJS(o){ -return %Int8x16Neg(o); -} - - -function Bool32x4ReplaceLaneJS(s,t,p){ -return %Bool32x4ReplaceLane(s,t,p); -} -function Bool32x4AnyTrueJS(w){ -return %Bool32x4AnyTrue(w); -} -function Bool32x4AllTrueJS(w){ -return %Bool32x4AllTrue(w); -} - -function Bool16x8ReplaceLaneJS(s,t,p){ -return %Bool16x8ReplaceLane(s,t,p); -} -function Bool16x8AnyTrueJS(w){ -return %Bool16x8AnyTrue(w); -} -function Bool16x8AllTrueJS(w){ -return %Bool16x8AllTrue(w); -} - -function Bool8x16ReplaceLaneJS(s,t,p){ -return %Bool8x16ReplaceLane(s,t,p); -} -function Bool8x16AnyTrueJS(w){ -return %Bool8x16AnyTrue(w); -} -function Bool8x16AllTrueJS(w){ -return %Bool8x16AllTrue(w); -} - - -function Float32x4ReplaceLaneJS(s,t,p){ -return %Float32x4ReplaceLane(s,t,(%_ToNumber(p))); -} -function Float32x4SelectJS(x,o,v){ -return %Float32x4Select(x,o,v); -} -function Float32x4AddJS(o,v){ -return %Float32x4Add(o,v); -} -function Float32x4SubJS(o,v){ -return %Float32x4Sub(o,v); -} -function Float32x4MulJS(o,v){ -return %Float32x4Mul(o,v); -} -function Float32x4MinJS(o,v){ -return %Float32x4Min(o,v); -} -function Float32x4MaxJS(o,v){ -return %Float32x4Max(o,v); -} -function Float32x4EqualJS(o,v){ -return %Float32x4Equal(o,v); -} -function Float32x4NotEqualJS(o,v){ -return %Float32x4NotEqual(o,v); -} -function Float32x4LessThanJS(o,v){ -return %Float32x4LessThan(o,v); -} -function Float32x4LessThanOrEqualJS(o,v){ -return %Float32x4LessThanOrEqual(o,v); -} -function Float32x4GreaterThanJS(o,v){ -return %Float32x4GreaterThan(o,v); -} -function Float32x4GreaterThanOrEqualJS(o,v){ -return %Float32x4GreaterThanOrEqual(o,v); -} -function Float32x4LoadJS(y,z){ -return %Float32x4Load(y,z); -} -function Float32x4StoreJS(y,z,o){ -return %Float32x4Store(y,z,o); -} - - -function Int32x4ReplaceLaneJS(s,t,p){ -return %Int32x4ReplaceLane(s,t,(%_ToNumber(p))); -} -function Int32x4SelectJS(x,o,v){ -return %Int32x4Select(x,o,v); -} -function Int32x4AddJS(o,v){ -return %Int32x4Add(o,v); -} -function Int32x4SubJS(o,v){ -return %Int32x4Sub(o,v); -} -function Int32x4MulJS(o,v){ -return %Int32x4Mul(o,v); -} -function Int32x4MinJS(o,v){ -return %Int32x4Min(o,v); -} -function Int32x4MaxJS(o,v){ -return %Int32x4Max(o,v); -} -function Int32x4EqualJS(o,v){ -return %Int32x4Equal(o,v); -} -function Int32x4NotEqualJS(o,v){ -return %Int32x4NotEqual(o,v); -} -function Int32x4LessThanJS(o,v){ -return %Int32x4LessThan(o,v); -} -function Int32x4LessThanOrEqualJS(o,v){ -return %Int32x4LessThanOrEqual(o,v); -} -function Int32x4GreaterThanJS(o,v){ -return %Int32x4GreaterThan(o,v); -} -function Int32x4GreaterThanOrEqualJS(o,v){ -return %Int32x4GreaterThanOrEqual(o,v); -} -function Int32x4LoadJS(y,z){ -return %Int32x4Load(y,z); -} -function Int32x4StoreJS(y,z,o){ -return %Int32x4Store(y,z,o); -} - -function Int16x8ReplaceLaneJS(s,t,p){ -return %Int16x8ReplaceLane(s,t,(%_ToNumber(p))); -} -function Int16x8SelectJS(x,o,v){ -return %Int16x8Select(x,o,v); -} -function Int16x8AddJS(o,v){ -return %Int16x8Add(o,v); -} -function Int16x8SubJS(o,v){ -return %Int16x8Sub(o,v); -} -function Int16x8MulJS(o,v){ -return %Int16x8Mul(o,v); -} -function Int16x8MinJS(o,v){ -return %Int16x8Min(o,v); -} -function Int16x8MaxJS(o,v){ -return %Int16x8Max(o,v); -} -function Int16x8EqualJS(o,v){ -return %Int16x8Equal(o,v); -} -function Int16x8NotEqualJS(o,v){ -return %Int16x8NotEqual(o,v); -} -function Int16x8LessThanJS(o,v){ -return %Int16x8LessThan(o,v); -} -function Int16x8LessThanOrEqualJS(o,v){ -return %Int16x8LessThanOrEqual(o,v); -} -function Int16x8GreaterThanJS(o,v){ -return %Int16x8GreaterThan(o,v); -} -function Int16x8GreaterThanOrEqualJS(o,v){ -return %Int16x8GreaterThanOrEqual(o,v); -} -function Int16x8LoadJS(y,z){ -return %Int16x8Load(y,z); -} -function Int16x8StoreJS(y,z,o){ -return %Int16x8Store(y,z,o); -} - -function Int8x16ReplaceLaneJS(s,t,p){ -return %Int8x16ReplaceLane(s,t,(%_ToNumber(p))); -} -function Int8x16SelectJS(x,o,v){ -return %Int8x16Select(x,o,v); -} -function Int8x16AddJS(o,v){ -return %Int8x16Add(o,v); -} -function Int8x16SubJS(o,v){ -return %Int8x16Sub(o,v); -} -function Int8x16MulJS(o,v){ -return %Int8x16Mul(o,v); -} -function Int8x16MinJS(o,v){ -return %Int8x16Min(o,v); -} -function Int8x16MaxJS(o,v){ -return %Int8x16Max(o,v); -} -function Int8x16EqualJS(o,v){ -return %Int8x16Equal(o,v); -} -function Int8x16NotEqualJS(o,v){ -return %Int8x16NotEqual(o,v); -} -function Int8x16LessThanJS(o,v){ -return %Int8x16LessThan(o,v); -} -function Int8x16LessThanOrEqualJS(o,v){ -return %Int8x16LessThanOrEqual(o,v); -} -function Int8x16GreaterThanJS(o,v){ -return %Int8x16GreaterThan(o,v); -} -function Int8x16GreaterThanOrEqualJS(o,v){ -return %Int8x16GreaterThanOrEqual(o,v); -} -function Int8x16LoadJS(y,z){ -return %Int8x16Load(y,z); -} -function Int8x16StoreJS(y,z,o){ -return %Int8x16Store(y,z,o); -} - - -function Uint32x4ReplaceLaneJS(s,t,p){ -return %Uint32x4ReplaceLane(s,t,(%_ToNumber(p))); -} -function Uint32x4SelectJS(x,o,v){ -return %Uint32x4Select(x,o,v); -} -function Uint32x4AddJS(o,v){ -return %Uint32x4Add(o,v); -} -function Uint32x4SubJS(o,v){ -return %Uint32x4Sub(o,v); -} -function Uint32x4MulJS(o,v){ -return %Uint32x4Mul(o,v); -} -function Uint32x4MinJS(o,v){ -return %Uint32x4Min(o,v); -} -function Uint32x4MaxJS(o,v){ -return %Uint32x4Max(o,v); -} -function Uint32x4EqualJS(o,v){ -return %Uint32x4Equal(o,v); -} -function Uint32x4NotEqualJS(o,v){ -return %Uint32x4NotEqual(o,v); -} -function Uint32x4LessThanJS(o,v){ -return %Uint32x4LessThan(o,v); -} -function Uint32x4LessThanOrEqualJS(o,v){ -return %Uint32x4LessThanOrEqual(o,v); -} -function Uint32x4GreaterThanJS(o,v){ -return %Uint32x4GreaterThan(o,v); -} -function Uint32x4GreaterThanOrEqualJS(o,v){ -return %Uint32x4GreaterThanOrEqual(o,v); -} -function Uint32x4LoadJS(y,z){ -return %Uint32x4Load(y,z); -} -function Uint32x4StoreJS(y,z,o){ -return %Uint32x4Store(y,z,o); -} - -function Uint16x8ReplaceLaneJS(s,t,p){ -return %Uint16x8ReplaceLane(s,t,(%_ToNumber(p))); -} -function Uint16x8SelectJS(x,o,v){ -return %Uint16x8Select(x,o,v); -} -function Uint16x8AddJS(o,v){ -return %Uint16x8Add(o,v); -} -function Uint16x8SubJS(o,v){ -return %Uint16x8Sub(o,v); -} -function Uint16x8MulJS(o,v){ -return %Uint16x8Mul(o,v); -} -function Uint16x8MinJS(o,v){ -return %Uint16x8Min(o,v); -} -function Uint16x8MaxJS(o,v){ -return %Uint16x8Max(o,v); -} -function Uint16x8EqualJS(o,v){ -return %Uint16x8Equal(o,v); -} -function Uint16x8NotEqualJS(o,v){ -return %Uint16x8NotEqual(o,v); -} -function Uint16x8LessThanJS(o,v){ -return %Uint16x8LessThan(o,v); -} -function Uint16x8LessThanOrEqualJS(o,v){ -return %Uint16x8LessThanOrEqual(o,v); -} -function Uint16x8GreaterThanJS(o,v){ -return %Uint16x8GreaterThan(o,v); -} -function Uint16x8GreaterThanOrEqualJS(o,v){ -return %Uint16x8GreaterThanOrEqual(o,v); -} -function Uint16x8LoadJS(y,z){ -return %Uint16x8Load(y,z); -} -function Uint16x8StoreJS(y,z,o){ -return %Uint16x8Store(y,z,o); -} - -function Uint8x16ReplaceLaneJS(s,t,p){ -return %Uint8x16ReplaceLane(s,t,(%_ToNumber(p))); -} -function Uint8x16SelectJS(x,o,v){ -return %Uint8x16Select(x,o,v); -} -function Uint8x16AddJS(o,v){ -return %Uint8x16Add(o,v); -} -function Uint8x16SubJS(o,v){ -return %Uint8x16Sub(o,v); -} -function Uint8x16MulJS(o,v){ -return %Uint8x16Mul(o,v); -} -function Uint8x16MinJS(o,v){ -return %Uint8x16Min(o,v); -} -function Uint8x16MaxJS(o,v){ -return %Uint8x16Max(o,v); -} -function Uint8x16EqualJS(o,v){ -return %Uint8x16Equal(o,v); -} -function Uint8x16NotEqualJS(o,v){ -return %Uint8x16NotEqual(o,v); -} -function Uint8x16LessThanJS(o,v){ -return %Uint8x16LessThan(o,v); -} -function Uint8x16LessThanOrEqualJS(o,v){ -return %Uint8x16LessThanOrEqual(o,v); -} -function Uint8x16GreaterThanJS(o,v){ -return %Uint8x16GreaterThan(o,v); -} -function Uint8x16GreaterThanOrEqualJS(o,v){ -return %Uint8x16GreaterThanOrEqual(o,v); -} -function Uint8x16LoadJS(y,z){ -return %Uint8x16Load(y,z); -} -function Uint8x16StoreJS(y,z,o){ -return %Uint8x16Store(y,z,o); -} - - - -function Int32x4AndJS(o,v){ -return %Int32x4And(o,v); -} -function Int32x4OrJS(o,v){ -return %Int32x4Or(o,v); -} -function Int32x4XorJS(o,v){ -return %Int32x4Xor(o,v); -} -function Int32x4NotJS(o){ -return %Int32x4Not(o); -} - -function Int16x8AndJS(o,v){ -return %Int16x8And(o,v); -} -function Int16x8OrJS(o,v){ -return %Int16x8Or(o,v); -} -function Int16x8XorJS(o,v){ -return %Int16x8Xor(o,v); -} -function Int16x8NotJS(o){ -return %Int16x8Not(o); -} - -function Int8x16AndJS(o,v){ -return %Int8x16And(o,v); -} -function Int8x16OrJS(o,v){ -return %Int8x16Or(o,v); -} -function Int8x16XorJS(o,v){ -return %Int8x16Xor(o,v); -} -function Int8x16NotJS(o){ -return %Int8x16Not(o); -} - - -function Uint32x4AndJS(o,v){ -return %Uint32x4And(o,v); -} -function Uint32x4OrJS(o,v){ -return %Uint32x4Or(o,v); -} -function Uint32x4XorJS(o,v){ -return %Uint32x4Xor(o,v); -} -function Uint32x4NotJS(o){ -return %Uint32x4Not(o); -} - -function Uint16x8AndJS(o,v){ -return %Uint16x8And(o,v); -} -function Uint16x8OrJS(o,v){ -return %Uint16x8Or(o,v); -} -function Uint16x8XorJS(o,v){ -return %Uint16x8Xor(o,v); -} -function Uint16x8NotJS(o){ -return %Uint16x8Not(o); -} - -function Uint8x16AndJS(o,v){ -return %Uint8x16And(o,v); -} -function Uint8x16OrJS(o,v){ -return %Uint8x16Or(o,v); -} -function Uint8x16XorJS(o,v){ -return %Uint8x16Xor(o,v); -} -function Uint8x16NotJS(o){ -return %Uint8x16Not(o); -} - - -function Bool32x4AndJS(o,v){ -return %Bool32x4And(o,v); -} -function Bool32x4OrJS(o,v){ -return %Bool32x4Or(o,v); -} -function Bool32x4XorJS(o,v){ -return %Bool32x4Xor(o,v); -} -function Bool32x4NotJS(o){ -return %Bool32x4Not(o); -} - -function Bool16x8AndJS(o,v){ -return %Bool16x8And(o,v); -} -function Bool16x8OrJS(o,v){ -return %Bool16x8Or(o,v); -} -function Bool16x8XorJS(o,v){ -return %Bool16x8Xor(o,v); -} -function Bool16x8NotJS(o){ -return %Bool16x8Not(o); -} - -function Bool8x16AndJS(o,v){ -return %Bool8x16And(o,v); -} -function Bool8x16OrJS(o,v){ -return %Bool8x16Or(o,v); -} -function Bool8x16XorJS(o,v){ -return %Bool8x16Xor(o,v); -} -function Bool8x16NotJS(o){ -return %Bool8x16Not(o); -} - - - -function Float32x4FromInt32x4JS(o){ -return %Float32x4FromInt32x4(o); -} - -function Float32x4FromUint32x4JS(o){ -return %Float32x4FromUint32x4(o); -} - -function Int32x4FromFloat32x4JS(o){ -return %Int32x4FromFloat32x4(o); -} - -function Int32x4FromUint32x4JS(o){ -return %Int32x4FromUint32x4(o); -} - -function Uint32x4FromFloat32x4JS(o){ -return %Uint32x4FromFloat32x4(o); -} - -function Uint32x4FromInt32x4JS(o){ -return %Uint32x4FromInt32x4(o); -} - -function Int16x8FromUint16x8JS(o){ -return %Int16x8FromUint16x8(o); -} - -function Uint16x8FromInt16x8JS(o){ -return %Uint16x8FromInt16x8(o); -} - -function Int8x16FromUint8x16JS(o){ -return %Int8x16FromUint8x16(o); -} - -function Uint8x16FromInt8x16JS(o){ -return %Uint8x16FromInt8x16(o); -} - - -function Float32x4FromInt32x4BitsJS(o){ -return %Float32x4FromInt32x4Bits(o); -} - -function Float32x4FromUint32x4BitsJS(o){ -return %Float32x4FromUint32x4Bits(o); -} - -function Float32x4FromInt16x8BitsJS(o){ -return %Float32x4FromInt16x8Bits(o); -} - -function Float32x4FromUint16x8BitsJS(o){ -return %Float32x4FromUint16x8Bits(o); -} - -function Float32x4FromInt8x16BitsJS(o){ -return %Float32x4FromInt8x16Bits(o); -} - -function Float32x4FromUint8x16BitsJS(o){ -return %Float32x4FromUint8x16Bits(o); -} - -function Int32x4FromFloat32x4BitsJS(o){ -return %Int32x4FromFloat32x4Bits(o); -} - -function Int32x4FromUint32x4BitsJS(o){ -return %Int32x4FromUint32x4Bits(o); -} - -function Int32x4FromInt16x8BitsJS(o){ -return %Int32x4FromInt16x8Bits(o); -} - -function Int32x4FromUint16x8BitsJS(o){ -return %Int32x4FromUint16x8Bits(o); -} - -function Int32x4FromInt8x16BitsJS(o){ -return %Int32x4FromInt8x16Bits(o); -} - -function Int32x4FromUint8x16BitsJS(o){ -return %Int32x4FromUint8x16Bits(o); -} - -function Uint32x4FromFloat32x4BitsJS(o){ -return %Uint32x4FromFloat32x4Bits(o); -} - -function Uint32x4FromInt32x4BitsJS(o){ -return %Uint32x4FromInt32x4Bits(o); -} - -function Uint32x4FromInt16x8BitsJS(o){ -return %Uint32x4FromInt16x8Bits(o); -} - -function Uint32x4FromUint16x8BitsJS(o){ -return %Uint32x4FromUint16x8Bits(o); -} - -function Uint32x4FromInt8x16BitsJS(o){ -return %Uint32x4FromInt8x16Bits(o); -} - -function Uint32x4FromUint8x16BitsJS(o){ -return %Uint32x4FromUint8x16Bits(o); -} - -function Int16x8FromFloat32x4BitsJS(o){ -return %Int16x8FromFloat32x4Bits(o); -} - -function Int16x8FromInt32x4BitsJS(o){ -return %Int16x8FromInt32x4Bits(o); -} - -function Int16x8FromUint32x4BitsJS(o){ -return %Int16x8FromUint32x4Bits(o); -} - -function Int16x8FromUint16x8BitsJS(o){ -return %Int16x8FromUint16x8Bits(o); -} - -function Int16x8FromInt8x16BitsJS(o){ -return %Int16x8FromInt8x16Bits(o); -} - -function Int16x8FromUint8x16BitsJS(o){ -return %Int16x8FromUint8x16Bits(o); -} - -function Uint16x8FromFloat32x4BitsJS(o){ -return %Uint16x8FromFloat32x4Bits(o); -} - -function Uint16x8FromInt32x4BitsJS(o){ -return %Uint16x8FromInt32x4Bits(o); -} - -function Uint16x8FromUint32x4BitsJS(o){ -return %Uint16x8FromUint32x4Bits(o); -} - -function Uint16x8FromInt16x8BitsJS(o){ -return %Uint16x8FromInt16x8Bits(o); -} - -function Uint16x8FromInt8x16BitsJS(o){ -return %Uint16x8FromInt8x16Bits(o); -} - -function Uint16x8FromUint8x16BitsJS(o){ -return %Uint16x8FromUint8x16Bits(o); -} - -function Int8x16FromFloat32x4BitsJS(o){ -return %Int8x16FromFloat32x4Bits(o); -} - -function Int8x16FromInt32x4BitsJS(o){ -return %Int8x16FromInt32x4Bits(o); -} - -function Int8x16FromUint32x4BitsJS(o){ -return %Int8x16FromUint32x4Bits(o); -} - -function Int8x16FromInt16x8BitsJS(o){ -return %Int8x16FromInt16x8Bits(o); -} - -function Int8x16FromUint16x8BitsJS(o){ -return %Int8x16FromUint16x8Bits(o); -} - -function Int8x16FromUint8x16BitsJS(o){ -return %Int8x16FromUint8x16Bits(o); -} - -function Uint8x16FromFloat32x4BitsJS(o){ -return %Uint8x16FromFloat32x4Bits(o); -} - -function Uint8x16FromInt32x4BitsJS(o){ -return %Uint8x16FromInt32x4Bits(o); -} - -function Uint8x16FromUint32x4BitsJS(o){ -return %Uint8x16FromUint32x4Bits(o); -} - -function Uint8x16FromInt16x8BitsJS(o){ -return %Uint8x16FromInt16x8Bits(o); -} - -function Uint8x16FromUint16x8BitsJS(o){ -return %Uint8x16FromUint16x8Bits(o); -} - -function Uint8x16FromInt8x16BitsJS(o){ -return %Uint8x16FromInt8x16Bits(o); -} - - -function Float32x4Load1JS(y,z){ -return %Float32x4Load1(y,z); -} -function Float32x4Store1JS(y,z,o){ -return %Float32x4Store1(y,z,o); -} - -function Float32x4Load2JS(y,z){ -return %Float32x4Load2(y,z); -} -function Float32x4Store2JS(y,z,o){ -return %Float32x4Store2(y,z,o); -} - -function Float32x4Load3JS(y,z){ -return %Float32x4Load3(y,z); -} -function Float32x4Store3JS(y,z,o){ -return %Float32x4Store3(y,z,o); -} - -function Int32x4Load1JS(y,z){ -return %Int32x4Load1(y,z); -} -function Int32x4Store1JS(y,z,o){ -return %Int32x4Store1(y,z,o); -} - -function Int32x4Load2JS(y,z){ -return %Int32x4Load2(y,z); -} -function Int32x4Store2JS(y,z,o){ -return %Int32x4Store2(y,z,o); -} - -function Int32x4Load3JS(y,z){ -return %Int32x4Load3(y,z); -} -function Int32x4Store3JS(y,z,o){ -return %Int32x4Store3(y,z,o); -} - -function Uint32x4Load1JS(y,z){ -return %Uint32x4Load1(y,z); -} -function Uint32x4Store1JS(y,z,o){ -return %Uint32x4Store1(y,z,o); -} - -function Uint32x4Load2JS(y,z){ -return %Uint32x4Load2(y,z); -} -function Uint32x4Store2JS(y,z,o){ -return %Uint32x4Store2(y,z,o); -} - -function Uint32x4Load3JS(y,z){ -return %Uint32x4Load3(y,z); -} -function Uint32x4Store3JS(y,z,o){ -return %Uint32x4Store3(y,z,o); -} - - -function Float32x4Splat(w){ -return %CreateFloat32x4(w,w,w,w); -} -function Float32x4SwizzleJS(o,A,B,C,D){ -return %Float32x4Swizzle(o,A,B,C,D); -} -function Float32x4ShuffleJS(o,v,A,B,C,D){ -return %Float32x4Shuffle(o,v,A,B,C,D); -} - -function Int32x4Splat(w){ -return %CreateInt32x4(w,w,w,w); -} -function Int32x4SwizzleJS(o,A,B,C,D){ -return %Int32x4Swizzle(o,A,B,C,D); -} -function Int32x4ShuffleJS(o,v,A,B,C,D){ -return %Int32x4Shuffle(o,v,A,B,C,D); -} - -function Uint32x4Splat(w){ -return %CreateUint32x4(w,w,w,w); -} -function Uint32x4SwizzleJS(o,A,B,C,D){ -return %Uint32x4Swizzle(o,A,B,C,D); -} -function Uint32x4ShuffleJS(o,v,A,B,C,D){ -return %Uint32x4Shuffle(o,v,A,B,C,D); -} - -function Bool32x4Splat(w){ -return %CreateBool32x4(w,w,w,w); -} -function Bool32x4SwizzleJS(o,A,B,C,D){ -return %Bool32x4Swizzle(o,A,B,C,D); -} -function Bool32x4ShuffleJS(o,v,A,B,C,D){ -return %Bool32x4Shuffle(o,v,A,B,C,D); -} - - -function Int16x8Splat(w){ -return %CreateInt16x8(w,w,w,w,w,w,w,w); -} -function Int16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ -return %Int16x8Swizzle(o,A,B,C,D,E,F,G,H); -} -function Int16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ -return %Int16x8Shuffle(o,v,A,B,C,D,E,F,G,H); -} - -function Uint16x8Splat(w){ -return %CreateUint16x8(w,w,w,w,w,w,w,w); -} -function Uint16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ -return %Uint16x8Swizzle(o,A,B,C,D,E,F,G,H); -} -function Uint16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ -return %Uint16x8Shuffle(o,v,A,B,C,D,E,F,G,H); -} - -function Bool16x8Splat(w){ -return %CreateBool16x8(w,w,w,w,w,w,w,w); -} -function Bool16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ -return %Bool16x8Swizzle(o,A,B,C,D,E,F,G,H); -} -function Bool16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ -return %Bool16x8Shuffle(o,v,A,B,C,D,E,F,G,H); -} - - -function Int8x16Splat(w){ -return %CreateInt8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); -} -function Int8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -return %Int8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15); -} -function Int8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15){ -return %Int8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15); -} - -function Uint8x16Splat(w){ -return %CreateUint8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); -} -function Uint8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -return %Uint8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15); -} -function Uint8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15){ -return %Uint8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15); -} - -function Bool8x16Splat(w){ -return %CreateBool8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); -} -function Bool8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -return %Bool8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15); -} -function Bool8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15){ -return %Bool8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15); -} - - -function Float32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Float32x4"); -} -return %CreateFloat32x4((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D))); -} -function Int32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Int32x4"); -} -return %CreateInt32x4((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D))); -} -function Uint32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Uint32x4"); -} -return %CreateUint32x4((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D))); -} -function Bool32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Bool32x4"); -} -return %CreateBool32x4(A,B,C,D); -} -function Int16x8Constructor(A,B,C,D,E,F,G,H){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Int16x8"); -} -return %CreateInt16x8((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H))); -} -function Uint16x8Constructor(A,B,C,D,E,F,G,H){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Uint16x8"); -} -return %CreateUint16x8((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H))); -} -function Bool16x8Constructor(A,B,C,D,E,F,G,H){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Bool16x8"); -} -return %CreateBool16x8(A,B,C,D,E,F,G,H); -} -function Int8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Int8x16"); -} -return %CreateInt8x16((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H)), -(%_ToNumber(c8)),(%_ToNumber(c9)), -(%_ToNumber(c10)),(%_ToNumber(c11)), -(%_ToNumber(c12)),(%_ToNumber(c13)), -(%_ToNumber(c14)),(%_ToNumber(c15))); -} -function Uint8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Uint8x16"); -} -return %CreateUint8x16((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H)), -(%_ToNumber(c8)),(%_ToNumber(c9)), -(%_ToNumber(c10)),(%_ToNumber(c11)), -(%_ToNumber(c12)),(%_ToNumber(c13)), -(%_ToNumber(c14)),(%_ToNumber(c15))); -} -function Bool8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Bool8x16"); -} -return %CreateBool8x16(A,B,C,D,E,F,G,H,c8,c9,c10,c11,c12, -c13,c14,c15); -} -function Float32x4AbsJS(o){ -return %Float32x4Abs(o); -} -function Float32x4SqrtJS(o){ -return %Float32x4Sqrt(o); -} -function Float32x4RecipApproxJS(o){ -return %Float32x4RecipApprox(o); -} -function Float32x4RecipSqrtApproxJS(o){ -return %Float32x4RecipSqrtApprox(o); -} -function Float32x4DivJS(o,v){ -return %Float32x4Div(o,v); -} -function Float32x4MinNumJS(o,v){ -return %Float32x4MinNum(o,v); -} -function Float32x4MaxNumJS(o,v){ -return %Float32x4MaxNum(o,v); -} -%AddNamedProperty(c,d,'SIMD',1|2); -%SetCode(e,Float32x4Constructor); -%FunctionSetPrototype(e,{}); -%AddNamedProperty(e.prototype,'constructor',e, -2); -%AddNamedProperty(e.prototype,d,'Float32x4', -2|1); -b.InstallFunctions(e.prototype,2,[ -'toLocaleString',Float32x4ToLocaleString, -'toString',Float32x4ToString, -'valueOf',Float32x4ValueOf, -]); - - -%SetCode(f,Int32x4Constructor); -%FunctionSetPrototype(f,{}); -%AddNamedProperty(f.prototype,'constructor',f, -2); -%AddNamedProperty(f.prototype,d,'Int32x4', -2|1); -b.InstallFunctions(f.prototype,2,[ -'toLocaleString',Int32x4ToLocaleString, -'toString',Int32x4ToString, -'valueOf',Int32x4ValueOf, -]); - -%SetCode(g,Int16x8Constructor); -%FunctionSetPrototype(g,{}); -%AddNamedProperty(g.prototype,'constructor',g, -2); -%AddNamedProperty(g.prototype,d,'Int16x8', -2|1); -b.InstallFunctions(g.prototype,2,[ -'toLocaleString',Int16x8ToLocaleString, -'toString',Int16x8ToString, -'valueOf',Int16x8ValueOf, -]); - -%SetCode(h,Int8x16Constructor); -%FunctionSetPrototype(h,{}); -%AddNamedProperty(h.prototype,'constructor',h, -2); -%AddNamedProperty(h.prototype,d,'Int8x16', -2|1); -b.InstallFunctions(h.prototype,2,[ -'toLocaleString',Int8x16ToLocaleString, -'toString',Int8x16ToString, -'valueOf',Int8x16ValueOf, -]); - - -%SetCode(i,Uint32x4Constructor); -%FunctionSetPrototype(i,{}); -%AddNamedProperty(i.prototype,'constructor',i, -2); -%AddNamedProperty(i.prototype,d,'Uint32x4', -2|1); -b.InstallFunctions(i.prototype,2,[ -'toLocaleString',Uint32x4ToLocaleString, -'toString',Uint32x4ToString, -'valueOf',Uint32x4ValueOf, -]); - -%SetCode(j,Uint16x8Constructor); -%FunctionSetPrototype(j,{}); -%AddNamedProperty(j.prototype,'constructor',j, -2); -%AddNamedProperty(j.prototype,d,'Uint16x8', -2|1); -b.InstallFunctions(j.prototype,2,[ -'toLocaleString',Uint16x8ToLocaleString, -'toString',Uint16x8ToString, -'valueOf',Uint16x8ValueOf, -]); - -%SetCode(k,Uint8x16Constructor); -%FunctionSetPrototype(k,{}); -%AddNamedProperty(k.prototype,'constructor',k, -2); -%AddNamedProperty(k.prototype,d,'Uint8x16', -2|1); -b.InstallFunctions(k.prototype,2,[ -'toLocaleString',Uint8x16ToLocaleString, -'toString',Uint8x16ToString, -'valueOf',Uint8x16ValueOf, -]); - - -%SetCode(l,Bool32x4Constructor); -%FunctionSetPrototype(l,{}); -%AddNamedProperty(l.prototype,'constructor',l, -2); -%AddNamedProperty(l.prototype,d,'Bool32x4', -2|1); -b.InstallFunctions(l.prototype,2,[ -'toLocaleString',Bool32x4ToLocaleString, -'toString',Bool32x4ToString, -'valueOf',Bool32x4ValueOf, -]); - -%SetCode(m,Bool16x8Constructor); -%FunctionSetPrototype(m,{}); -%AddNamedProperty(m.prototype,'constructor',m, -2); -%AddNamedProperty(m.prototype,d,'Bool16x8', -2|1); -b.InstallFunctions(m.prototype,2,[ -'toLocaleString',Bool16x8ToLocaleString, -'toString',Bool16x8ToString, -'valueOf',Bool16x8ValueOf, -]); - -%SetCode(n,Bool8x16Constructor); -%FunctionSetPrototype(n,{}); -%AddNamedProperty(n.prototype,'constructor',n, -2); -%AddNamedProperty(n.prototype,d,'Bool8x16', -2|1); -b.InstallFunctions(n.prototype,2,[ -'toLocaleString',Bool8x16ToLocaleString, -'toString',Bool8x16ToString, -'valueOf',Bool8x16ValueOf, -]); - - - -b.InstallFunctions(e,2,[ -'splat',Float32x4Splat, -'check',Float32x4CheckJS, -'extractLane',Float32x4ExtractLaneJS, -'replaceLane',Float32x4ReplaceLaneJS, -'neg',Float32x4NegJS, -'abs',Float32x4AbsJS, -'sqrt',Float32x4SqrtJS, -'reciprocalApproximation',Float32x4RecipApproxJS, -'reciprocalSqrtApproximation',Float32x4RecipSqrtApproxJS, -'add',Float32x4AddJS, -'sub',Float32x4SubJS, -'mul',Float32x4MulJS, -'div',Float32x4DivJS, -'min',Float32x4MinJS, -'max',Float32x4MaxJS, -'minNum',Float32x4MinNumJS, -'maxNum',Float32x4MaxNumJS, -'lessThan',Float32x4LessThanJS, -'lessThanOrEqual',Float32x4LessThanOrEqualJS, -'greaterThan',Float32x4GreaterThanJS, -'greaterThanOrEqual',Float32x4GreaterThanOrEqualJS, -'equal',Float32x4EqualJS, -'notEqual',Float32x4NotEqualJS, -'select',Float32x4SelectJS, -'swizzle',Float32x4SwizzleJS, -'shuffle',Float32x4ShuffleJS, -'fromInt32x4',Float32x4FromInt32x4JS, -'fromUint32x4',Float32x4FromUint32x4JS, -'fromInt32x4Bits',Float32x4FromInt32x4BitsJS, -'fromUint32x4Bits',Float32x4FromUint32x4BitsJS, -'fromInt16x8Bits',Float32x4FromInt16x8BitsJS, -'fromUint16x8Bits',Float32x4FromUint16x8BitsJS, -'fromInt8x16Bits',Float32x4FromInt8x16BitsJS, -'fromUint8x16Bits',Float32x4FromUint8x16BitsJS, -'load',Float32x4LoadJS, -'load1',Float32x4Load1JS, -'load2',Float32x4Load2JS, -'load3',Float32x4Load3JS, -'store',Float32x4StoreJS, -'store1',Float32x4Store1JS, -'store2',Float32x4Store2JS, -'store3',Float32x4Store3JS, -]); -b.InstallFunctions(f,2,[ -'splat',Int32x4Splat, -'check',Int32x4CheckJS, -'extractLane',Int32x4ExtractLaneJS, -'replaceLane',Int32x4ReplaceLaneJS, -'neg',Int32x4NegJS, -'add',Int32x4AddJS, -'sub',Int32x4SubJS, -'mul',Int32x4MulJS, -'min',Int32x4MinJS, -'max',Int32x4MaxJS, -'and',Int32x4AndJS, -'or',Int32x4OrJS, -'xor',Int32x4XorJS, -'not',Int32x4NotJS, -'shiftLeftByScalar',Int32x4ShiftLeftByScalarJS, -'shiftRightByScalar',Int32x4ShiftRightByScalarJS, -'lessThan',Int32x4LessThanJS, -'lessThanOrEqual',Int32x4LessThanOrEqualJS, -'greaterThan',Int32x4GreaterThanJS, -'greaterThanOrEqual',Int32x4GreaterThanOrEqualJS, -'equal',Int32x4EqualJS, -'notEqual',Int32x4NotEqualJS, -'select',Int32x4SelectJS, -'swizzle',Int32x4SwizzleJS, -'shuffle',Int32x4ShuffleJS, -'fromFloat32x4',Int32x4FromFloat32x4JS, -'fromUint32x4',Int32x4FromUint32x4JS, -'fromFloat32x4Bits',Int32x4FromFloat32x4BitsJS, -'fromUint32x4Bits',Int32x4FromUint32x4BitsJS, -'fromInt16x8Bits',Int32x4FromInt16x8BitsJS, -'fromUint16x8Bits',Int32x4FromUint16x8BitsJS, -'fromInt8x16Bits',Int32x4FromInt8x16BitsJS, -'fromUint8x16Bits',Int32x4FromUint8x16BitsJS, -'load',Int32x4LoadJS, -'load1',Int32x4Load1JS, -'load2',Int32x4Load2JS, -'load3',Int32x4Load3JS, -'store',Int32x4StoreJS, -'store1',Int32x4Store1JS, -'store2',Int32x4Store2JS, -'store3',Int32x4Store3JS, -]); -b.InstallFunctions(i,2,[ -'splat',Uint32x4Splat, -'check',Uint32x4CheckJS, -'extractLane',Uint32x4ExtractLaneJS, -'replaceLane',Uint32x4ReplaceLaneJS, -'add',Uint32x4AddJS, -'sub',Uint32x4SubJS, -'mul',Uint32x4MulJS, -'min',Uint32x4MinJS, -'max',Uint32x4MaxJS, -'and',Uint32x4AndJS, -'or',Uint32x4OrJS, -'xor',Uint32x4XorJS, -'not',Uint32x4NotJS, -'shiftLeftByScalar',Uint32x4ShiftLeftByScalarJS, -'shiftRightByScalar',Uint32x4ShiftRightByScalarJS, -'lessThan',Uint32x4LessThanJS, -'lessThanOrEqual',Uint32x4LessThanOrEqualJS, -'greaterThan',Uint32x4GreaterThanJS, -'greaterThanOrEqual',Uint32x4GreaterThanOrEqualJS, -'equal',Uint32x4EqualJS, -'notEqual',Uint32x4NotEqualJS, -'select',Uint32x4SelectJS, -'swizzle',Uint32x4SwizzleJS, -'shuffle',Uint32x4ShuffleJS, -'fromFloat32x4',Uint32x4FromFloat32x4JS, -'fromInt32x4',Uint32x4FromInt32x4JS, -'fromFloat32x4Bits',Uint32x4FromFloat32x4BitsJS, -'fromInt32x4Bits',Uint32x4FromInt32x4BitsJS, -'fromInt16x8Bits',Uint32x4FromInt16x8BitsJS, -'fromUint16x8Bits',Uint32x4FromUint16x8BitsJS, -'fromInt8x16Bits',Uint32x4FromInt8x16BitsJS, -'fromUint8x16Bits',Uint32x4FromUint8x16BitsJS, -'load',Uint32x4LoadJS, -'load1',Uint32x4Load1JS, -'load2',Uint32x4Load2JS, -'load3',Uint32x4Load3JS, -'store',Uint32x4StoreJS, -'store1',Uint32x4Store1JS, -'store2',Uint32x4Store2JS, -'store3',Uint32x4Store3JS, -]); -b.InstallFunctions(l,2,[ -'splat',Bool32x4Splat, -'check',Bool32x4CheckJS, -'extractLane',Bool32x4ExtractLaneJS, -'replaceLane',Bool32x4ReplaceLaneJS, -'and',Bool32x4AndJS, -'or',Bool32x4OrJS, -'xor',Bool32x4XorJS, -'not',Bool32x4NotJS, -'anyTrue',Bool32x4AnyTrueJS, -'allTrue',Bool32x4AllTrueJS, -'swizzle',Bool32x4SwizzleJS, -'shuffle',Bool32x4ShuffleJS, -]); -b.InstallFunctions(g,2,[ -'splat',Int16x8Splat, -'check',Int16x8CheckJS, -'extractLane',Int16x8ExtractLaneJS, -'replaceLane',Int16x8ReplaceLaneJS, -'neg',Int16x8NegJS, -'add',Int16x8AddJS, -'sub',Int16x8SubJS, -'addSaturate',Int16x8AddSaturateJS, -'subSaturate',Int16x8SubSaturateJS, -'mul',Int16x8MulJS, -'min',Int16x8MinJS, -'max',Int16x8MaxJS, -'and',Int16x8AndJS, -'or',Int16x8OrJS, -'xor',Int16x8XorJS, -'not',Int16x8NotJS, -'shiftLeftByScalar',Int16x8ShiftLeftByScalarJS, -'shiftRightByScalar',Int16x8ShiftRightByScalarJS, -'lessThan',Int16x8LessThanJS, -'lessThanOrEqual',Int16x8LessThanOrEqualJS, -'greaterThan',Int16x8GreaterThanJS, -'greaterThanOrEqual',Int16x8GreaterThanOrEqualJS, -'equal',Int16x8EqualJS, -'notEqual',Int16x8NotEqualJS, -'select',Int16x8SelectJS, -'swizzle',Int16x8SwizzleJS, -'shuffle',Int16x8ShuffleJS, -'fromUint16x8',Int16x8FromUint16x8JS, -'fromFloat32x4Bits',Int16x8FromFloat32x4BitsJS, -'fromInt32x4Bits',Int16x8FromInt32x4BitsJS, -'fromUint32x4Bits',Int16x8FromUint32x4BitsJS, -'fromUint16x8Bits',Int16x8FromUint16x8BitsJS, -'fromInt8x16Bits',Int16x8FromInt8x16BitsJS, -'fromUint8x16Bits',Int16x8FromUint8x16BitsJS, -'load',Int16x8LoadJS, -'store',Int16x8StoreJS, -]); -b.InstallFunctions(j,2,[ -'splat',Uint16x8Splat, -'check',Uint16x8CheckJS, -'extractLane',Uint16x8ExtractLaneJS, -'replaceLane',Uint16x8ReplaceLaneJS, -'add',Uint16x8AddJS, -'sub',Uint16x8SubJS, -'addSaturate',Uint16x8AddSaturateJS, -'subSaturate',Uint16x8SubSaturateJS, -'mul',Uint16x8MulJS, -'min',Uint16x8MinJS, -'max',Uint16x8MaxJS, -'and',Uint16x8AndJS, -'or',Uint16x8OrJS, -'xor',Uint16x8XorJS, -'not',Uint16x8NotJS, -'shiftLeftByScalar',Uint16x8ShiftLeftByScalarJS, -'shiftRightByScalar',Uint16x8ShiftRightByScalarJS, -'lessThan',Uint16x8LessThanJS, -'lessThanOrEqual',Uint16x8LessThanOrEqualJS, -'greaterThan',Uint16x8GreaterThanJS, -'greaterThanOrEqual',Uint16x8GreaterThanOrEqualJS, -'equal',Uint16x8EqualJS, -'notEqual',Uint16x8NotEqualJS, -'select',Uint16x8SelectJS, -'swizzle',Uint16x8SwizzleJS, -'shuffle',Uint16x8ShuffleJS, -'fromInt16x8',Uint16x8FromInt16x8JS, -'fromFloat32x4Bits',Uint16x8FromFloat32x4BitsJS, -'fromInt32x4Bits',Uint16x8FromInt32x4BitsJS, -'fromUint32x4Bits',Uint16x8FromUint32x4BitsJS, -'fromInt16x8Bits',Uint16x8FromInt16x8BitsJS, -'fromInt8x16Bits',Uint16x8FromInt8x16BitsJS, -'fromUint8x16Bits',Uint16x8FromUint8x16BitsJS, -'load',Uint16x8LoadJS, -'store',Uint16x8StoreJS, -]); -b.InstallFunctions(m,2,[ -'splat',Bool16x8Splat, -'check',Bool16x8CheckJS, -'extractLane',Bool16x8ExtractLaneJS, -'replaceLane',Bool16x8ReplaceLaneJS, -'and',Bool16x8AndJS, -'or',Bool16x8OrJS, -'xor',Bool16x8XorJS, -'not',Bool16x8NotJS, -'anyTrue',Bool16x8AnyTrueJS, -'allTrue',Bool16x8AllTrueJS, -'swizzle',Bool16x8SwizzleJS, -'shuffle',Bool16x8ShuffleJS, -]); -b.InstallFunctions(h,2,[ -'splat',Int8x16Splat, -'check',Int8x16CheckJS, -'extractLane',Int8x16ExtractLaneJS, -'replaceLane',Int8x16ReplaceLaneJS, -'neg',Int8x16NegJS, -'add',Int8x16AddJS, -'sub',Int8x16SubJS, -'addSaturate',Int8x16AddSaturateJS, -'subSaturate',Int8x16SubSaturateJS, -'mul',Int8x16MulJS, -'min',Int8x16MinJS, -'max',Int8x16MaxJS, -'and',Int8x16AndJS, -'or',Int8x16OrJS, -'xor',Int8x16XorJS, -'not',Int8x16NotJS, -'shiftLeftByScalar',Int8x16ShiftLeftByScalarJS, -'shiftRightByScalar',Int8x16ShiftRightByScalarJS, -'lessThan',Int8x16LessThanJS, -'lessThanOrEqual',Int8x16LessThanOrEqualJS, -'greaterThan',Int8x16GreaterThanJS, -'greaterThanOrEqual',Int8x16GreaterThanOrEqualJS, -'equal',Int8x16EqualJS, -'notEqual',Int8x16NotEqualJS, -'select',Int8x16SelectJS, -'swizzle',Int8x16SwizzleJS, -'shuffle',Int8x16ShuffleJS, -'fromUint8x16',Int8x16FromUint8x16JS, -'fromFloat32x4Bits',Int8x16FromFloat32x4BitsJS, -'fromInt32x4Bits',Int8x16FromInt32x4BitsJS, -'fromUint32x4Bits',Int8x16FromUint32x4BitsJS, -'fromInt16x8Bits',Int8x16FromInt16x8BitsJS, -'fromUint16x8Bits',Int8x16FromUint16x8BitsJS, -'fromUint8x16Bits',Int8x16FromUint8x16BitsJS, -'load',Int8x16LoadJS, -'store',Int8x16StoreJS, -]); -b.InstallFunctions(k,2,[ -'splat',Uint8x16Splat, -'check',Uint8x16CheckJS, -'extractLane',Uint8x16ExtractLaneJS, -'replaceLane',Uint8x16ReplaceLaneJS, -'add',Uint8x16AddJS, -'sub',Uint8x16SubJS, -'addSaturate',Uint8x16AddSaturateJS, -'subSaturate',Uint8x16SubSaturateJS, -'mul',Uint8x16MulJS, -'min',Uint8x16MinJS, -'max',Uint8x16MaxJS, -'and',Uint8x16AndJS, -'or',Uint8x16OrJS, -'xor',Uint8x16XorJS, -'not',Uint8x16NotJS, -'shiftLeftByScalar',Uint8x16ShiftLeftByScalarJS, -'shiftRightByScalar',Uint8x16ShiftRightByScalarJS, -'lessThan',Uint8x16LessThanJS, -'lessThanOrEqual',Uint8x16LessThanOrEqualJS, -'greaterThan',Uint8x16GreaterThanJS, -'greaterThanOrEqual',Uint8x16GreaterThanOrEqualJS, -'equal',Uint8x16EqualJS, -'notEqual',Uint8x16NotEqualJS, -'select',Uint8x16SelectJS, -'swizzle',Uint8x16SwizzleJS, -'shuffle',Uint8x16ShuffleJS, -'fromInt8x16',Uint8x16FromInt8x16JS, -'fromFloat32x4Bits',Uint8x16FromFloat32x4BitsJS, -'fromInt32x4Bits',Uint8x16FromInt32x4BitsJS, -'fromUint32x4Bits',Uint8x16FromUint32x4BitsJS, -'fromInt16x8Bits',Uint8x16FromInt16x8BitsJS, -'fromUint16x8Bits',Uint8x16FromUint16x8BitsJS, -'fromInt8x16Bits',Uint8x16FromInt8x16BitsJS, -'load',Uint8x16LoadJS, -'store',Uint8x16StoreJS, -]); -b.InstallFunctions(n,2,[ -'splat',Bool8x16Splat, -'check',Bool8x16CheckJS, -'extractLane',Bool8x16ExtractLaneJS, -'replaceLane',Bool8x16ReplaceLaneJS, -'and',Bool8x16AndJS, -'or',Bool8x16OrJS, -'xor',Bool8x16XorJS, -'not',Bool8x16NotJS, -'anyTrue',Bool8x16AnyTrueJS, -'allTrue',Bool8x16AllTrueJS, -'swizzle',Bool8x16SwizzleJS, -'shuffle',Bool8x16ShuffleJS, -]); -}) - -Xharmony-string-paddingY -(function(a,b){ -%CheckIsBootstrapping(); -var c=a.String; -function StringPad(d,e,f){ -e=(%_ToLength(e)); -var g=d.length; -if(e<=g)return""; -if((f===(void 0))){ -f=" "; -}else{ -f=(%_ToString(f)); -if(f===""){ -return""; -} -} -var h=e-g; -var i=(h/f.length)|0; -var j=(h-f.length*i)|0; -var k=""; -while(true){ -if(i&1)k+=f; -i>>=1; -if(i===0)break; -f+=f; -} -if(j){ -k+=%_SubString(f,0,j); -} -return k; -} -function StringPadStart(e,f){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.padStart") -var d=(%_ToString(this)); -return StringPad(d,e,f)+d; -} -%FunctionSetLength(StringPadStart,1); -function StringPadEnd(e,f){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.padEnd") -var d=(%_ToString(this)); -return d+StringPad(d,e,f); -} -%FunctionSetLength(StringPadEnd,1); -b.InstallFunctions(c.prototype,2,[ -"padStart",StringPadStart, -"padEnd",StringPadEnd -]); -}); - -`datetime-format-to-partsé -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.Intl; -var d=b.ImportNow("FormatDateToParts"); -b.InstallFunctions(c.DateTimeFormat.prototype,2,[ -'formatToParts',d -]); -}) - -@icu-case-mapping± -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.String; -var d=b.OverrideFunction; -var e=b.ImportNow("ToLowerCaseI18N"); -var f=b.ImportNow("ToUpperCaseI18N"); -var g=b.ImportNow("ToLocaleLowerCaseI18N"); -var h=b.ImportNow("ToLocaleUpperCaseI18N"); -d(c.prototype,'toLowerCase',e,true); -d(c.prototype,'toUpperCase',f,true); -d(c.prototype,'toLocaleLowerCase', -g,true); -d(c.prototype,'toLocaleUpperCase', -h,true); -}) - - dByteLengthQueuingStrategyÑ -(function(global, binding, v8) { - 'use strict'; - const defineProperty = global.Object.defineProperty; - class ByteLengthQueuingStrategy { - constructor(options) { - defineProperty(this, 'highWaterMark', { - value: options.highWaterMark, - enumerable: true, - configurable: true, - writable: true - }); - } - size(chunk) { return chunk.byteLength; } - } - defineProperty(global, 'ByteLengthQueuingStrategy', { - value: ByteLengthQueuingStrategy, - enumerable: false, - configurable: true, - writable: true - }); -}); -PCountQueuingStrategyý -(function(global, binding, v8) { - 'use strict'; - const defineProperty = global.Object.defineProperty; - class CountQueuingStrategy { - constructor(options) { - defineProperty(this, 'highWaterMark', { - value: options.highWaterMark, - enumerable: true, - configurable: true, - writable: true - }); - } - size(chunk) { return 1; } - } - defineProperty(global, 'CountQueuingStrategy', { - value: CountQueuingStrategy, - enumerable: false, - configurable: true, - writable: true - }); - class BuiltInCountQueuingStrategy { - constructor(highWaterMark) { - defineProperty(this, 'highWaterMark', {value: highWaterMark}); - } - size(chunk) { return 1; } - } - binding.createBuiltInCountQueuingStrategy = highWaterMark => - new BuiltInCountQueuingStrategy(highWaterMark); -}); -8ReadableStream6Ý -(function(global, binding, v8) { - 'use strict'; - const readableStreamReader = v8.createPrivateSymbol('[[reader]]'); - const readableStreamStoredError = v8.createPrivateSymbol('[[storedError]]'); - const readableStreamController = v8.createPrivateSymbol('[[controller]]'); - const readableStreamReaderClosedPromise = - v8.createPrivateSymbol('[[closedPromise]]'); - const readableStreamReaderOwnerReadableStream = - v8.createPrivateSymbol('[[ownerReadableStream]]'); - const readableStreamDefaultReaderReadRequests = - v8.createPrivateSymbol('[[readRequests]]'); - const createWithExternalControllerSentinel = - v8.createPrivateSymbol('flag for UA-created ReadableStream to pass'); - const readableStreamBits = v8.createPrivateSymbol('bit field for [[state]] and [[disturbed]]'); - const DISTURBED = 0b1; - const STATE_MASK = 0b110; - const STATE_BITS_OFFSET = 1; - const STATE_READABLE = 0; - const STATE_CLOSED = 1; - const STATE_ERRORED = 2; - const readableStreamDefaultControllerUnderlyingSource = - v8.createPrivateSymbol('[[underlyingSource]]'); - const readableStreamDefaultControllerControlledReadableStream = - v8.createPrivateSymbol('[[controlledReadableStream]]'); - const readableStreamDefaultControllerQueue = v8.createPrivateSymbol('[[queue]]'); - const readableStreamDefaultControllerQueueSize = - v8.createPrivateSymbol('[[queue]] total size'); - const readableStreamDefaultControllerStrategySize = - v8.createPrivateSymbol('[[strategySize]]'); - const readableStreamDefaultControllerStrategyHWM = - v8.createPrivateSymbol('[[strategyHWM]]'); - const readableStreamDefaultControllerBits = v8.createPrivateSymbol( - 'bit field for [[started]], [[closeRequested]], [[pulling]], [[pullAgain]]'); - const STARTED = 0b1; - const CLOSE_REQUESTED = 0b10; - const PULLING = 0b100; - const PULL_AGAIN = 0b1000; - const EXTERNALLY_CONTROLLED = 0b10000; - const readableStreamControllerCancel = - v8.createPrivateSymbol('[[InternalCancel]]'); - const readableStreamControllerPull = v8.createPrivateSymbol('[[InternalPull]]'); - const undefined = global.undefined; - const Infinity = global.Infinity; - const defineProperty = global.Object.defineProperty; - const hasOwnProperty = v8.uncurryThis(global.Object.hasOwnProperty); - const callFunction = v8.uncurryThis(global.Function.prototype.call); - const TypeError = global.TypeError; - const RangeError = global.RangeError; - const Number = global.Number; - const Number_isNaN = Number.isNaN; - const Number_isFinite = Number.isFinite; - const Promise = global.Promise; - const thenPromise = v8.uncurryThis(Promise.prototype.then); - const Promise_resolve = v8.simpleBind(Promise.resolve, Promise); - const Promise_reject = v8.simpleBind(Promise.reject, Promise); - const errIllegalInvocation = 'Illegal invocation'; - const errIllegalConstructor = 'Illegal constructor'; - const errCancelLockedStream = - 'Cannot cancel a readable stream that is locked to a reader'; - const errEnqueueCloseRequestedStream = - 'Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed'; - const errCancelReleasedReader = - 'This readable stream reader has been released and cannot be used to cancel its previous owner stream'; - const errReadReleasedReader = - 'This readable stream reader has been released and cannot be used to read from its previous owner stream'; - const errCloseCloseRequestedStream = - 'Cannot close a readable stream that has already been requested to be closed'; - const errEnqueueClosedStream = 'Cannot enqueue a chunk into a closed readable stream'; - const errEnqueueErroredStream = 'Cannot enqueue a chunk into an errored readable stream'; - const errCloseClosedStream = 'Cannot close a closed readable stream'; - const errCloseErroredStream = 'Cannot close an errored readable stream'; - const errErrorClosedStream = 'Cannot error a close readable stream'; - const errErrorErroredStream = - 'Cannot error a readable stream that is already errored'; - const errGetReaderNotByteStream = 'This readable stream does not support BYOB readers'; - const errGetReaderBadMode = 'Invalid reader mode given: expected undefined or "byob"'; - const errReaderConstructorBadArgument = - 'ReadableStreamReader constructor argument is not a readable stream'; - const errReaderConstructorStreamAlreadyLocked = - 'ReadableStreamReader constructor can only accept readable streams that are not yet locked to a reader'; - const errReleaseReaderWithPendingRead = - 'Cannot release a readable stream reader when it still has outstanding read() calls that have not yet settled'; - const errReleasedReaderClosedPromise = - 'This readable stream reader has been released and cannot be used to monitor the stream\'s state'; - const errInvalidSize = - 'The return value of a queuing strategy\'s size function must be a finite, non-NaN, non-negative number'; - const errSizeNotAFunction = - 'A queuing strategy\'s size property must be a function'; - const errInvalidHWM = - 'A queueing strategy\'s highWaterMark property must be a nonnegative, non-NaN number'; - const errTmplMustBeFunctionOrUndefined = name => - `${name} must be a function or undefined`; - class ReadableStream { - constructor() { - const underlyingSource = arguments[0] === undefined ? {} : arguments[0]; - const strategy = arguments[1] === undefined ? {} : arguments[1]; - const size = strategy.size; - let highWaterMark = strategy.highWaterMark; - if (highWaterMark === undefined) { - highWaterMark = 1; - } - this[readableStreamBits] = 0b0; - ReadableStreamSetState(this, STATE_READABLE); - this[readableStreamReader] = undefined; - this[readableStreamStoredError] = undefined; - this[readableStreamController] = undefined; - const type = underlyingSource.type; - const typeString = String(type); - if (typeString === 'bytes') { - throw new RangeError('bytes type is not yet implemented'); - } else if (type !== undefined) { - throw new RangeError('Invalid type is specified'); - } - this[readableStreamController] = - new ReadableStreamDefaultController(this, underlyingSource, size, highWaterMark, arguments[2] === createWithExternalControllerSentinel); - } - get locked() { - if (IsReadableStream(this) === false) { - throw new TypeError(errIllegalInvocation); - } - return IsReadableStreamLocked(this); - } - cancel(reason) { - if (IsReadableStream(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - if (IsReadableStreamLocked(this) === true) { - return Promise_reject(new TypeError(errCancelLockedStream)); - } - return ReadableStreamCancel(this, reason); - } - getReader({ mode } = {}) { - if (IsReadableStream(this) === false) { - throw new TypeError(errIllegalInvocation); - } - if (mode === 'byob') { - if (IsReadableByteStreamDefaultController(this[readableStreamController]) === false) { - throw new TypeError(errGetReaderNotByteStream); - } - return AcquireReadableStreamBYOBReader(this); - } - if (mode === undefined) { - return AcquireReadableStreamDefaultReader(this); - } - throw new RangeError(errGetReaderBadMode); - } - tee() { - if (IsReadableStream(this) === false) { - throw new TypeError(errIllegalInvocation); - } - return ReadableStreamTee(this); - } - } - class ReadableStreamDefaultController { - constructor(stream, underlyingSource, size, highWaterMark, isExternallyControlled) { - if (IsReadableStream(stream) === false) { - throw new TypeError(errIllegalConstructor); - } - if (stream[readableStreamController] !== undefined) { - throw new TypeError(errIllegalConstructor); - } - this[readableStreamDefaultControllerControlledReadableStream] = stream; - this[readableStreamDefaultControllerUnderlyingSource] = underlyingSource; - this[readableStreamDefaultControllerQueue] = new v8.InternalPackedArray(); - this[readableStreamDefaultControllerQueueSize] = 0; - this[readableStreamDefaultControllerBits] = 0b0; - if (isExternallyControlled === true) { - this[readableStreamDefaultControllerBits] |= EXTERNALLY_CONTROLLED; - } - const normalizedStrategy = - ValidateAndNormalizeQueuingStrategy(size, highWaterMark); - this[readableStreamDefaultControllerStrategySize] = normalizedStrategy.size; - this[readableStreamDefaultControllerStrategyHWM] = normalizedStrategy.highWaterMark; - const controller = this; - const startResult = CallOrNoop( - underlyingSource, 'start', this, 'underlyingSource.start'); - thenPromise(Promise_resolve(startResult), - () => { - controller[readableStreamDefaultControllerBits] |= STARTED; - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - }, - r => { - if (ReadableStreamGetState(stream) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, r); - } - }); - } - get desiredSize() { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - return ReadableStreamDefaultControllerGetDesiredSize(this); - } - close() { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamDefaultControllerControlledReadableStream]; - if (this[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { - throw new TypeError(errCloseCloseRequestedStream); - } - const state = ReadableStreamGetState(stream); - if (state === STATE_ERRORED) { - throw new TypeError(errCloseErroredStream); - } - if (state === STATE_CLOSED) { - throw new TypeError(errCloseClosedStream); - } - return ReadableStreamDefaultControllerClose(this); - } - enqueue(chunk) { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamDefaultControllerControlledReadableStream]; - if (this[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { - throw new TypeError(errEnqueueCloseRequestedStream); - } - const state = ReadableStreamGetState(stream); - if (state === STATE_ERRORED) { - throw new TypeError(errEnqueueErroredStream); - } - if (state === STATE_CLOSED) { - throw new TypeError(errEnqueueClosedStream); - } - return ReadableStreamDefaultControllerEnqueue(this, chunk); - } - error(e) { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamDefaultControllerControlledReadableStream]; - const state = ReadableStreamGetState(stream); - if (state === STATE_ERRORED) { - throw new TypeError(errErrorErroredStream); - } - if (state === STATE_CLOSED) { - throw new TypeError(errErrorClosedStream); - } - return ReadableStreamDefaultControllerError(this, e); - } - } - function ReadableStreamDefaultControllerCancel(controller, reason) { - controller[readableStreamDefaultControllerQueue] = new v8.InternalPackedArray(); - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - return PromiseCallOrNoop(underlyingSource, 'cancel', reason, 'underlyingSource.cancel'); - } - function ReadableStreamDefaultControllerPull(controller) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - if (controller[readableStreamDefaultControllerQueue].length > 0) { - const chunk = DequeueValue(controller); - if ((controller[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) && - controller[readableStreamDefaultControllerQueue].length === 0) { - ReadableStreamClose(stream); - } else { - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - return Promise_resolve(CreateIterResultObject(chunk, false)); - } - const pendingPromise = ReadableStreamAddReadRequest(stream); - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - return pendingPromise; - } - function ReadableStreamAddReadRequest(stream) { - const promise = v8.createPromise(); - stream[readableStreamReader][readableStreamDefaultReaderReadRequests].push(promise); - return promise; - } - class ReadableStreamDefaultReader { - constructor(stream) { - if (IsReadableStream(stream) === false) { - throw new TypeError(errReaderConstructorBadArgument); - } - if (IsReadableStreamLocked(stream) === true) { - throw new TypeError(errReaderConstructorStreamAlreadyLocked); - } - ReadableStreamReaderGenericInitialize(this, stream); - this[readableStreamDefaultReaderReadRequests] = new v8.InternalPackedArray(); - } - get closed() { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - return this[readableStreamReaderClosedPromise]; - } - cancel(reason) { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - const stream = this[readableStreamReaderOwnerReadableStream]; - if (stream === undefined) { - return Promise_reject(new TypeError(errCancelReleasedReader)); - } - return ReadableStreamReaderGenericCancel(this, reason); - } - read() { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - if (this[readableStreamReaderOwnerReadableStream] === undefined) { - return Promise_reject(new TypeError(errReadReleasedReader)); - } - return ReadableStreamDefaultReaderRead(this); - } - releaseLock() { - if (IsReadableStreamDefaultReader(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamReaderOwnerReadableStream]; - if (stream === undefined) { - return undefined; - } - if (this[readableStreamDefaultReaderReadRequests].length > 0) { - throw new TypeError(errReleaseReaderWithPendingRead); - } - ReadableStreamReaderGenericRelease(this); - } - } - function ReadableStreamReaderGenericCancel(reader, reason) { - return ReadableStreamCancel(reader[readableStreamReaderOwnerReadableStream], reason); - } - function AcquireReadableStreamDefaultReader(stream) { - return new ReadableStreamDefaultReader(stream); - } - function ReadableStreamCancel(stream, reason) { - stream[readableStreamBits] |= DISTURBED; - const state = ReadableStreamGetState(stream); - if (state === STATE_CLOSED) { - return Promise_resolve(undefined); - } - if (state === STATE_ERRORED) { - return Promise_reject(stream[readableStreamStoredError]); - } - ReadableStreamClose(stream); - const sourceCancelPromise = ReadableStreamDefaultControllerCancel(stream[readableStreamController], reason); - return thenPromise(sourceCancelPromise, () => undefined); - } - function ReadableStreamDefaultControllerClose(controller) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - controller[readableStreamDefaultControllerBits] |= CLOSE_REQUESTED; - if (controller[readableStreamDefaultControllerQueue].length === 0) { - ReadableStreamClose(stream); - } - } - function ReadableStreamFulfillReadRequest(stream, chunk, done) { - const reader = stream[readableStreamReader]; - const readRequest = - stream[readableStreamReader][readableStreamDefaultReaderReadRequests] - .shift(); - v8.resolvePromise(readRequest, CreateIterResultObject(chunk, done)); - } - function ReadableStreamDefaultControllerEnqueue(controller, chunk) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - ReadableStreamFulfillReadRequest(stream, chunk, false); - } else { - let chunkSize = 1; - const strategySize = controller[readableStreamDefaultControllerStrategySize]; - if (strategySize !== undefined) { - try { - chunkSize = strategySize(chunk); - } catch (chunkSizeE) { - if (ReadableStreamGetState(stream) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, chunkSizeE); - } - throw chunkSizeE; - } - } - try { - EnqueueValueWithSize(controller, chunk, chunkSize); - } catch (enqueueE) { - if (ReadableStreamGetState(stream) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, enqueueE); - } - throw enqueueE; - } - } - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - function ReadableStreamGetState(stream) { - return (stream[readableStreamBits] & STATE_MASK) >> STATE_BITS_OFFSET; - } - function ReadableStreamSetState(stream, state) { - stream[readableStreamBits] = (stream[readableStreamBits] & ~STATE_MASK) | - (state << STATE_BITS_OFFSET); - } - function ReadableStreamDefaultControllerError(controller, e) { - controller[readableStreamDefaultControllerQueue] = new v8.InternalPackedArray(); - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - ReadableStreamError(stream, e); - } - function ReadableStreamError(stream, e) { - stream[readableStreamStoredError] = e; - ReadableStreamSetState(stream, STATE_ERRORED); - const reader = stream[readableStreamReader]; - if (reader === undefined) { - return undefined; - } - if (IsReadableStreamDefaultReader(reader) === true) { - const readRequests = reader[readableStreamDefaultReaderReadRequests]; - for (let i = 0; i < readRequests.length; i++) { - v8.rejectPromise(readRequests[i], e); - } - reader[readableStreamDefaultReaderReadRequests] = new v8.InternalPackedArray(); - } - v8.rejectPromise(reader[readableStreamReaderClosedPromise], e); - } - function ReadableStreamClose(stream) { - ReadableStreamSetState(stream, STATE_CLOSED); - const reader = stream[readableStreamReader]; - if (reader === undefined) { - return undefined; - } - if (IsReadableStreamDefaultReader(reader) === true) { - const readRequests = reader[readableStreamDefaultReaderReadRequests]; - for (let i = 0; i < readRequests.length; i++) { - v8.resolvePromise( - readRequests[i], CreateIterResultObject(undefined, true)); - } - reader[readableStreamDefaultReaderReadRequests] = new v8.InternalPackedArray(); - } - v8.resolvePromise(reader[readableStreamReaderClosedPromise], undefined); - } - function ReadableStreamDefaultControllerGetDesiredSize(controller) { - const queueSize = GetTotalQueueSize(controller); - return controller[readableStreamDefaultControllerStrategyHWM] - queueSize; - } - function IsReadableStream(x) { - return hasOwnProperty(x, readableStreamController); - } - function IsReadableStreamDisturbed(stream) { - return stream[readableStreamBits] & DISTURBED; - } - function IsReadableStreamLocked(stream) { - return stream[readableStreamReader] !== undefined; - } - function IsReadableStreamDefaultController(x) { - return hasOwnProperty(x, readableStreamDefaultControllerControlledReadableStream); - } - function IsReadableStreamDefaultReader(x) { - return hasOwnProperty(x, readableStreamDefaultReaderReadRequests); - } - function IsReadableStreamReadable(stream) { - return ReadableStreamGetState(stream) === STATE_READABLE; - } - function IsReadableStreamClosed(stream) { - return ReadableStreamGetState(stream) === STATE_CLOSED; - } - function IsReadableStreamErrored(stream) { - return ReadableStreamGetState(stream) === STATE_ERRORED; - } - function ReadableStreamReaderGenericInitialize(reader, stream) { - const controller = stream[readableStreamController]; - if (controller[readableStreamDefaultControllerBits] & EXTERNALLY_CONTROLLED) { - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - callFunction(underlyingSource.notifyLockAcquired, underlyingSource); - } - reader[readableStreamReaderOwnerReadableStream] = stream; - stream[readableStreamReader] = reader; - switch (ReadableStreamGetState(stream)) { - case STATE_READABLE: - reader[readableStreamReaderClosedPromise] = v8.createPromise(); - break; - case STATE_CLOSED: - reader[readableStreamReaderClosedPromise] = Promise_resolve(undefined); - break; - case STATE_ERRORED: - reader[readableStreamReaderClosedPromise] = - Promise_reject(stream[readableStreamStoredError]); - break; - } - } - function ReadableStreamReaderGenericRelease(reader) { - const controller = reader[readableStreamReaderOwnerReadableStream][readableStreamController]; - if (controller[readableStreamDefaultControllerBits] & EXTERNALLY_CONTROLLED) { - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - callFunction(underlyingSource.notifyLockReleased, underlyingSource); - } - if (ReadableStreamGetState(reader[readableStreamReaderOwnerReadableStream]) === STATE_READABLE) { - v8.rejectPromise(reader[readableStreamReaderClosedPromise], new TypeError(errReleasedReaderClosedPromise)); - } else { - reader[readableStreamReaderClosedPromise] = Promise_reject(new TypeError(errReleasedReaderClosedPromise)); - } - reader[readableStreamReaderOwnerReadableStream][readableStreamReader] = - undefined; - reader[readableStreamReaderOwnerReadableStream] = undefined; - } - function ReadableStreamDefaultReaderRead(reader) { - const stream = reader[readableStreamReaderOwnerReadableStream]; - stream[readableStreamBits] |= DISTURBED; - if (ReadableStreamGetState(stream) === STATE_CLOSED) { - return Promise_resolve(CreateIterResultObject(undefined, true)); - } - if (ReadableStreamGetState(stream) === STATE_ERRORED) { - return Promise_reject(stream[readableStreamStoredError]); - } - return ReadableStreamDefaultControllerPull(stream[readableStreamController]); - } - function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { - const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); - if (shouldPull === false) { - return undefined; - } - if (controller[readableStreamDefaultControllerBits] & PULLING) { - controller[readableStreamDefaultControllerBits] |= PULL_AGAIN; - return undefined; - } - controller[readableStreamDefaultControllerBits] |= PULLING; - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - const pullPromise = PromiseCallOrNoop( - underlyingSource, 'pull', controller, 'underlyingSource.pull'); - thenPromise(pullPromise, - () => { - controller[readableStreamDefaultControllerBits] &= ~PULLING; - if (controller[readableStreamDefaultControllerBits] & PULL_AGAIN) { - controller[readableStreamDefaultControllerBits] &= ~PULL_AGAIN; - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - }, - e => { - if (ReadableStreamGetState(controller[readableStreamDefaultControllerControlledReadableStream]) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, e); - } - }); - } - function ReadableStreamDefaultControllerShouldCallPull(controller) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - const state = ReadableStreamGetState(stream); - if (state === STATE_CLOSED || state === STATE_ERRORED) { - return false; - } - if (controller[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { - return false; - } - if (!(controller[readableStreamDefaultControllerBits] & STARTED)) { - return false; - } - if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - return true; - } - const desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); - if (desiredSize > 0) { - return true; - } - return false; - } - function ReadableStreamGetNumReadRequests(stream) { - const reader = stream[readableStreamReader]; - const readRequests = reader[readableStreamDefaultReaderReadRequests]; - return readRequests.length; - } - function ReadableStreamTee(stream) { - const reader = AcquireReadableStreamDefaultReader(stream); - let closedOrErrored = false; - let canceled1 = false; - let canceled2 = false; - let reason1; - let reason2; - let promise = v8.createPromise(); - const branch1Stream = new ReadableStream({pull, cancel: cancel1}); - const branch2Stream = new ReadableStream({pull, cancel: cancel2}); - const branch1 = branch1Stream[readableStreamController]; - const branch2 = branch2Stream[readableStreamController]; - thenPromise( - reader[readableStreamReaderClosedPromise], undefined, function(r) { - if (closedOrErrored === true) { - return; - } - ReadableStreamDefaultControllerError(branch1, r); - ReadableStreamDefaultControllerError(branch2, r); - closedOrErrored = true; - }); - return [branch1Stream, branch2Stream]; - function pull() { - return thenPromise( - ReadableStreamDefaultReaderRead(reader), function(result) { - const value = result.value; - const done = result.done; - if (done === true && closedOrErrored === false) { - if (canceled1 === false) { - ReadableStreamDefaultControllerClose(branch1); - } - if (canceled2 === false) { - ReadableStreamDefaultControllerClose(branch2); - } - closedOrErrored = true; - } - if (closedOrErrored === true) { - return; - } - if (canceled1 === false) { - ReadableStreamDefaultControllerEnqueue(branch1, value); - } - if (canceled2 === false) { - ReadableStreamDefaultControllerEnqueue(branch2, value); - } - }); - } - function cancel1(reason) { - canceled1 = true; - reason1 = reason; - if (canceled2 === true) { - const compositeReason = [reason1, reason2]; - const cancelResult = ReadableStreamCancel(stream, compositeReason); - v8.resolvePromise(promise, cancelResult); - } - return promise; - } - function cancel2(reason) { - canceled2 = true; - reason2 = reason; - if (canceled1 === true) { - const compositeReason = [reason1, reason2]; - const cancelResult = ReadableStreamCancel(stream, compositeReason); - v8.resolvePromise(promise, cancelResult); - } - return promise; - } - } - function DequeueValue(controller) { - const result = controller[readableStreamDefaultControllerQueue].shift(); - controller[readableStreamDefaultControllerQueueSize] -= result.size; - return result.value; - } - function EnqueueValueWithSize(controller, value, size) { - size = Number(size); - if (Number_isNaN(size) || size === +Infinity || size < 0) { - throw new RangeError(errInvalidSize); - } - controller[readableStreamDefaultControllerQueueSize] += size; - controller[readableStreamDefaultControllerQueue].push({value, size}); - } - function GetTotalQueueSize(controller) { return controller[readableStreamDefaultControllerQueueSize]; } - function ValidateAndNormalizeQueuingStrategy(size, highWaterMark) { - if (size !== undefined && typeof size !== 'function') { - throw new TypeError(errSizeNotAFunction); - } - highWaterMark = Number(highWaterMark); - if (Number_isNaN(highWaterMark)) { - throw new TypeError(errInvalidHWM); - } - if (highWaterMark < 0) { - throw new RangeError(errInvalidHWM); - } - return {size, highWaterMark}; - } - function CallOrNoop(O, P, arg, nameForError) { - const method = O[P]; - if (method === undefined) { - return undefined; - } - if (typeof method !== 'function') { - throw new TypeError(errTmplMustBeFunctionOrUndefined(nameForError)); - } - return callFunction(method, O, arg); - } - function PromiseCallOrNoop(O, P, arg, nameForError) { - let method; - try { - method = O[P]; - } catch (methodE) { - return Promise_reject(methodE); - } - if (method === undefined) { - return Promise_resolve(undefined); - } - if (typeof method !== 'function') { - return Promise_reject(new TypeError(errTmplMustBeFunctionOrUndefined(nameForError))); - } - try { - return Promise_resolve(callFunction(method, O, arg)); - } catch (e) { - return Promise_reject(e); - } - } - function CreateIterResultObject(value, done) { return {value, done}; } - defineProperty(global, 'ReadableStream', { - value: ReadableStream, - enumerable: false, - configurable: true, - writable: true - }); - binding.AcquireReadableStreamDefaultReader = AcquireReadableStreamDefaultReader; - binding.IsReadableStream = IsReadableStream; - binding.IsReadableStreamDisturbed = IsReadableStreamDisturbed; - binding.IsReadableStreamLocked = IsReadableStreamLocked; - binding.IsReadableStreamReadable = IsReadableStreamReadable; - binding.IsReadableStreamClosed = IsReadableStreamClosed; - binding.IsReadableStreamErrored = IsReadableStreamErrored; - binding.IsReadableStreamDefaultReader = IsReadableStreamDefaultReader; - binding.ReadableStreamDefaultReaderRead = ReadableStreamDefaultReaderRead; - binding.ReadableStreamTee = ReadableStreamTee; - binding.ReadableStreamDefaultControllerClose = ReadableStreamDefaultControllerClose; - binding.ReadableStreamDefaultControllerGetDesiredSize = ReadableStreamDefaultControllerGetDesiredSize; - binding.ReadableStreamDefaultControllerEnqueue = ReadableStreamDefaultControllerEnqueue; - binding.ReadableStreamDefaultControllerError = ReadableStreamDefaultControllerError; - binding.createReadableStreamWithExternalController = - (underlyingSource, strategy) => { - return new ReadableStream( - underlyingSource, strategy, createWithExternalControllerSentinel); - }; -}); -dummy<(function() {}) \ No newline at end of file diff --git a/demos/SimpleBrowser/snapshot_blob.bin b/demos/SimpleBrowser/snapshot_blob.bin deleted file mode 100644 index f47dfc7c..00000000 Binary files a/demos/SimpleBrowser/snapshot_blob.bin and /dev/null differ diff --git a/demos/SimpleBrowser/uSimpleBrowser.dfm b/demos/SimpleBrowser/uSimpleBrowser.dfm deleted file mode 100644 index bc4ae202..00000000 --- a/demos/SimpleBrowser/uSimpleBrowser.dfm +++ /dev/null @@ -1,62 +0,0 @@ -object Form1: TForm1 - Left = 0 - Top = 0 - Caption = 'Simple Browser' - ClientHeight = 562 - ClientWidth = 684 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - OldCreateOrder = False - Position = poScreenCenter - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object ChromiumWindow1: TChromiumWindow - Left = 0 - Top = 30 - Width = 684 - Height = 532 - Align = alClient - TabOrder = 0 - end - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 684 - Height = 30 - Align = alTop - BevelOuter = bvNone - Padding.Left = 5 - Padding.Top = 5 - Padding.Right = 5 - Padding.Bottom = 5 - ShowCaption = False - TabOrder = 1 - object Edit1: TEdit - Left = 5 - Top = 5 - Width = 643 - Height = 20 - Margins.Right = 5 - Align = alClient - TabOrder = 0 - Text = 'http://www.google.com' - ExplicitHeight = 21 - end - object Button1: TButton - Left = 648 - Top = 5 - Width = 31 - Height = 20 - Margins.Left = 5 - Align = alRight - Caption = 'Go' - TabOrder = 1 - OnClick = Button1Click - end - end -end diff --git a/demos/SimpleBrowser/uSimpleBrowser.pas b/demos/SimpleBrowser/uSimpleBrowser.pas deleted file mode 100644 index 6f2ed28e..00000000 --- a/demos/SimpleBrowser/uSimpleBrowser.pas +++ /dev/null @@ -1,78 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uSimpleBrowser; - -interface - -uses - Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, - Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uCEFChromium, uCEFWindowParent, - Vcl.StdCtrls, Vcl.ExtCtrls, uCEFChromiumWindow; - -type - TForm1 = class(TForm) - ChromiumWindow1: TChromiumWindow; - Panel1: TPanel; - Edit1: TEdit; - Button1: TButton; - procedure Button1Click(Sender: TObject); - procedure FormShow(Sender: TObject); - private - { Private declarations } - public - { Public declarations } - end; - -var - Form1: TForm1; - -implementation - -{$R *.dfm} - -procedure TForm1.Button1Click(Sender: TObject); -begin - ChromiumWindow1.LoadURL(Edit1.Text); -end; - -procedure TForm1.FormShow(Sender: TObject); -begin - ChromiumWindow1.CreateBrowser; -end; - -end. diff --git a/demos/SimpleBrowser/widevinecdmadapter.dll b/demos/SimpleBrowser/widevinecdmadapter.dll deleted file mode 100644 index 8be28982..00000000 Binary files a/demos/SimpleBrowser/widevinecdmadapter.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/00-DeleteDCUs.bat b/demos/SimpleOSRBrowser/00-DeleteDCUs.bat deleted file mode 100644 index 9cd24f09..00000000 --- a/demos/SimpleOSRBrowser/00-DeleteDCUs.bat +++ /dev/null @@ -1,7 +0,0 @@ -del /s /q *.dcu -del /s /q *.dcp -del /s /q *.bpl -del /s /q *.bpi -del /s /q *.hpp -del /s /q *.exe -del /s /q *.~* diff --git a/demos/SimpleOSRBrowser/LICENSE.txt b/demos/SimpleOSRBrowser/LICENSE.txt deleted file mode 100644 index b69b1429..00000000 --- a/demos/SimpleOSRBrowser/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2008-2014 Marshall A. Greenblatt. Portions Copyright (c) -// 2006-2009 Google Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the name Chromium Embedded -// Framework nor the names of its contributors may be used to endorse -// or promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dpr b/demos/SimpleOSRBrowser/SimpleOSRBrowser.dpr deleted file mode 100644 index ce753430..00000000 --- a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dpr +++ /dev/null @@ -1,60 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -program SimpleOSRBrowser; - -uses - Vcl.Forms, - uCEFApplication, - uSimpleOSRBrowser in 'uSimpleOSRBrowser.pas' {Form1}; - -{$R *.res} - -begin - GlobalCEFApp := TCefApplication.Create; - GlobalCEFApp.WindowlessRenderingEnabled := True; - - if GlobalCEFApp.StartMainProcess then - begin - Application.Initialize; - Application.MainFormOnTaskbar := True; - Application.CreateForm(TForm1, Form1); - Application.Run; - end; - - GlobalCEFApp.Free; -end. diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dproj b/demos/SimpleOSRBrowser/SimpleOSRBrowser.dproj deleted file mode 100644 index 4e4627fc..00000000 --- a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dproj +++ /dev/null @@ -1,537 +0,0 @@ - - - {7DC52040-59FF-4430-BF65-3A852AB5A6C0} - 18.0 - VCL - SimpleOSRBrowser.dpr - True - Debug - Win32 - 1 - Application - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - 3082 - System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - $(BDS)\bin\delphi_PROJECTICON.ico - SimpleOSRBrowser - .\$(Platform)\$(Config) - false - false - false - false - false - - - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - true - 1033 - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - $(BDS)\bin\default_app.manifest - DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;Componentes;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;Componentes_Int;CEF4Delphi;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;Componentes_UI;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Componentes_Misc;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;Componentes_RTF;DBXInformixDriver;bindcompvcl;frxDB23;Componentes_vCard;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;frx23;fmxase;$(DCC_UsePackage) - - - DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;bindcompvcl;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage) - - - DEBUG;$(DCC_Define) - true - false - true - true - true - - - true - 1033 - true - true - false - - - false - RELEASE;$(DCC_Define) - 0 - 0 - - - true - true - - - - MainSource - - -
Form1
- dfm -
- - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - Delphi.Personality.12 - Application - - - - SimpleOSRBrowser.dpr - - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - - - SimpleOSRBrowser.exe - true - - - - - 0 - .dll;.bpl - - - 1 - .dylib - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - Contents\Resources - 1 - - - - - classes - 1 - - - - - Contents\MacOS - 0 - - - 1 - - - Contents\MacOS - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - 0 - - - 1 - - - Contents\MacOS - 1 - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 1 - - - - - 0 - - - Contents\MacOS - 1 - .framework - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - 0 - - - 1 - - - Contents\MacOS - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-normal - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ../ - 1 - - - ../ - 1 - - - - - res\drawable-hdpi - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - Contents - 1 - - - - - ../ - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\values - 1 - - - - - res\drawable-small - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - - - res\drawable - 1 - - - - - 0 - - - 0 - - - Contents\Resources\StartUp\ - 0 - - - 0 - - - 0 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 0 - .bpl - - - 1 - .dylib - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-ldpi - 1 - - - - - 1 - - - 1 - - - - - - - - - - - - True - False - - - 12 - - - - -
diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dproj.local b/demos/SimpleOSRBrowser/SimpleOSRBrowser.dproj.local deleted file mode 100644 index f14fdcf0..00000000 --- a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dproj.local +++ /dev/null @@ -1,9 +0,0 @@ - - - - 2017/01/22 17:26:58.000.836,=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2017/01/22 17:28:20.000.762,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas - 2017/01/22 17:28:20.000.762,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.dfm - 2017/01/22 17:28:25.000.780,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj - - diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dsk b/demos/SimpleOSRBrowser/SimpleOSRBrowser.dsk deleted file mode 100644 index 58dc1d43..00000000 --- a/demos/SimpleOSRBrowser/SimpleOSRBrowser.dsk +++ /dev/null @@ -1,765 +0,0 @@ -[Closed Files] -File_0=TSourceModule,'c:\program files\embarcadero\studio\17.0\CEF4Delphi\uCEFTypes.pas',0,1,1,1,1,0,0,, -File_1=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\misc\uPopUpBrowserCEFFrm.pas',0,1,121,19,154,0,0,, -File_2=TSourceModule,'c:\program files\embarcadero\studio\17.0\CEF4Delphi\uCEFChromium.pas',0,1,1131,67,1155,0,0,, -File_3=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\VCL\Vcl.Controls.pas',0,1,6113,1,6135,0,0,, -File_4=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uHTTPCEFPanel.pas',0,1,652,71,689,0,0,, -File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleBrowser\uSimpleBrowser.pas',0,1,31,3,33,0,0,, -File_6=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uBrowserTabBody.pas',0,1,2182,21,2205,0,0,, -File_7=TSourceModule,'c:\program files\embarcadero\studio\17.0\CEF4Delphi\uCEFApplication.pas',0,1,180,17,208,0,0,, -File_8=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uEmailPanel.pas',0,1,4416,52,4438,0,0,,{1 -File_9=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uFeedPanel.pas',0,1,136,19,136,0,0,, - -[Modules] -Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj -Module1=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas -Module2=default.htm -Count=3 -EditWindowCount=1 - -[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dproj] -ModuleType=TBaseProject - -[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas] -ModuleType=TSourceModule -FormState=1 -FormOnTop=0 - -[default.htm] -ModuleType=TURLModule - -[EditWindow0] -ViewCount=3 -CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dpr -View0=0 -View1=1 -View2=2 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=10000 -Height=9428 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=10000 -ClientHeight=9428 -DockedToMainForm=1 -BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 -TopPanelSize=0 -LeftPanelSize=2172 -LeftPanelClients=PropertyInspector,DockSite3 -LeftPanelData=00000800010100000000AA19000000000000017C080000000000000100000000CC07000009000000446F636B53697465330100000000A12300001100000050726F7065727479496E73706563746F72FFFFFFFF -RightPanelSize=2000 -RightPanelClients=DockSite2,DockSite4 -RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF -BottomPanelSize=0 -BottomPanelClients=DockSite1,MessageView -BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF -BottomMiddlePanelSize=0 -BottomMiddlePanelClients=DockSite0,GraphDrawingModel -BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF - -[View0] -CustomEditViewType=TWelcomePageView -WelcomePageURL=bds:/default.htm - -[View1] -CustomEditViewType=TEditView -Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas -CursorX=59 -CursorY=18 -TopLine=1 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\uSimpleOSRBrowser.pas - -[View2] -CustomEditViewType=TEditView -Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dpr -CursorX=1 -CursorY=38 -TopLine=1 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SimpleOSRBrowser\SimpleOSRBrowser.dpr - -[Watches] -Count=0 - -[WatchWindow] -WatchColumnWidth=120 -WatchShowColumnHeaders=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=13602 -Dockable=1 -StayOnTop=0 - -[Breakpoints] -Count=0 - -[EmbarcaderoWin32Debugger_AddressBreakpoints] -Count=0 - -[EmbarcaderoWin64Debugger_AddressBreakpoints] -Count=0 - -[Main Window] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=0 -State=2 -Left=148 -Top=269 -Width=8930 -Height=8520 -MaxLeft=-8 -MaxTop=-11 -MaxWidth=8930 -MaxHeight=8520 -ClientWidth=10000 -ClientHeight=9753 -BottomPanelSize=9121 -BottomPanelClients=EditWindow0 -BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF - -[ProjectManager] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4226 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4226 -TBDockHeight=5897 -LRDockWidth=2352 -Dockable=1 -StayOnTop=0 - -[MessageView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2773 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2773 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=2773 -Dockable=1 -StayOnTop=0 - -[ToolForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7152 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 - -[ClipboardHistory] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1906 -Height=4989 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1781 -ClientHeight=4563 -TBDockHeight=4989 -LRDockWidth=1906 -Dockable=1 -StayOnTop=0 - -[ProjectStatistics] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=2062 -Height=5740 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1938 -ClientHeight=5314 -TBDockHeight=5740 -LRDockWidth=2062 -Dockable=1 -StayOnTop=0 - -[ClassBrowserTool] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-148 -Top=-137 -Width=1844 -Height=3139 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1844 -ClientHeight=3139 -TBDockHeight=3139 -LRDockWidth=1844 -Dockable=1 -StayOnTop=0 - -[MetricsView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[QAView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[PropertyInspector] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=207 -Width=2172 -Height=7108 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=7108 -TBDockHeight=7164 -LRDockWidth=2172 -Dockable=1 -StayOnTop=0 -SplitPos=142 - -[frmDesignPreview] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=5964 -LRDockWidth=2508 -Dockable=1 -StayOnTop=0 - -[TFileExplorerForm] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-898 -Top=-137 -Width=2844 -Height=6200 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2844 -ClientHeight=6200 -TBDockHeight=6200 -LRDockWidth=2844 -Dockable=1 -StayOnTop=0 - -[TemplateView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-1026 -Top=-137 -Width=273 -Height=359 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=273 -ClientHeight=359 -TBDockHeight=359 -LRDockWidth=273 -Dockable=1 -StayOnTop=0 -Name=120 -Description=334 -filter=1 - -[DebugLogView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=415 -LRDockWidth=4953 -Dockable=1 -StayOnTop=0 - -[ThreadStatusWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=7406 -Dockable=1 -StayOnTop=0 -Column0Width=145 -Column1Width=100 -Column2Width=115 -Column3Width=250 - -[LocalVarsWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1536 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[CallStackWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=2063 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[FindReferencsForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=2321 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[RefactoringForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=3206 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[ToDo List] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=1155 -LRDockWidth=3680 -Dockable=1 -StayOnTop=0 -Column0Width=314 -Column1Width=30 -Column2Width=150 -Column3Width=172 -Column4Width=129 -SortOrder=4 -ShowHints=1 -ShowChecked=1 - -[DataExplorerContainer] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=7148 -Dockable=1 -StayOnTop=0 - -[GraphDrawingModel] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2859 -Height=3206 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2859 -ClientHeight=3206 -TBDockHeight=3206 -LRDockWidth=2859 -Dockable=1 -StayOnTop=0 - -[BreakpointWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1547 -LRDockWidth=8742 -Dockable=1 -StayOnTop=0 -Column0Width=200 -Column1Width=75 -Column2Width=200 -Column3Width=200 -Column4Width=200 -Column5Width=75 -Column6Width=75 - -[StructureView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2172 -Height=1760 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=1760 -TBDockHeight=3677 -LRDockWidth=1898 -Dockable=1 -StayOnTop=0 - -[ModelViewTool] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=5305 -Dockable=1 -StayOnTop=0 - -[BorlandEditorCodeExplorer@EditWindow0] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1828 -Height=6177 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1703 -ClientHeight=5751 -TBDockHeight=6177 -LRDockWidth=1828 -Dockable=1 -StayOnTop=0 - -[DockHosts] -DockHostCount=5 - -[DockSite0] -HostDockSite=DockBottomCenterPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1480 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1480 -TBDockHeight=1480 -LRDockWidth=2336 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=RefactoringForm -TabDockClients=RefactoringForm,FindReferencsForm,ToDo List,MetricsView,QAView - -[DockSite1] -HostDockSite=DockBottomPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=3820 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=DebugLogView -TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow - -[DockSite2] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2000 -Height=4529 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4529 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ProjectManager -TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm - -[DockSite3] -HostDockSite=DockLeftPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2172 -Height=1760 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=1760 -TBDockHeight=7164 -LRDockWidth=2172 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=StructureView -TabDockClients=StructureView,ClassBrowserTool - -[DockSite4] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=454 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ToolForm -TabDockClients=ToolForm,TemplateView - diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.identcache b/demos/SimpleOSRBrowser/SimpleOSRBrowser.identcache deleted file mode 100644 index 92bce1c3..00000000 Binary files a/demos/SimpleOSRBrowser/SimpleOSRBrowser.identcache and /dev/null differ diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.res b/demos/SimpleOSRBrowser/SimpleOSRBrowser.res deleted file mode 100644 index 20ba5530..00000000 Binary files a/demos/SimpleOSRBrowser/SimpleOSRBrowser.res and /dev/null differ diff --git a/demos/SimpleOSRBrowser/SimpleOSRBrowser.stat b/demos/SimpleOSRBrowser/SimpleOSRBrowser.stat deleted file mode 100644 index 7c7b6c04..00000000 --- a/demos/SimpleOSRBrowser/SimpleOSRBrowser.stat +++ /dev/null @@ -1,10 +0,0 @@ -[Stats] -EditorSecs=1885 -DesignerSecs=208 -InspectorSecs=61 -CompileSecs=76884 -OtherSecs=226 -StartTime=22/01/2017 17:35:20 -RealKeys=0 -EffectiveKeys=0 -DebugSecs=375 diff --git a/demos/SimpleOSRBrowser/cef.pak b/demos/SimpleOSRBrowser/cef.pak deleted file mode 100644 index 78534bb2..00000000 Binary files a/demos/SimpleOSRBrowser/cef.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/cef_100_percent.pak b/demos/SimpleOSRBrowser/cef_100_percent.pak deleted file mode 100644 index 62c1fc60..00000000 Binary files a/demos/SimpleOSRBrowser/cef_100_percent.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/cef_200_percent.pak b/demos/SimpleOSRBrowser/cef_200_percent.pak deleted file mode 100644 index 662f0566..00000000 Binary files a/demos/SimpleOSRBrowser/cef_200_percent.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/cef_extensions.pak b/demos/SimpleOSRBrowser/cef_extensions.pak deleted file mode 100644 index d7c9c809..00000000 Binary files a/demos/SimpleOSRBrowser/cef_extensions.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/chrome_elf.dll b/demos/SimpleOSRBrowser/chrome_elf.dll deleted file mode 100644 index 8e43fb01..00000000 Binary files a/demos/SimpleOSRBrowser/chrome_elf.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/d3dcompiler_43.dll b/demos/SimpleOSRBrowser/d3dcompiler_43.dll deleted file mode 100644 index ab961619..00000000 Binary files a/demos/SimpleOSRBrowser/d3dcompiler_43.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/d3dcompiler_47.dll b/demos/SimpleOSRBrowser/d3dcompiler_47.dll deleted file mode 100644 index e636cb49..00000000 Binary files a/demos/SimpleOSRBrowser/d3dcompiler_47.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/devtools_resources.pak b/demos/SimpleOSRBrowser/devtools_resources.pak deleted file mode 100644 index 07e6d5a2..00000000 Binary files a/demos/SimpleOSRBrowser/devtools_resources.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/icudtl.dat b/demos/SimpleOSRBrowser/icudtl.dat deleted file mode 100644 index a313d4e6..00000000 Binary files a/demos/SimpleOSRBrowser/icudtl.dat and /dev/null differ diff --git a/demos/SimpleOSRBrowser/libEGL.dll b/demos/SimpleOSRBrowser/libEGL.dll deleted file mode 100644 index 101547b1..00000000 Binary files a/demos/SimpleOSRBrowser/libEGL.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/libGLESv2.dll b/demos/SimpleOSRBrowser/libGLESv2.dll deleted file mode 100644 index 9121b600..00000000 Binary files a/demos/SimpleOSRBrowser/libGLESv2.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/libcef.dll b/demos/SimpleOSRBrowser/libcef.dll deleted file mode 100644 index 2989490f..00000000 Binary files a/demos/SimpleOSRBrowser/libcef.dll and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/am.pak b/demos/SimpleOSRBrowser/locales/am.pak deleted file mode 100644 index c1dbe254..00000000 Binary files a/demos/SimpleOSRBrowser/locales/am.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ar.pak b/demos/SimpleOSRBrowser/locales/ar.pak deleted file mode 100644 index e59654b4..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ar.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/bg.pak b/demos/SimpleOSRBrowser/locales/bg.pak deleted file mode 100644 index ae20b103..00000000 Binary files a/demos/SimpleOSRBrowser/locales/bg.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/bn.pak b/demos/SimpleOSRBrowser/locales/bn.pak deleted file mode 100644 index b3a38bf9..00000000 Binary files a/demos/SimpleOSRBrowser/locales/bn.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ca.pak b/demos/SimpleOSRBrowser/locales/ca.pak deleted file mode 100644 index c2052236..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ca.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/cs.pak b/demos/SimpleOSRBrowser/locales/cs.pak deleted file mode 100644 index 6514f89c..00000000 Binary files a/demos/SimpleOSRBrowser/locales/cs.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/da.pak b/demos/SimpleOSRBrowser/locales/da.pak deleted file mode 100644 index 46976264..00000000 Binary files a/demos/SimpleOSRBrowser/locales/da.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/de.pak b/demos/SimpleOSRBrowser/locales/de.pak deleted file mode 100644 index 33e933b0..00000000 Binary files a/demos/SimpleOSRBrowser/locales/de.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/el.pak b/demos/SimpleOSRBrowser/locales/el.pak deleted file mode 100644 index 46e7740e..00000000 Binary files a/demos/SimpleOSRBrowser/locales/el.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/en-GB.pak b/demos/SimpleOSRBrowser/locales/en-GB.pak deleted file mode 100644 index 24fd7c67..00000000 Binary files a/demos/SimpleOSRBrowser/locales/en-GB.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/en-US.pak b/demos/SimpleOSRBrowser/locales/en-US.pak deleted file mode 100644 index 15b520b6..00000000 Binary files a/demos/SimpleOSRBrowser/locales/en-US.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/es-419.pak b/demos/SimpleOSRBrowser/locales/es-419.pak deleted file mode 100644 index d5f77675..00000000 Binary files a/demos/SimpleOSRBrowser/locales/es-419.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/es.pak b/demos/SimpleOSRBrowser/locales/es.pak deleted file mode 100644 index be2a26a5..00000000 Binary files a/demos/SimpleOSRBrowser/locales/es.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/et.pak b/demos/SimpleOSRBrowser/locales/et.pak deleted file mode 100644 index e2f87a6d..00000000 Binary files a/demos/SimpleOSRBrowser/locales/et.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/fa.pak b/demos/SimpleOSRBrowser/locales/fa.pak deleted file mode 100644 index 69a4421e..00000000 Binary files a/demos/SimpleOSRBrowser/locales/fa.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/fi.pak b/demos/SimpleOSRBrowser/locales/fi.pak deleted file mode 100644 index 9be5dc6a..00000000 Binary files a/demos/SimpleOSRBrowser/locales/fi.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/fil.pak b/demos/SimpleOSRBrowser/locales/fil.pak deleted file mode 100644 index db321117..00000000 Binary files a/demos/SimpleOSRBrowser/locales/fil.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/fr.pak b/demos/SimpleOSRBrowser/locales/fr.pak deleted file mode 100644 index 9280bba3..00000000 Binary files a/demos/SimpleOSRBrowser/locales/fr.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/gu.pak b/demos/SimpleOSRBrowser/locales/gu.pak deleted file mode 100644 index fca95383..00000000 Binary files a/demos/SimpleOSRBrowser/locales/gu.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/he.pak b/demos/SimpleOSRBrowser/locales/he.pak deleted file mode 100644 index 8e85e343..00000000 Binary files a/demos/SimpleOSRBrowser/locales/he.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/hi.pak b/demos/SimpleOSRBrowser/locales/hi.pak deleted file mode 100644 index dc2b26c0..00000000 Binary files a/demos/SimpleOSRBrowser/locales/hi.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/hr.pak b/demos/SimpleOSRBrowser/locales/hr.pak deleted file mode 100644 index 3198d34a..00000000 Binary files a/demos/SimpleOSRBrowser/locales/hr.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/hu.pak b/demos/SimpleOSRBrowser/locales/hu.pak deleted file mode 100644 index ca5ef79f..00000000 Binary files a/demos/SimpleOSRBrowser/locales/hu.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/id.pak b/demos/SimpleOSRBrowser/locales/id.pak deleted file mode 100644 index 5bbc5af8..00000000 Binary files a/demos/SimpleOSRBrowser/locales/id.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/it.pak b/demos/SimpleOSRBrowser/locales/it.pak deleted file mode 100644 index c80f10d0..00000000 Binary files a/demos/SimpleOSRBrowser/locales/it.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ja.pak b/demos/SimpleOSRBrowser/locales/ja.pak deleted file mode 100644 index 3bff80b9..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ja.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/kn.pak b/demos/SimpleOSRBrowser/locales/kn.pak deleted file mode 100644 index 08f17c96..00000000 Binary files a/demos/SimpleOSRBrowser/locales/kn.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ko.pak b/demos/SimpleOSRBrowser/locales/ko.pak deleted file mode 100644 index b6a18851..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ko.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/lt.pak b/demos/SimpleOSRBrowser/locales/lt.pak deleted file mode 100644 index e4df025b..00000000 Binary files a/demos/SimpleOSRBrowser/locales/lt.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/lv.pak b/demos/SimpleOSRBrowser/locales/lv.pak deleted file mode 100644 index ba07599e..00000000 Binary files a/demos/SimpleOSRBrowser/locales/lv.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ml.pak b/demos/SimpleOSRBrowser/locales/ml.pak deleted file mode 100644 index d8cb4044..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ml.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/mr.pak b/demos/SimpleOSRBrowser/locales/mr.pak deleted file mode 100644 index b1ae9aa5..00000000 Binary files a/demos/SimpleOSRBrowser/locales/mr.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ms.pak b/demos/SimpleOSRBrowser/locales/ms.pak deleted file mode 100644 index 4ffbd98d..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ms.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/nb.pak b/demos/SimpleOSRBrowser/locales/nb.pak deleted file mode 100644 index 65b2b24b..00000000 Binary files a/demos/SimpleOSRBrowser/locales/nb.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/nl.pak b/demos/SimpleOSRBrowser/locales/nl.pak deleted file mode 100644 index f4030851..00000000 Binary files a/demos/SimpleOSRBrowser/locales/nl.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/pl.pak b/demos/SimpleOSRBrowser/locales/pl.pak deleted file mode 100644 index 8325ebe2..00000000 Binary files a/demos/SimpleOSRBrowser/locales/pl.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/pt-BR.pak b/demos/SimpleOSRBrowser/locales/pt-BR.pak deleted file mode 100644 index aa895c02..00000000 Binary files a/demos/SimpleOSRBrowser/locales/pt-BR.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/pt-PT.pak b/demos/SimpleOSRBrowser/locales/pt-PT.pak deleted file mode 100644 index 5cfb037e..00000000 Binary files a/demos/SimpleOSRBrowser/locales/pt-PT.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ro.pak b/demos/SimpleOSRBrowser/locales/ro.pak deleted file mode 100644 index c70333cd..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ro.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ru.pak b/demos/SimpleOSRBrowser/locales/ru.pak deleted file mode 100644 index cdae5a85..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ru.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/sk.pak b/demos/SimpleOSRBrowser/locales/sk.pak deleted file mode 100644 index 94c35418..00000000 Binary files a/demos/SimpleOSRBrowser/locales/sk.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/sl.pak b/demos/SimpleOSRBrowser/locales/sl.pak deleted file mode 100644 index 9e63309f..00000000 Binary files a/demos/SimpleOSRBrowser/locales/sl.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/sr.pak b/demos/SimpleOSRBrowser/locales/sr.pak deleted file mode 100644 index 64a2aa5a..00000000 Binary files a/demos/SimpleOSRBrowser/locales/sr.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/sv.pak b/demos/SimpleOSRBrowser/locales/sv.pak deleted file mode 100644 index 8e6300d1..00000000 Binary files a/demos/SimpleOSRBrowser/locales/sv.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/sw.pak b/demos/SimpleOSRBrowser/locales/sw.pak deleted file mode 100644 index 364886b9..00000000 Binary files a/demos/SimpleOSRBrowser/locales/sw.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/ta.pak b/demos/SimpleOSRBrowser/locales/ta.pak deleted file mode 100644 index ad08258d..00000000 Binary files a/demos/SimpleOSRBrowser/locales/ta.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/te.pak b/demos/SimpleOSRBrowser/locales/te.pak deleted file mode 100644 index 8bb4258e..00000000 Binary files a/demos/SimpleOSRBrowser/locales/te.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/th.pak b/demos/SimpleOSRBrowser/locales/th.pak deleted file mode 100644 index 120b7cfa..00000000 Binary files a/demos/SimpleOSRBrowser/locales/th.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/tr.pak b/demos/SimpleOSRBrowser/locales/tr.pak deleted file mode 100644 index 207205e1..00000000 Binary files a/demos/SimpleOSRBrowser/locales/tr.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/uk.pak b/demos/SimpleOSRBrowser/locales/uk.pak deleted file mode 100644 index 6b71acf0..00000000 Binary files a/demos/SimpleOSRBrowser/locales/uk.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/vi.pak b/demos/SimpleOSRBrowser/locales/vi.pak deleted file mode 100644 index b291df72..00000000 Binary files a/demos/SimpleOSRBrowser/locales/vi.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/zh-CN.pak b/demos/SimpleOSRBrowser/locales/zh-CN.pak deleted file mode 100644 index 5dfe7411..00000000 Binary files a/demos/SimpleOSRBrowser/locales/zh-CN.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/locales/zh-TW.pak b/demos/SimpleOSRBrowser/locales/zh-TW.pak deleted file mode 100644 index 1a2740e8..00000000 Binary files a/demos/SimpleOSRBrowser/locales/zh-TW.pak and /dev/null differ diff --git a/demos/SimpleOSRBrowser/natives_blob.bin b/demos/SimpleOSRBrowser/natives_blob.bin deleted file mode 100644 index db046c5c..00000000 --- a/demos/SimpleOSRBrowser/natives_blob.bin +++ /dev/null @@ -1,15148 +0,0 @@ - mirrors -(function(a,b){ -"use strict"; -var c=a.Array; -var d=a.isNaN; -var e=a.JSON.stringify; -var f; -var g; -var h=b.ImportNow("promise_state_symbol"); -var i=b.ImportNow("promise_result_symbol"); -var j; -var k; -b.Import(function(l){ -f=l.MapEntries; -g=l.MapIteratorNext; -j=l.SetIteratorNext; -k=l.SetValues; -}); -var m={ -UNDEFINED_TYPE:'undefined', -NULL_TYPE:'null', -BOOLEAN_TYPE:'boolean', -NUMBER_TYPE:'number', -STRING_TYPE:'string', -SYMBOL_TYPE:'symbol', -OBJECT_TYPE:'object', -FUNCTION_TYPE:'function', -REGEXP_TYPE:'regexp', -ERROR_TYPE:'error', -PROPERTY_TYPE:'property', -INTERNAL_PROPERTY_TYPE:'internalProperty', -FRAME_TYPE:'frame', -SCRIPT_TYPE:'script', -CONTEXT_TYPE:'context', -SCOPE_TYPE:'scope', -PROMISE_TYPE:'promise', -MAP_TYPE:'map', -SET_TYPE:'set', -ITERATOR_TYPE:'iterator', -GENERATOR_TYPE:'generator', -} -var n=0; -var o=-1; -var p=[]; -var q=true; -function MirrorCacheIsEmpty(){ -return n==0&&p.length==0; -} -function ToggleMirrorCache(r){ -q=r; -ClearMirrorCache(); -} -function ClearMirrorCache(r){ -n=0; -p=[]; -} -function ObjectIsPromise(r){ -return(%_IsJSReceiver(r))&& -!(%DebugGetProperty(r,h)===(void 0)); -} -function MakeMirror(r,s){ -var t; -if(!s&&q){ -for(var u in p){ -t=p[u]; -if(t.value()===r){ -return t; -} -if(t.isNumber()&&d(t.value())&& -typeof r=='number'&&d(r)){ -return t; -} -} -} -if((r===(void 0))){ -t=new UndefinedMirror(); -}else if((r===null)){ -t=new NullMirror(); -}else if((typeof(r)==='boolean')){ -t=new BooleanMirror(r); -}else if((typeof(r)==='number')){ -t=new NumberMirror(r); -}else if((typeof(r)==='string')){ -t=new StringMirror(r); -}else if((typeof(r)==='symbol')){ -t=new SymbolMirror(r); -}else if((%_IsArray(r))){ -t=new ArrayMirror(r); -}else if((%IsDate(r))){ -t=new DateMirror(r); -}else if((%IsFunction(r))){ -t=new FunctionMirror(r); -}else if((%_IsRegExp(r))){ -t=new RegExpMirror(r); -}else if((%_ClassOf(r)==='Error')){ -t=new ErrorMirror(r); -}else if((%_ClassOf(r)==='Script')){ -t=new ScriptMirror(r); -}else if((%_ClassOf(r)==='Map')||(%_ClassOf(r)==='WeakMap')){ -t=new MapMirror(r); -}else if((%_ClassOf(r)==='Set')||(%_ClassOf(r)==='WeakSet')){ -t=new SetMirror(r); -}else if((%_ClassOf(r)==='Map Iterator')||(%_ClassOf(r)==='Set Iterator')){ -t=new IteratorMirror(r); -}else if(ObjectIsPromise(r)){ -t=new PromiseMirror(r); -}else if((%_ClassOf(r)==='Generator')){ -t=new GeneratorMirror(r); -}else{ -t=new ObjectMirror(r,m.OBJECT_TYPE,s); -} -if(q)p[t.handle()]=t; -return t; -} -function LookupMirror(v){ -if(!q){ -throw %make_error(2,"Mirror cache is disabled"); -} -return p[v]; -} -function GetUndefinedMirror(){ -return MakeMirror((void 0)); -} -function inherits(w,x){ -var y=function(){}; -y.prototype=x.prototype; -w.super_=x.prototype; -w.prototype=new y(); -w.prototype.constructor=w; -} -var z=80; -var A={}; -A.Data=0; -A.DataConstant=2; -A.AccessorConstant=3; -var B={}; -B.None=0; -B.ReadOnly=1; -B.DontEnum=2; -B.DontDelete=4; -var C={Global:0, -Local:1, -With:2, -Closure:3, -Catch:4, -Block:5, -Script:6, -Eval:7, -}; -function Mirror(D){ -this.type_=D; -} -Mirror.prototype.type=function(){ -return this.type_; -}; -Mirror.prototype.isValue=function(){ -return this instanceof ValueMirror; -}; -Mirror.prototype.isUndefined=function(){ -return this instanceof UndefinedMirror; -}; -Mirror.prototype.isNull=function(){ -return this instanceof NullMirror; -}; -Mirror.prototype.isBoolean=function(){ -return this instanceof BooleanMirror; -}; -Mirror.prototype.isNumber=function(){ -return this instanceof NumberMirror; -}; -Mirror.prototype.isString=function(){ -return this instanceof StringMirror; -}; -Mirror.prototype.isSymbol=function(){ -return this instanceof SymbolMirror; -}; -Mirror.prototype.isObject=function(){ -return this instanceof ObjectMirror; -}; -Mirror.prototype.isFunction=function(){ -return this instanceof FunctionMirror; -}; -Mirror.prototype.isUnresolvedFunction=function(){ -return this instanceof UnresolvedFunctionMirror; -}; -Mirror.prototype.isArray=function(){ -return this instanceof ArrayMirror; -}; -Mirror.prototype.isDate=function(){ -return this instanceof DateMirror; -}; -Mirror.prototype.isRegExp=function(){ -return this instanceof RegExpMirror; -}; -Mirror.prototype.isError=function(){ -return this instanceof ErrorMirror; -}; -Mirror.prototype.isPromise=function(){ -return this instanceof PromiseMirror; -}; -Mirror.prototype.isGenerator=function(){ -return this instanceof GeneratorMirror; -}; -Mirror.prototype.isProperty=function(){ -return this instanceof PropertyMirror; -}; -Mirror.prototype.isInternalProperty=function(){ -return this instanceof InternalPropertyMirror; -}; -Mirror.prototype.isFrame=function(){ -return this instanceof FrameMirror; -}; -Mirror.prototype.isScript=function(){ -return this instanceof ScriptMirror; -}; -Mirror.prototype.isContext=function(){ -return this instanceof ContextMirror; -}; -Mirror.prototype.isScope=function(){ -return this instanceof ScopeMirror; -}; -Mirror.prototype.isMap=function(){ -return this instanceof MapMirror; -}; -Mirror.prototype.isSet=function(){ -return this instanceof SetMirror; -}; -Mirror.prototype.isIterator=function(){ -return this instanceof IteratorMirror; -}; -Mirror.prototype.allocateHandle_=function(){ -if(q)this.handle_=n++; -}; -Mirror.prototype.allocateTransientHandle_=function(){ -this.handle_=o--; -}; -Mirror.prototype.toText=function(){ -return"#<"+this.constructor.name+">"; -}; -function ValueMirror(D,r,E){ -%_Call(Mirror,this,D); -this.value_=r; -if(!E){ -this.allocateHandle_(); -}else{ -this.allocateTransientHandle_(); -} -} -inherits(ValueMirror,Mirror); -Mirror.prototype.handle=function(){ -return this.handle_; -}; -ValueMirror.prototype.isPrimitive=function(){ -var D=this.type(); -return D==='undefined'|| -D==='null'|| -D==='boolean'|| -D==='number'|| -D==='string'|| -D==='symbol'; -}; -ValueMirror.prototype.value=function(){ -return this.value_; -}; -function UndefinedMirror(){ -%_Call(ValueMirror,this,m.UNDEFINED_TYPE,(void 0)); -} -inherits(UndefinedMirror,ValueMirror); -UndefinedMirror.prototype.toText=function(){ -return'undefined'; -}; -function NullMirror(){ -%_Call(ValueMirror,this,m.NULL_TYPE,null); -} -inherits(NullMirror,ValueMirror); -NullMirror.prototype.toText=function(){ -return'null'; -}; -function BooleanMirror(r){ -%_Call(ValueMirror,this,m.BOOLEAN_TYPE,r); -} -inherits(BooleanMirror,ValueMirror); -BooleanMirror.prototype.toText=function(){ -return this.value_?'true':'false'; -}; -function NumberMirror(r){ -%_Call(ValueMirror,this,m.NUMBER_TYPE,r); -} -inherits(NumberMirror,ValueMirror); -NumberMirror.prototype.toText=function(){ -return %_NumberToString(this.value_); -}; -function StringMirror(r){ -%_Call(ValueMirror,this,m.STRING_TYPE,r); -} -inherits(StringMirror,ValueMirror); -StringMirror.prototype.length=function(){ -return this.value_.length; -}; -StringMirror.prototype.getTruncatedValue=function(F){ -if(F!=-1&&this.length()>F){ -return this.value_.substring(0,F)+ -'... (length: '+this.length()+')'; -} -return this.value_; -}; -StringMirror.prototype.toText=function(){ -return this.getTruncatedValue(z); -}; -function SymbolMirror(r){ -%_Call(ValueMirror,this,m.SYMBOL_TYPE,r); -} -inherits(SymbolMirror,ValueMirror); -SymbolMirror.prototype.description=function(){ -return %SymbolDescription(%ValueOf(this.value_)); -} -SymbolMirror.prototype.toText=function(){ -return %SymbolDescriptiveString(%ValueOf(this.value_)); -} -function ObjectMirror(r,D,E){ -D=D||m.OBJECT_TYPE; -%_Call(ValueMirror,this,D,r,E); -} -inherits(ObjectMirror,ValueMirror); -ObjectMirror.prototype.className=function(){ -return %_ClassOf(this.value_); -}; -ObjectMirror.prototype.constructorFunction=function(){ -return MakeMirror(%DebugGetProperty(this.value_,'constructor')); -}; -ObjectMirror.prototype.prototypeObject=function(){ -return MakeMirror(%DebugGetProperty(this.value_,'prototype')); -}; -ObjectMirror.prototype.protoObject=function(){ -return MakeMirror(%DebugGetPrototype(this.value_)); -}; -ObjectMirror.prototype.hasNamedInterceptor=function(){ -var G=%GetInterceptorInfo(this.value_); -return(G&2)!=0; -}; -ObjectMirror.prototype.hasIndexedInterceptor=function(){ -var G=%GetInterceptorInfo(this.value_); -return(G&1)!=0; -}; -ObjectMirror.prototype.propertyNames=function(){ -return %GetOwnPropertyKeys(this.value_,0); -}; -ObjectMirror.prototype.properties=function(){ -var H=this.propertyNames(); -var I=new c(H.length); -for(var J=0;J'; -}; -ObjectMirror.GetInternalProperties=function(r){ -var I=%DebugGetInternalProperties(r); -var O=[]; -for(var J=0;JV)return new c(); -var W=new c(V-U+1); -for(var J=U;J<=V;J++){ -var L=%DebugGetPropertyDetails(this.value_,(%_ToString(J))); -var r; -if(L){ -r=new PropertyMirror(this,J,L); -}else{ -r=GetUndefinedMirror(); -} -W[J-U]=r; -} -return W; -}; -function DateMirror(r){ -%_Call(ObjectMirror,this,r); -} -inherits(DateMirror,ObjectMirror); -DateMirror.prototype.toText=function(){ -var X=e(this.value_); -return X.substring(1,X.length-1); -}; -function RegExpMirror(r){ -%_Call(ObjectMirror,this,r,m.REGEXP_TYPE); -} -inherits(RegExpMirror,ObjectMirror); -RegExpMirror.prototype.source=function(){ -return this.value_.source; -}; -RegExpMirror.prototype.global=function(){ -return this.value_.global; -}; -RegExpMirror.prototype.ignoreCase=function(){ -return this.value_.ignoreCase; -}; -RegExpMirror.prototype.multiline=function(){ -return this.value_.multiline; -}; -RegExpMirror.prototype.sticky=function(){ -return this.value_.sticky; -}; -RegExpMirror.prototype.unicode=function(){ -return this.value_.unicode; -}; -RegExpMirror.prototype.toText=function(){ -return"/"+this.source()+"/"; -}; -function ErrorMirror(r){ -%_Call(ObjectMirror,this,r,m.ERROR_TYPE); -} -inherits(ErrorMirror,ObjectMirror); -ErrorMirror.prototype.message=function(){ -return this.value_.message; -}; -ErrorMirror.prototype.toText=function(){ -var Y; -try{ -Y=%ErrorToString(this.value_); -}catch(e){ -Y='#'; -} -return Y; -}; -function PromiseMirror(r){ -%_Call(ObjectMirror,this,r,m.PROMISE_TYPE); -} -inherits(PromiseMirror,ObjectMirror); -function PromiseGetStatus_(r){ -var Z=%DebugGetProperty(r,h); -if(Z==0)return"pending"; -if(Z==1)return"resolved"; -return"rejected"; -} -function PromiseGetValue_(r){ -return %DebugGetProperty(r,i); -} -PromiseMirror.prototype.status=function(){ -return PromiseGetStatus_(this.value_); -}; -PromiseMirror.prototype.promiseValue=function(){ -return MakeMirror(PromiseGetValue_(this.value_)); -}; -function MapMirror(r){ -%_Call(ObjectMirror,this,r,m.MAP_TYPE); -} -inherits(MapMirror,ObjectMirror); -MapMirror.prototype.entries=function(aa){ -var O=[]; -if((%_ClassOf(this.value_)==='WeakMap')){ -var ab=%GetWeakMapEntries(this.value_,aa||0); -for(var J=0;J3){ -this.exception_=L[3]; -this.getter_=L[4]; -this.setter_=L[5]; -} -} -inherits(PropertyMirror,Mirror); -PropertyMirror.prototype.isReadOnly=function(){ -return(this.attributes()&B.ReadOnly)!=0; -}; -PropertyMirror.prototype.isEnum=function(){ -return(this.attributes()&B.DontEnum)==0; -}; -PropertyMirror.prototype.canDelete=function(){ -return(this.attributes()&B.DontDelete)==0; -}; -PropertyMirror.prototype.name=function(){ -return this.name_; -}; -PropertyMirror.prototype.toText=function(){ -if((typeof(this.name_)==='symbol'))return %SymbolDescriptiveString(this.name_); -return this.name_; -}; -PropertyMirror.prototype.isIndexed=function(){ -for(var J=0;J0; -}; -FrameDetails.prototype.inlinedFrameIndex=function(){ -%CheckExecutionState(this.break_id_); -var aA=ay; -return(this.details_[ar]&aA)>>2; -}; -FrameDetails.prototype.argumentCount=function(){ -%CheckExecutionState(this.break_id_); -return this.details_[am]; -}; -FrameDetails.prototype.argumentName=function(R){ -%CheckExecutionState(this.break_id_); -if(R>=0&&R=0&&R=0&&R=0&&R0){ -for(var J=0;J0){ -O+=this.lineOffset(); -O+='-'; -O+=this.lineOffset()+this.lineCount()-1; -}else{ -O+=this.lineCount(); -} -O+=')'; -return O; -}; -function ContextMirror(bb){ -%_Call(Mirror,this,m.CONTEXT_TYPE); -this.data_=bb; -this.allocateHandle_(); -} -inherits(ContextMirror,Mirror); -ContextMirror.prototype.data=function(){ -return this.data_; -}; -function MakeMirrorSerializer(L,bc){ -return new JSONProtocolSerializer(L,bc); -} -function JSONProtocolSerializer(L,bc){ -this.details_=L; -this.options_=bc; -this.mirrors_=[]; -} -JSONProtocolSerializer.prototype.serializeReference=function(t){ -return this.serialize_(t,true,true); -}; -JSONProtocolSerializer.prototype.serializeValue=function(t){ -var bd=this.serialize_(t,false,true); -return bd; -}; -JSONProtocolSerializer.prototype.serializeReferencedObjects=function(){ -var be=[]; -var bf=this.mirrors_.length; -for(var J=0;Jthis.maxStringLength_()){ -var bh=t.getTruncatedValue(this.maxStringLength_()); -be.value=bh; -be.fromIndex=0; -be.toIndex=this.maxStringLength_(); -}else{ -be.value=t.value(); -} -be.length=t.length(); -break; -case m.SYMBOL_TYPE: -be.description=t.description(); -break; -case m.OBJECT_TYPE: -case m.FUNCTION_TYPE: -case m.ERROR_TYPE: -case m.REGEXP_TYPE: -case m.PROMISE_TYPE: -case m.GENERATOR_TYPE: -this.serializeObject_(t,be,L); -break; -case m.PROPERTY_TYPE: -case m.INTERNAL_PROPERTY_TYPE: -throw %make_error(2, -'PropertyMirror cannot be serialized independently'); -break; -case m.FRAME_TYPE: -this.serializeFrame_(t,be); -break; -case m.SCOPE_TYPE: -this.serializeScope_(t,be); -break; -case m.SCRIPT_TYPE: -if(t.name()){ -be.name=t.name(); -} -be.id=t.id(); -be.lineOffset=t.lineOffset(); -be.columnOffset=t.columnOffset(); -be.lineCount=t.lineCount(); -if(t.data()){ -be.data=t.data(); -} -if(this.includeSource_()){ -be.source=t.source(); -}else{ -var bi=t.source().substring(0,80); -be.sourceStart=bi; -} -be.sourceLength=t.source().length; -be.scriptType=t.scriptType(); -be.compilationType=t.compilationType(); -if(t.compilationType()==1&& -t.evalFromScript()){ -be.evalFromScript= -this.serializeReference(t.evalFromScript()); -var bj=t.evalFromLocation(); -if(bj){ -be.evalFromLocation={line:bj.line, -column:bj.column}; -} -if(t.evalFromFunctionName()){ -be.evalFromFunctionName=t.evalFromFunctionName(); -} -} -if(t.context()){ -be.context=this.serializeReference(t.context()); -} -break; -case m.CONTEXT_TYPE: -be.data=t.data(); -break; -} -be.text=t.toText(); -return be; -}; -JSONProtocolSerializer.prototype.serializeObject_=function(t,be, -L){ -be.className=t.className(); -be.constructorFunction= -this.serializeReference(t.constructorFunction()); -be.protoObject=this.serializeReference(t.protoObject()); -be.prototypeObject=this.serializeReference(t.prototypeObject()); -if(t.hasNamedInterceptor()){ -be.namedInterceptor=true; -} -if(t.hasIndexedInterceptor()){ -be.indexedInterceptor=true; -} -if(t.isFunction()){ -be.name=t.name(); -if(!(t.inferredName()===(void 0))){ -be.inferredName=t.inferredName(); -} -be.resolved=t.resolved(); -if(t.resolved()){ -be.source=t.source(); -} -if(t.script()){ -be.script=this.serializeReference(t.script()); -be.scriptId=t.script().id(); -serializeLocationFields(t.sourceLocation(),be); -} -be.scopes=[]; -for(var J=0;J0){ -var bn=[]; -for(var J=0;J0){ -return'Infinity'; -}else{ -return'-Infinity'; -} -} -return r; -} -b.InstallFunctions(a,2,[ -"MakeMirror",MakeMirror, -"MakeMirrorSerializer",MakeMirrorSerializer, -"LookupMirror",LookupMirror, -"ToggleMirrorCache",ToggleMirrorCache, -"MirrorCacheIsEmpty",MirrorCacheIsEmpty, -]); -b.InstallConstants(a,[ -"ScopeType",C, -"PropertyType",A, -"PropertyAttribute",B, -"Mirror",Mirror, -"ValueMirror",ValueMirror, -"UndefinedMirror",UndefinedMirror, -"NullMirror",NullMirror, -"BooleanMirror",BooleanMirror, -"NumberMirror",NumberMirror, -"StringMirror",StringMirror, -"SymbolMirror",SymbolMirror, -"ObjectMirror",ObjectMirror, -"FunctionMirror",FunctionMirror, -"UnresolvedFunctionMirror",UnresolvedFunctionMirror, -"ArrayMirror",ArrayMirror, -"DateMirror",DateMirror, -"RegExpMirror",RegExpMirror, -"ErrorMirror",ErrorMirror, -"PromiseMirror",PromiseMirror, -"MapMirror",MapMirror, -"SetMirror",SetMirror, -"IteratorMirror",IteratorMirror, -"GeneratorMirror",GeneratorMirror, -"PropertyMirror",PropertyMirror, -"InternalPropertyMirror",InternalPropertyMirror, -"FrameMirror",FrameMirror, -"ScriptMirror",ScriptMirror, -"ScopeMirror",ScopeMirror, -"FrameDetails",FrameDetails, -]); -b.InstallFunctions(b,2,[ -"ClearMirrorCache",ClearMirrorCache -]); -b.Export(function(bv){ -bv.MirrorType=m; -}); -}) - -debugf -(function(a,b){ -"use strict"; -var c=a.FrameMirror; -var d=a.Array; -var e=a.RegExp; -var f=a.isNaN; -var g=a.JSON.parse; -var h=a.JSON.stringify; -var i=a.LookupMirror; -var j=a.MakeMirror; -var k=a.MakeMirrorSerializer; -var l=a.Math.min; -var m=a.Mirror; -var n; -var o=a.parseInt; -var p=a.ValueMirror; -b.Import(function(q){ -n=q.MirrorType; -}); -var r=10; -var s={}; -var t=/^(?:\s*(?:\/\*.*?\*\/)*)*/; -s.DebugEvent={Break:1, -Exception:2, -NewFunction:3, -BeforeCompile:4, -AfterCompile:5, -CompileError:6, -AsyncTaskEvent:7}; -s.ExceptionBreak={Caught:0, -Uncaught:1}; -s.StepAction={StepOut:0, -StepNext:1, -StepIn:2, -StepFrame:3}; -s.ScriptType={Native:0, -Extension:1, -Normal:2, -Wasm:3}; -s.ScriptCompilationType={Host:0, -Eval:1, -JSON:2}; -s.ScriptBreakPointType={ScriptId:0, -ScriptName:1, -ScriptRegExp:2}; -s.BreakPositionAlignment={ -Statement:0, -BreakPosition:1 -}; -function ScriptTypeFlag(u){ -return(1<=this.frameCount()){ -throw %make_type_error(33); -} -return new c(this.break_id,aw); -}; -ExecutionState.prototype.setSelectedFrame=function(ax){ -var L=(%_ToNumber(ax)); -if(L<0||L>=this.frameCount()){ -throw %make_type_error(33); -} -this.selected_frame=L; -}; -ExecutionState.prototype.selectedFrame=function(){ -return this.selected_frame; -}; -ExecutionState.prototype.debugCommandProcessor=function(ay){ -return new DebugCommandProcessor(this,ay); -}; -function MakeBreakEvent(H,az){ -return new BreakEvent(H,az); -} -function BreakEvent(H,az){ -this.frame_=new c(H,0); -this.break_points_hit_=az; -} -BreakEvent.prototype.eventType=function(){ -return s.DebugEvent.Break; -}; -BreakEvent.prototype.func=function(){ -return this.frame_.func(); -}; -BreakEvent.prototype.sourceLine=function(){ -return this.frame_.sourceLine(); -}; -BreakEvent.prototype.sourceColumn=function(){ -return this.frame_.sourceColumn(); -}; -BreakEvent.prototype.sourceLineText=function(){ -return this.frame_.sourceLineText(); -}; -BreakEvent.prototype.breakPointsHit=function(){ -return this.break_points_hit_; -}; -BreakEvent.prototype.toJSONProtocol=function(){ -var aA={seq:v++, -type:"event", -event:"break", -body:{invocationText:this.frame_.invocationText()} -}; -var O=this.func().script(); -if(O){ -aA.body.sourceLine=this.sourceLine(), -aA.body.sourceColumn=this.sourceColumn(), -aA.body.sourceLineText=this.sourceLineText(), -aA.body.script=MakeScriptObject_(O,false); -} -if(this.breakPointsHit()){ -aA.body.breakpoints=[]; -for(var L=0;L0){ -aA.body.sourceLine=this.sourceLine(); -aA.body.sourceColumn=this.sourceColumn(); -aA.body.sourceLineText=this.sourceLineText(); -var O=this.func().script(); -if(O){ -aA.body.script=MakeScriptObject_(O,false); -} -}else{ -aA.body.sourceLine=-1; -} -return aA.toJSONProtocol(); -}; -function MakeCompileEvent(O,u){ -return new CompileEvent(O,u); -} -function CompileEvent(O,u){ -this.script_=j(O); -this.type_=u; -} -CompileEvent.prototype.eventType=function(){ -return this.type_; -}; -CompileEvent.prototype.script=function(){ -return this.script_; -}; -CompileEvent.prototype.toJSONProtocol=function(){ -var aA=new ProtocolMessage(); -aA.running=true; -switch(this.type_){ -case s.DebugEvent.BeforeCompile: -aA.event="beforeCompile"; -break; -case s.DebugEvent.AfterCompile: -aA.event="afterCompile"; -break; -case s.DebugEvent.CompileError: -aA.event="compileError"; -break; -} -aA.body={}; -aA.body.script=this.script_; -return aA.toJSONProtocol(); -}; -function MakeScriptObject_(O,aG){ -var aA={id:O.id(), -name:O.name(), -lineOffset:O.lineOffset(), -columnOffset:O.columnOffset(), -lineCount:O.lineCount(), -}; -if(!(O.data()===(void 0))){ -aA.data=O.data(); -} -if(aG){ -aA.source=O.source(); -} -return aA; -} -function MakeAsyncTaskEvent(aH){ -return new AsyncTaskEvent(aH); -} -function AsyncTaskEvent(aH){ -this.type_=aH.type; -this.name_=aH.name; -this.id_=aH.id; -} -AsyncTaskEvent.prototype.type=function(){ -return this.type_; -} -AsyncTaskEvent.prototype.name=function(){ -return this.name_; -} -AsyncTaskEvent.prototype.id=function(){ -return this.id_; -} -function DebugCommandProcessor(F,ay){ -this.exec_state_=F; -this.running_=ay||false; -} -DebugCommandProcessor.prototype.processDebugRequest=function(aI){ -return this.processDebugJSONRequest(aI); -}; -function ProtocolMessage(aI){ -this.seq=v++; -if(aI){ -this.type='response'; -this.request_seq=aI.seq; -this.command=aI.command; -}else{ -this.type='event'; -} -this.success=true; -this.running=(void 0); -} -ProtocolMessage.prototype.setOption=function(aJ,A){ -if(!this.options_){ -this.options_={}; -} -this.options_[aJ]=A; -}; -ProtocolMessage.prototype.failed=function(aK,aL){ -this.success=false; -this.message=aK; -if((typeof(aL)==='object')){ -this.error_details=aL; -} -}; -ProtocolMessage.prototype.toJSONProtocol=function(){ -var aM={}; -aM.seq=this.seq; -if(this.request_seq){ -aM.request_seq=this.request_seq; -} -aM.type=this.type; -if(this.event){ -aM.event=this.event; -} -if(this.command){ -aM.command=this.command; -} -if(this.success){ -aM.success=this.success; -}else{ -aM.success=false; -} -if(this.body){ -var aN; -var aO=k(true,this.options_); -if(this.body instanceof m){ -aN=aO.serializeValue(this.body); -}else if(this.body instanceof d){ -aN=[]; -for(var L=0;L=this.exec_state_.frameCount()){ -return aP.failed('Invalid frame "'+bn+'"'); -} -aP.body=this.exec_state_.frame(bE).evaluate( -by,(!!(bz)),bB); -return; -}else{ -aP.body=this.exec_state_.frame().evaluate( -by,(!!(bz)),bB); -return; -} -}; -DebugCommandProcessor.prototype.lookupRequest_=function(aI,aP){ -if(!aI.arguments){ -return aP.failed('Missing arguments'); -} -var bF=aI.arguments.handles; -if((bF===(void 0))){ -return aP.failed('Argument "handles" missing'); -} -if(!(aI.arguments.includeSource===(void 0))){ -var bG=(!!(aI.arguments.includeSource)); -aP.setOption('includeSource',bG); -} -var bH={}; -for(var L=0;L=this.exec_state_.frameCount()){ -return aP.failed('Invalid frame "'+bn+'"'); -} -bn=this.exec_state_.frame(bE); -} -} -var O=bn.func().script(); -if(!O){ -return aP.failed('No source'); -} -var bK=O.value(); -var bL=bK.line_offset; -var bM=%ScriptLineCount(bK); -bI=(bI===(void 0))?0:bI-bL; -bJ=(bJ===(void 0))?bM:bJ-bL; -if(bI<0)bI=0; -if(bJ>bM)bJ=bM; -if(bI>=bM||bJ<0||bI>bJ){ -return aP.failed('Invalid line interval'); -} -aP.body={}; -aP.body.fromLine=bI+bL; -aP.body.toLine=bJ+bL; -aP.body.fromPosition=%ScriptLineStartPosition(bK,bI); -aP.body.toPosition= -(bJ==0)?0:%ScriptLineEndPosition(bK,bJ-1); -aP.body.totalLines=%ScriptLineCount(bK); -aP.body.source=%_SubString(bK.source, -aP.body.fromPosition, -aP.body.toPosition); -}; -DebugCommandProcessor.prototype.scriptsRequest_=function(aI,aP){ -var bN=ScriptTypeFlag(s.ScriptType.Normal); -var bG=false; -var bO=null; -if(aI.arguments){ -if(!(aI.arguments.types===(void 0))){ -bN=(%_ToNumber(aI.arguments.types)); -if(f(bN)||bN<0){ -return aP.failed('Invalid types "'+ -aI.arguments.types+'"'); -} -} -if(!(aI.arguments.includeSource===(void 0))){ -bG=(!!(aI.arguments.includeSource)); -aP.setOption('includeSource',bG); -} -if((%_IsArray(aI.arguments.ids))){ -bO={}; -var bP=aI.arguments.ids; -for(var L=0;L=0){ -bT=true; -} -} -if(!bT)continue; -} -if(bN&ScriptTypeFlag(Y[L].type)){ -aP.body.push(j(Y[L])); -} -} -}; -DebugCommandProcessor.prototype.suspendRequest_=function(aI,aP){ -aP.running=false; -}; -DebugCommandProcessor.prototype.versionRequest_=function(aI,aP){ -aP.body={ -V8Version:%GetV8Version() -}; -}; -DebugCommandProcessor.prototype.changeLiveRequest_=function( -aI,aP){ -if(!aI.arguments){ -return aP.failed('Missing arguments'); -} -var bU=aI.arguments.script_id; -var bV=!!aI.arguments.preview_only; -var bW=scriptById(bU); -if(!bW){ -aP.failed('Script not found'); -return; -} -var bX=new d(); -if(!(typeof(aI.arguments.new_source)==='string')){ -throw"new_source argument expected"; -} -var bY=aI.arguments.new_source; -var bZ; -try{ -bZ=s.LiveEdit.SetScriptSource(bW, -bY,bV,bX); -}catch(e){ -if(e instanceof s.LiveEdit.Failure&&"details"in e){ -aP.failed(e.message,e.details); -return; -} -throw e; -} -aP.body={change_log:bX,result:bZ}; -if(!bV&&!this.running_&&bZ.stack_modified){ -aP.body.stepin_recommended=true; -} -}; -DebugCommandProcessor.prototype.restartFrameRequest_=function( -aI,aP){ -if(!aI.arguments){ -return aP.failed('Missing arguments'); -} -var bn=aI.arguments.frame; -if(this.exec_state_.frameCount()==0){ -return aP.failed('No frames'); -} -var ca; -if(!(bn===(void 0))){ -var bE=(%_ToNumber(bn)); -if(bE<0||bE>=this.exec_state_.frameCount()){ -return aP.failed('Invalid frame "'+bn+'"'); -} -ca=this.exec_state_.frame(bE); -}else{ -ca=this.exec_state_.frame(); -} -var bZ=ca.restart(); -aP.body={result:bZ}; -}; -DebugCommandProcessor.prototype.debuggerFlagsRequest_=function(aI, -aP){ -if(!aI.arguments){ -aP.failed('Missing arguments'); -return; -} -var cb=aI.arguments.flags; -aP.body={flags:[]}; -if(!(cb===(void 0))){ -for(var L=0;LP[E].start_position){ -R=E; -} -} -if(R!=x){ -var S=P[R]; -var T=Q[R]; -P[R]=P[x]; -Q[R]=Q[x]; -P[x]=S; -Q[x]=T; -} -} -var U=0; -function ResetIndexes(V,W){ -var X=-1; -while(U=aK.pos1+aK.len1){ -return aE+aK.pos2+aK.len2-aK.pos1-aK.len1; -} -if(!aF){ -aF=PosTranslator.DefaultInsideChunkHandler; -} -return aF(aE,aK); -}; -PosTranslator.DefaultInsideChunkHandler=function(aE,aL){ -Assert(false,"Cannot translate position in changed area"); -}; -PosTranslator.ShiftWithTopInsideChunkHandler= -function(aE,aL){ -return aE-aL.pos1+aL.pos2; -}; -var i={ -UNCHANGED:"unchanged", -SOURCE_CHANGED:"source changed", -CHANGED:"changed", -DAMAGED:"damaged" -}; -function CodeInfoTreeNode(aM,aN,aO){ -this.info=aM; -this.children=aN; -this.array_index=aO; -this.parent=(void 0); -this.status=i.UNCHANGED; -this.status_explanation=(void 0); -this.new_start_pos=(void 0); -this.new_end_pos=(void 0); -this.corresponding_node=(void 0); -this.unmatched_new_nodes=(void 0); -this.textual_corresponding_node=(void 0); -this.textually_unmatched_new_nodes=(void 0); -this.live_shared_function_infos=(void 0); -} -function BuildCodeInfoTree(aP){ -var aQ=0; -function BuildNode(){ -var aR=aQ; -aQ++; -var aS=new e(); -while(aQ=ay.length;}; -this.TranslatePos=function(aE){return aE+aX;}; -}; -function ProcessInternals(aY){ -aY.new_start_pos=aV.TranslatePos( -aY.info.start_position); -var aZ=0; -var ba=false; -var bb=false; -while(!aV.done()&& -aV.current().pos1= -aV.current().pos1+aV.current().len1){ -ba=true; -aV.next(); -continue; -}else if(bc.info.start_position<=aV.current().pos1&& -bc.info.end_position>=aV.current().pos1+ -aV.current().len1){ -ProcessInternals(bc); -bb=bb|| -(bc.status!=i.UNCHANGED); -ba=ba|| -(bc.status==i.DAMAGED); -aZ++; -continue; -}else{ -ba=true; -bc.status=i.DAMAGED; -bc.status_explanation= -"Text diff overlaps with function boundary"; -aZ++; -continue; -} -}else{ -if(aV.current().pos1+aV.current().len1<= -aY.info.end_position){ -aY.status=i.CHANGED; -aV.next(); -continue; -}else{ -aY.status=i.DAMAGED; -aY.status_explanation= -"Text diff overlaps with function boundary"; -return; -} -} -Assert("Unreachable",false); -} -while(aZ0){ -return bp; -} -} -function TraverseTree(w){ -w.live_shared_function_infos=FindFunctionInfos(w.info); -for(var x=0;x ["+bx+"]"; -} -return; -} -var by; -function CheckStackActivations(old_shared_wrapper_list, -new_shared_list, -Z){ -var bz=new e(); -for(var x=0;x0){ -Z.push({dropped_from_stack:bC}); -} -if(bB.length>0){ -Z.push({functions_on_stack:bB}); -throw new Failure("Blocked by functions on stack"); -} -return bC.length; -} -var by={ -AVAILABLE_FOR_PATCH:1, -BLOCKED_ON_ACTIVE_STACK:2, -BLOCKED_ON_OTHER_STACK:3, -BLOCKED_UNDER_NATIVE_CODE:4, -REPLACED_ON_ACTIVE_STACK:5, -BLOCKED_UNDER_GENERATOR:6, -BLOCKED_ACTIVE_GENERATOR:7, -BLOCKED_NO_NEW_TARGET_ON_RESTART:8 -}; -by.SymbolName=function(bF){ -var bG=by; -for(var bH in bG){ -if(bG[bH]==bF){ -return bH; -} -} -}; -function Failure(as){ -this.message=as; -} -Failure.prototype.toString=function(){ -return"LiveEdit Failure: "+this.message; -}; -function CopyErrorPositionToDetails(bI,p){ -function createPositionStruct(N,bJ){ -if(bJ==-1)return; -var bK=N.locationFromPosition(bJ,true); -if(bK==null)return; -return{ -line:bK.line+1, -column:bK.column+1, -position:bJ -}; -} -if(!("scriptObject"in bI)||!("startPosition"in bI)){ -return; -} -var N=bI.scriptObject; -var bL={ -start:createPositionStruct(N,bI.startPosition), -end:createPositionStruct(N,bI.endPosition) -}; -p.position=bL; -} -function SetScriptSource(N,bM,bN,Z){ -var j=N.source; -var bO=CompareStrings(j,bM); -return ApplyPatchMultiChunk(N,bO,bM,bN, -Z); -} -function CompareStrings(bP,bQ){ -return %LiveEditCompareStrings(bP,bQ); -} -function ApplySingleChunkPatch(N,change_pos,change_len,new_str, -Z){ -var j=N.source; -var bM=j.substring(0,change_pos)+ -new_str+j.substring(change_pos+change_len); -return ApplyPatchMultiChunk(N, -[change_pos,change_pos+change_len,change_pos+new_str.length], -bM,false,Z); -} -function DescribeChangeTree(bd){ -function ProcessOldNode(w){ -var bR=[]; -for(var x=0;x>1); -var m=2|4|1; -for(var n=0;n>1); -for(var n=0;n>1)+(fields?fields.length:0); -if(v>=4){ -%OptimizeObjectForAddingMultipleProperties(u,v); -} -if(fields){ -for(var n=0;n9007199254740991)throw %make_range_error(i); -return j; -} -function MaxSimple(k,l){ -return k>l?k:l; -} -function MinSimple(k,l){ -return k>l?l:k; -} -%SetForceInlineFlag(MaxSimple); -%SetForceInlineFlag(MinSimple); -function SpeciesConstructor(m,n){ -var o=m.constructor; -if((o===(void 0))){ -return n; -} -if(!(%_IsJSReceiver(o))){ -throw %make_type_error(28); -} -var p=o[f]; -if((p==null)){ -return n; -} -if(%IsConstructor(p)){ -return p; -} -throw %make_type_error(236); -} -%FunctionSetPrototype(c,new c(0)); -b.Export(function(q){ -q.MaxSimple=MaxSimple; -q.MinSimple=MinSimple; -q.ToPositiveInteger=ToPositiveInteger; -q.ToIndex=ToIndex; -q.SpeciesConstructor=SpeciesConstructor; -}); -}) - -$v8natives12 -(function(a,b){ -%CheckIsBootstrapping(); -var c=a.Number; -var d=a.Object; -var e=b.ImportNow("iterator_symbol"); -var f=%GetRootNaN(); -var g=b.ImportNow("object_to_string"); -function GlobalParseInt(h,i){ -if((i===(void 0))||i===10||i===0){ -if(%_IsSmi(h))return h; -if((typeof(h)==='number')&& -((0.01>2; -var I=%EstimateNumberOfElements(q); -return(II*4); -} -function Stack(){ -this.length=0; -this.values=new g(); -} -Stack.prototype.length=null; -Stack.prototype.values=null; -function StackPush(J,K){ -J.values[J.length++]=K; -} -function StackPop(J){ -J.values[--J.length]=null -} -function StackHas(J,L){ -var r=J.length; -var M=J.values; -for(var y=0;y=P){ -var T=q[E]; -if(!(T===(void 0))||E in q){ -%CreateDataProperty(S,E-P,T); -} -} -} -} -} -function SparseMove(q,P,Q,R,V){ -if(V===Q)return; -var W=new g( -j(R-Q+V,0xffffffff)); -var X; -var v=%GetArrayKeys(q,R); -if((typeof(v)==='number')){ -var w=v; -for(var y=0;y=P+Q){ -var T=q[E]; -if(!(T===(void 0))||E in q){ -var Y=E-Q+V; -W[Y]=T; -if(Y>0xfffffffe){ -X=X||new g(); -X.push(Y); -} -} -} -} -} -%MoveArrayContents(W,q); -if(!(X===(void 0))){ -var r=X.length; -for(var y=0;yQ){ -for(var y=R-Q;y>P;y--){ -var aa=y+Q-1; -var ab=y+V-1; -if(aa in q){ -q[ab]=q[aa]; -}else{ -delete q[ab]; -} -} -}else{ -for(var y=P;yR-Q+V;y--){ -delete q[y-1]; -} -} -} -} -function ArrayToString(){ -var q; -var ac; -if((%_IsArray(this))){ -ac=this.join; -if(ac===ArrayJoin){ -return Join(this,this.length,',',false); -} -q=this; -}else{ -q=(%_ToObject(this)); -ac=q.join; -} -if(!(typeof(ac)==='function')){ -return %_Call(l,q); -} -return %_Call(ac,q); -} -function InnerArrayToLocaleString(q,r){ -return Join(q,(%_ToLength(r)),',',true); -} -function ArrayToLocaleString(){ -var q=(%_ToObject(this)); -var ad=q.length; -return InnerArrayToLocaleString(q,ad); -} -function InnerArrayJoin(B,q,r){ -if((B===(void 0))){ -B=','; -}else{ -B=(%_ToString(B)); -} -if(r===1){ -var z=q[0]; -if((z==null))return''; -return(%_ToString(z)); -} -return Join(q,r,B,false); -} -function ArrayJoin(B){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.join"); -var q=(%_ToObject(this)); -var r=(%_ToLength(q.length)); -return InnerArrayJoin(B,q,r); -} -function ArrayPop(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.pop"); -var q=(%_ToObject(this)); -var ae=(%_ToLength(q.length)); -if(ae==0){ -q.length=ae; -return; -} -ae--; -var K=q[ae]; -%DeleteProperty_Strict(q,ae); -q.length=ae; -return K; -} -function ArrayPush(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.push"); -var q=(%_ToObject(this)); -var ae=(%_ToLength(q.length)); -var af=arguments.length; -if(af>9007199254740991-ae)throw %make_type_error(228,af,ae); -for(var y=0;y=y){ -al=y; -while(x[++ai]==y){} -am=R-y-1; -} -var an=q[al]; -if(!(an===(void 0))||al in q){ -var ao=q[am]; -if(!(ao===(void 0))||am in q){ -q[al]=ao; -q[am]=an; -}else{ -q[am]=an; -delete q[al]; -} -}else{ -var ao=q[am]; -if(!(ao===(void 0))||am in q){ -q[al]=ao; -delete q[am]; -} -} -} -} -function PackedArrayReverse(q,R){ -var aj=R-1; -for(var y=0;y0&&UseSparseVariant(q,R,(%_IsArray(q)),R)&& -!%object_is_sealed(q)){ -SparseMove(q,0,0,R,as); -}else{ -SimpleMove(q,0,0,R,as); -} -for(var y=0;yR)P=R; -} -if(av<0){ -av+=R; -if(av<0)av=0; -}else{ -if(av>R)av=R; -} -var aw=ArraySpeciesCreate(q,i(av-P,0)); -if(avR?R:P; -} -function ComputeSpliceDeleteCount(ax,as,R,P){ -var Q=0; -if(as==1) -return R-P; -Q=(%_ToInteger(ax)); -if(Q<0) -return 0; -if(Q>R-P) -return R-P; -return Q; -} -function ArraySplice(at,ax){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.splice"); -var as=arguments.length; -var q=(%_ToObject(this)); -var R=(%_ToLength(q.length)); -var P=ComputeSpliceStartIndex((%_ToInteger(at)),R); -var Q=ComputeSpliceDeleteCount(ax,as,R, -P); -var S=ArraySpeciesCreate(q,Q); -S.length=Q; -var ay=as>2?as-2:0; -if(Q!=ay&&%object_is_sealed(q)){ -throw %make_type_error(13); -}else if(Q>0&&%object_is_frozen(q)){ -throw %make_type_error(12); -} -var az=Q; -if(ay!=Q){ -az+=R-P-Q; -} -if(UseSparseVariant(q,R,(%_IsArray(q)),az)){ -%NormalizeElements(q); -if((%_IsArray(S)))%NormalizeElements(S); -SparseSlice(q,P,Q,R,S); -SparseMove(q,P,Q,R,ay); -}else{ -SimpleSlice(q,P,Q,R,S); -SimpleMove(q,P,Q,R,ay); -} -var y=P; -var aA=2; -var aB=arguments.length; -while(aA=p;aj--){ -var aH=t[aj]; -var aI=aC(aH,aG); -if(aI>0){ -t[aj+1]=aH; -}else{ -break; -} -} -t[aj+1]=aG; -} -}; -var aJ=function(t,p,aF){ -var aK=new g(); -var aL=200+((aF-p)&15); -var aj=0; -p+=1; -aF-=1; -for(var y=p;y>1][0]; -return aM; -} -var aN=function QuickSort(t,p,aF){ -var aM=0; -while(true){ -if(aF-p<=10){ -aE(t,p,aF); -return; -} -if(aF-p>1000){ -aM=aJ(t,p,aF); -}else{ -aM=p+((aF-p)>>1); -} -var aO=t[p]; -var aP=t[aF-1]; -var aQ=t[aM]; -var aR=aC(aO,aP); -if(aR>0){ -var aH=aO; -aO=aP; -aP=aH; -} -var aS=aC(aO,aQ); -if(aS>=0){ -var aH=aO; -aO=aQ; -aQ=aP; -aP=aH; -}else{ -var aT=aC(aP,aQ); -if(aT>0){ -var aH=aP; -aP=aQ; -aQ=aH; -} -} -t[p]=aO; -t[aF-1]=aQ; -var aU=aP; -var aV=p+1; -var aW=aF-1; -t[aM]=t[aV]; -t[aV]=aU; -partition:for(var y=aV+1;y0){ -do{ -aW--; -if(aW==y)break partition; -var aX=t[aW]; -aI=aC(aX,aU); -}while(aI>0); -t[y]=t[aW]; -t[aW]=aG; -if(aI<0){ -aG=t[y]; -t[y]=t[aV]; -t[aV]=aG; -aV++; -} -} -} -if(aF-aW=ba){ba=y+1;} -} -} -}else{ -for(var y=0;y=ba){ba=Z+1;} -} -} -} -} -return ba; -}; -var bd=function(aZ,p,aF){ -for(var bb=%object_get_prototype_of(aZ);bb; -bb=%object_get_prototype_of(bb)){ -var v=(%_IsJSProxy(bb))?aF:%GetArrayKeys(bb,aF); -if((typeof(v)==='number')){ -var bc=v; -for(var y=p;y=r)Z=r-1; -} -var bo=0; -var ba=Z; -if(UseSparseVariant(q,r,(%_IsArray(q)),Z)){ -%NormalizeElements(q); -var v=%GetArrayKeys(q,Z+1); -if((typeof(v)==='number')){ -ba=v; -}else{ -if(v.length==0)return-1; -var bp=GetSortedArrayKeys(q,v); -var y=bp.length-1; -while(y>=0){ -var E=bp[y]; -if(q[E]===aG)return E; -y--; -} -return-1; -} -} -if(!(aG===(void 0))){ -for(var y=ba;y>=bo;y--){ -if(q[y]===aG)return y; -} -return-1; -} -for(var y=ba;y>=bo;y--){ -if((q[y]===(void 0))&&y in q){ -return y; -} -} -return-1; -} -function ArrayLastIndexOf(aG,Z){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.lastIndexOf"); -var r=(%_ToLength(this.length)); -return InnerArrayLastIndexOf(this,aG,Z,r, -arguments.length); -} -function InnerArrayReduce(bq,T,q,r,bn){ -if(!(typeof(bq)==='function')){ -throw %make_type_error(15,bq); -} -var y=0; -find_initial:if(bn<2){ -for(;y=0;y--){ -if(y in q){ -T=q[y--]; -break find_initial; -} -} -throw %make_type_error(122); -} -for(;y>=0;y--){ -if(y in q){ -var aG=q[y]; -T=bq(T,aG,y,q); -} -} -return T; -} -function ArrayReduceRight(bq,T){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.reduceRight"); -var q=(%_ToObject(this)); -var r=(%_ToLength(q.length)); -return InnerArrayReduceRight(bq,T,q,r, -arguments.length); -} -function InnerArrayCopyWithin(br,at,au,q,r){ -br=(%_ToInteger(br)); -var aF; -if(br<0){ -aF=i(r+br,0); -}else{ -aF=j(br,r); -} -at=(%_ToInteger(at)); -var p; -if(at<0){ -p=i(r+at,0); -}else{ -p=j(at,r); -} -au=(au===(void 0))?r:(%_ToInteger(au)); -var bs; -if(au<0){ -bs=i(r+au,0); -}else{ -bs=j(au,r); -} -var bt=j(bs-p,r-aF); -var bu=1; -if(p0){ -if(p in q){ -q[aF]=q[p]; -}else{ -delete q[aF]; -} -p=p+bu; -aF=aF+bu; -bt--; -} -return q; -} -function ArrayCopyWithin(br,at,au){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Array.prototype.copyWithin"); -var q=(%_ToObject(this)); -var r=(%_ToLength(q.length)); -return InnerArrayCopyWithin(br,at,au,q,r); -} -function InnerArrayFind(bv,bw,q,r){ -if(!(typeof(bv)==='function')){ -throw %make_type_error(15,bv); -} -for(var y=0;yr)y=r; -} -if(au<0){ -au+=r; -if(au<0)au=0; -}else{ -if(au>r)au=r; -} -if((au-y)>0&&%object_is_frozen(q)){ -throw %make_type_error(12); -} -for(;yv.length)w=v.length; -return %StringIndexOf(v,t,w); -} -%FunctionSetLength(StringIndexOf,1); -function StringMatchJS(t){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.match"); -if(!(t==null)){ -var x=t[k]; -if(!(x===(void 0))){ -return %_Call(x,t,this); -} -} -var v=(%_ToString(this)); -var y=%_NewObject(e,e); -j(y,t); -return y[k](v); -} -function StringReplace(z,A){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.replace"); -if(!(z==null)){ -var B=z[l]; -if(!(B===(void 0))){ -return %_Call(B,z,this,A); -} -} -var v=(%_ToString(this)); -z=(%_ToString(z)); -if(z.length==1&& -v.length>0xFF&& -(typeof(A)==='string')&& -%StringIndexOf(A,'$',0)<0){ -return %StringReplaceOneCharWithString(v,z,A); -} -var C=%StringIndexOf(v,z,0); -if(C<0)return v; -var D=C+z.length; -var E=%_SubString(v,0,C); -if((typeof(A)==='function')){ -E+=A(z,C,v); -}else{ -const captures={length:1}; -const matched=%_SubString(v,C,D); -E+=d(matched,v,C,captures, -(%_ToString(A))); -} -return E+%_SubString(v,D,v.length); -} -function StringSearch(t){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.search"); -if(!(t==null)){ -var F=t[m]; -if(!(F===(void 0))){ -return %_Call(F,t,this); -} -} -var v=(%_ToString(this)); -var y=%_NewObject(e,e); -j(y,t); -return %_Call(y[m],y,v); -} -function StringSlice(C,D){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.slice"); -var q=(%_ToString(this)); -var G=q.length; -var H=(%_ToInteger(C)); -var I=G; -if(!(D===(void 0))){ -I=(%_ToInteger(D)); -} -if(H<0){ -H+=G; -if(H<0){ -H=0; -} -}else{ -if(H>G){ -return''; -} -} -if(I<0){ -I+=G; -if(I<0){ -return''; -} -}else{ -if(I>G){ -I=G; -} -} -if(I<=H){ -return''; -} -return %_SubString(q,H,I); -} -function StringSplitJS(J,K){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.split"); -if(!(J==null)){ -var L=J[n]; -if(!(L===(void 0))){ -return %_Call(L,J,this,K); -} -} -var v=(%_ToString(this)); -K=((K===(void 0)))?4294967295:((K)>>>0); -var M=v.length; -var N=(%_ToString(J)); -if(K===0)return[]; -if((J===(void 0)))return[v]; -var O=N.length; -if(O===0)return %StringToArray(v,K); -return %StringSplit(v,N,K); -} -function StringToLowerCaseJS(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLowerCase"); -return %StringToLowerCase((%_ToString(this))); -} -function StringToLocaleLowerCase(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleLowerCase"); -return %StringToLowerCase((%_ToString(this))); -} -function StringToUpperCaseJS(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toUpperCase"); -return %StringToUpperCase((%_ToString(this))); -} -function StringToLocaleUpperCase(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleUpperCase"); -return %StringToUpperCase((%_ToString(this))); -} -function HtmlEscape(P){ -return %_Call(StringReplace,(%_ToString(P)),/"/g,"""); -} -function StringAnchor(Q){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.anchor"); -return""+(%_ToString(this))+ -""; -} -function StringBig(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.big"); -return""+(%_ToString(this))+""; -} -function StringBlink(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.blink"); -return""+(%_ToString(this))+""; -} -function StringBold(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.bold"); -return""+(%_ToString(this))+""; -} -function StringFixed(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.fixed"); -return""+(%_ToString(this))+""; -} -function StringFontcolor(R){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.fontcolor"); -return""+(%_ToString(this))+ -""; -} -function StringFontsize(S){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.fontsize"); -return""+(%_ToString(this))+ -""; -} -function StringItalics(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.italics"); -return""+(%_ToString(this))+""; -} -function StringLink(q){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.link"); -return""+(%_ToString(this))+""; -} -function StringSmall(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.small"); -return""+(%_ToString(this))+""; -} -function StringStrike(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.strike"); -return""+(%_ToString(this))+""; -} -function StringSub(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.sub"); -return""+(%_ToString(this))+""; -} -function StringSup(){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.sup"); -return""+(%_ToString(this))+""; -} -function StringRepeat(T){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.repeat"); -var q=(%_ToString(this)); -var U=(%_ToInteger(T)); -if(U<0||U===(1/0))throw %make_range_error(158); -if(q.length===0)return""; -if(U>%_MaxSmi())throw %make_range_error(158); -var V=""; -while(true){ -if(U&1)V+=q; -U>>=1; -if(U===0)return V; -q+=q; -} -} -function StringStartsWith(W,u){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.startsWith"); -var q=(%_ToString(this)); -if(g(W)){ -throw %make_type_error(40,"String.prototype.startsWith"); -} -var X=(%_ToString(W)); -var Y=(%_ToInteger(u)); -var G=q.length; -var C=i(h(Y,0),G); -var Z=X.length; -if(Z+C>G){ -return false; -} -return %_SubString(q,C,C+Z)===X; -} -%FunctionSetLength(StringStartsWith,1); -function StringEndsWith(W,u){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.endsWith"); -var q=(%_ToString(this)); -if(g(W)){ -throw %make_type_error(40,"String.prototype.endsWith"); -} -var X=(%_ToString(W)); -var G=q.length; -var Y=!(u===(void 0))?(%_ToInteger(u)):G -var D=i(h(Y,0),G); -var Z=X.length; -var C=D-Z; -if(C<0){ -return false; -} -return %_SubString(q,C,C+Z)===X; -} -%FunctionSetLength(StringEndsWith,1); -function StringIncludes(W,u){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.includes"); -var aa=(%_ToString(this)); -if(g(W)){ -throw %make_type_error(40,"String.prototype.includes"); -} -W=(%_ToString(W)); -var Y=(%_ToInteger(u)); -var ab=aa.length; -if(Y<0)Y=0; -if(Y>ab)Y=ab; -var ac=W.length; -if(ac+Y>ab){ -return false; -} -return %StringIndexOf(aa,W,Y)!==-1; -} -%FunctionSetLength(StringIncludes,1); -function StringCodePointAt(Y){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.codePointAt"); -var aa=(%_ToString(this)); -var S=aa.length; -Y=(%_ToInteger(Y)); -if(Y<0||Y>=S){ -return(void 0); -} -var ad=%_StringCharCodeAt(aa,Y); -if(ad<0xD800||ad>0xDBFF||Y+1==S){ -return ad; -} -var ae=%_StringCharCodeAt(aa,Y+1); -if(ae<0xDC00||ae>0xDFFF){ -return ad; -} -return(ad-0xD800)*0x400+ae+0x2400; -} -function StringRaw(af){ -"use strict"; -var ag=arguments.length; -var ah=(%_ToObject(af)); -var ai=(%_ToObject(ah.raw)); -var aj=(%_ToLength(ai.length)); -if(aj<=0)return""; -var E=(%_ToString(ai[0])); -for(var s=1;s=E.length)return false; -var F=%_StringCharCodeAt(E,A); -if(F<0xD800||F>0xDBFF)return false; -var G=%_StringCharCodeAt(E,A+1); -return G>=0xDC00&&G<=0xDFFF; -} -function RegExpSplit(z,H){ -if(!(%_IsRegExp(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@split",this); -} -var I=this; -var E=(%_ToString(z)); -H=((H===(void 0)))?4294967295:((H)>>>0); -var J=E.length; -if(H===0)return[]; -if(J===0){ -if(DoRegExpExec(I,E,0,0)!==null)return[]; -return[E]; -} -var K=0; -var L=0; -var M=0; -var C=new g(); -outer_loop: -while(true){ -if(L===J){ -C[C.length]=%_SubString(E,K,J); -break; -} -var N=DoRegExpExec(I,E,L); -if(N===null||J===(M=N[3])){ -C[C.length]=%_SubString(E,K,J); -break; -} -var O=N[4]; -if(L===O&&O===K){ -if((%_RegExpFlags(this)&16)&&AtSurrogatePair(E,L)){ -L+=2; -}else{ -L++; -} -continue; -} -C[C.length]=%_SubString(E,K,M); -if(C.length===H)break; -var P=((N)[0])+3; -for(var Q=3+2;Q=0; -var W=%StringIndexOf(x,'y',0)>=0; -var X=W?x:x+"y"; -var Y=new U(this,X); -var Z=new c(); -var aa=0; -var ab=((H===(void 0)))?4294967295:((H)>>>0); -var ac=z.length; -var ad=0; -if(ab===0)return Z; -var C; -if(ac===0){ -C=RegExpSubclassExec(Y,z); -if((C===null))%AddElement(Z,0,z); -return Z; -} -var ae=ad; -while(ae0){ -an=(ao>>11)+(ao&0x7ff); -}else{ -an=al[++Q]-ao; -} -}else{ -var ap=ak(ao,an,E); -al[Q]=(%_ToString(ap)); -an+=ao.length; -} -} -}else{ -for(var Q=0;Q>1; -var au; -if(at==1){ -var av=%_SubString(E,A,as); -au=ak(av,A,E); -}else{ -var aw=new g(at+2); -for(var ax=0;ax>1; -this.match=ay; -this.subject=E; -} -MatchInfoCaptureWrapper.prototype.at=function(az){ -const D=this.match; -const R=D[(3+(az<<1))]; -if(R<0)return(void 0); -return %_SubString(this.subject,R,D[(3+((az<<1)+1))]); -}; -%SetForceInlineFlag(MatchInfoCaptureWrapper.prototype.at); -function ArrayCaptureWrapper(Z){ -this.length=Z.length; -this.array=Z; -} -ArrayCaptureWrapper.prototype.at=function(az){ -return this.array[az]; -}; -%SetForceInlineFlag(ArrayCaptureWrapper.prototype.at); -function RegExpReplace(z,ak){ -if(!(%_IsRegExp(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@replace",this); -} -var E=(%_ToString(z)); -var aA=this; -if(!(typeof(ak)==='function')){ -ak=(%_ToString(ak)); -if(!(%_RegExpFlags(aA)&1)){ -var D=DoRegExpExec(aA,E,0); -if(D==null){ -aA.lastIndex=0 -return E; -} -if(ak.length==0){ -return %_SubString(E,0,D[3])+ -%_SubString(E,D[4],E.length) -} -const captures=new MatchInfoCaptureWrapper(D,E); -const R=D[3]; -const S=D[4]; -const prefix=%_SubString(E,0,R); -const matched=%_SubString(E,R,S); -const suffix=%_SubString(E,S,E.length); -return prefix+ -GetSubstitution(matched,E,R,captures,ak)+ -suffix; -} -aA.lastIndex=0; -return %StringReplaceGlobalRegExpWithString( -E,aA,ak,s); -} -if((%_RegExpFlags(aA)&1)){ -return StringReplaceGlobalRegExpWithFunction(E,aA,ak); -} -return StringReplaceNonGlobalRegExpWithFunction(E,aA,ak); -} -function GetSubstitution(aB,z,aC,aD,au){ -var aE=aB.length; -var aF=z.length; -var aG=aD.length; -var aH=aC+aE; -var C=""; -var aI,aJ,aK,aL,aM,aN,aO; -var aL=%StringIndexOf(au,'$',0); -if(aL<0){ -C+=au; -return C; -} -if(aL>0)C+=%_SubString(au,0,aL); -while(true){ -aJ='$'; -aI=aL+1; -if(aI=48&&aK<=57){ -aM=(aK-48); -aN=1; -if(aI+1=48&&aL<=57){ -aO=aM*10+((aL-48)); -if(aOaI){ -C+=%_SubString(au,aI,aL); -} -} -return C; -} -function AdvanceStringIndex(z,A,V){ -var aQ=1; -if(V){ -var F=%_StringCharCodeAt(z,A); -if(F>=0xD800&&F<=0xDBFF&&z.length>A+1){ -var G=%_StringCharCodeAt(z,A+1); -if(G>=0xDC00&&G<=0xDFFF){ -aQ=2; -} -} -} -return aQ; -} -function SetAdvancedStringIndex(y,z,V){ -var aR=y.lastIndex; -y.lastIndex=aR+ -AdvanceStringIndex(z,aR,V); -} -function RegExpSubclassReplace(z,ak){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@replace",this); -} -z=(%_ToString(z)); -var J=z.length; -var aS=(typeof(ak)==='function'); -if(!aS)ak=(%_ToString(ak)); -var a=(!!(this.global)); -if(a){ -var V=(!!(this.unicode)); -this.lastIndex=0; -} -var B; -if((%_IsRegExp(this))){ -B=this.exec; -if(B===k){ -return %_Call(RegExpReplace,this,z,ak); -} -} -var aT=new g(); -var C,au; -while(true){ -C=RegExpSubclassExec(this,z,B); -B=(void 0); -if((C===null)){ -break; -}else{ -aT.push(C); -if(!a)break; -var ah=(%_ToString(C[0])); -if(ah==="")SetAdvancedStringIndex(this,z,V); -} -} -var aU=""; -var aV=0; -for(var Q=0;Q=aV){ -aU+= -%_SubString(z,aV,aC)+au; -aV=aC+aW; -} -} -if(aV>=J)return aU; -return aU+%_SubString(z,aV,J); -} -%FunctionRemovePrototype(RegExpSubclassReplace); -function RegExpSubclassSearch(z){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(45, -"RegExp.prototype.@@search",this); -} -z=(%_ToString(z)); -var aX=this.lastIndex; -if(aX!=0)this.lastIndex=0; -var C=RegExpSubclassExec(this,z); -var aY=this.lastIndex; -if(aY!=aX)this.lastIndex=aX; -if((C===null))return-1; -return C.index; -} -%FunctionRemovePrototype(RegExpSubclassSearch); -function RegExpGetLastMatch(){ -var aZ=((s)[1]); -return %_SubString(aZ, -s[3], -s[4]); -} -function RegExpGetLastParen(){ -var J=((s)[0]); -if(J<=2)return''; -var aZ=((s)[1]); -var R=s[(3+(J-2))]; -var S=s[(3+(J-1))]; -if(R!=-1&&S!=-1){ -return %_SubString(aZ,R,S); -} -return""; -} -function RegExpGetLeftContext(){ -var ba; -var E; -ba=s[3]; -E=((s)[1]); -return %_SubString(E,0,ba); -} -function RegExpGetRightContext(){ -var ba; -var E; -ba=s[4]; -E=((s)[1]); -return %_SubString(E,ba,E.length); -} -function RegExpMakeCaptureGetter(ag){ -return function foo(){ -var A=ag*2; -if(A>=((s)[0]))return''; -var bb=s[(3+(A))]; -var bc=s[(3+(A+1))]; -if(bb==-1||bc==-1)return''; -return %_SubString(((s)[1]),bb,bc); -}; -} -function RegExpGetFlags(){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error( -124,"RegExp.prototype.flags",(%_ToString(this))); -} -var C=''; -if(this.global)C+='g'; -if(this.ignoreCase)C+='i'; -if(this.multiline)C+='m'; -if(this.unicode)C+='u'; -if(this.sticky)C+='y'; -return C; -} -function RegExpGetGlobal(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(31); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.global"); -} -return(!!((%_RegExpFlags(this)&1))); -} -%SetForceInlineFlag(RegExpGetGlobal); -function RegExpGetIgnoreCase(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(31); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.ignoreCase"); -} -return(!!((%_RegExpFlags(this)&2))); -} -function RegExpGetMultiline(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(31); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.multiline"); -} -return(!!((%_RegExpFlags(this)&4))); -} -function RegExpGetSource(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(30); -return"(?:)"; -} -throw %make_type_error(125,"RegExp.prototype.source"); -} -return(%_RegExpSource(this)); -} -function RegExpGetSticky(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(11); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.sticky"); -} -return(!!((%_RegExpFlags(this)&8))); -} -%SetForceInlineFlag(RegExpGetSticky); -function RegExpGetUnicode(){ -if(!(%_IsRegExp(this))){ -if(this===f){ -%IncrementUseCounter(13); -return(void 0); -} -throw %make_type_error(125,"RegExp.prototype.unicode"); -} -return(!!((%_RegExpFlags(this)&16))); -} -%SetForceInlineFlag(RegExpGetUnicode); -function RegExpSpecies(){ -return this; -} -b.InstallGetter(e,o,RegExpSpecies); -b.InstallFunctions(e.prototype,2,[ -"test",RegExpSubclassTest, -"toString",RegExpToString, -"compile",RegExpCompileJS, -l,RegExpSubclassMatch, -m,RegExpSubclassReplace, -n,RegExpSubclassSearch, -p,RegExpSubclassSplit, -]); -b.InstallGetter(e.prototype,'flags',RegExpGetFlags); -b.InstallGetter(e.prototype,'global',RegExpGetGlobal); -b.InstallGetter(e.prototype,'ignoreCase',RegExpGetIgnoreCase); -b.InstallGetter(e.prototype,'multiline',RegExpGetMultiline); -b.InstallGetter(e.prototype,'source',RegExpGetSource); -b.InstallGetter(e.prototype,'sticky',RegExpGetSticky); -b.InstallGetter(e.prototype,'unicode',RegExpGetUnicode); -var bd=function(){ -var be=((s)[2]); -return(be===(void 0))?"":be; -}; -var bf=function(z){ -((s)[2])=(%_ToString(z)); -}; -%OptimizeObjectForAddingMultipleProperties(e,22); -b.InstallGetterSetter(e,'input',bd,bf, -2); -b.InstallGetterSetter(e,'$_',bd,bf, -2); -var bg=function(bh){}; -b.InstallGetterSetter(e,'lastMatch',RegExpGetLastMatch, -bg,2); -b.InstallGetterSetter(e,'$&',RegExpGetLastMatch,bg, -2); -b.InstallGetterSetter(e,'lastParen',RegExpGetLastParen, -bg,2); -b.InstallGetterSetter(e,'$+',RegExpGetLastParen,bg, -2); -b.InstallGetterSetter(e,'leftContext',RegExpGetLeftContext, -bg,2); -b.InstallGetterSetter(e,'$`',RegExpGetLeftContext,bg, -2); -b.InstallGetterSetter(e,'rightContext',RegExpGetRightContext, -bg,2); -b.InstallGetterSetter(e,"$'",RegExpGetRightContext,bg, -2); -for(var Q=1;Q<10;++Q){ -b.InstallGetterSetter(e,'$'+Q,RegExpMakeCaptureGetter(Q), -bg,2); -} -%ToFastProperties(e); -%InstallToContext(["regexp_last_match_info",s]); -var bi={ -0:2, -1:"", -2:(void 0), -3:0, -4:0 -}; -function InternalRegExpMatch(y,E){ -var N=%_RegExpExec(y,E,0,bi); -if(!(N===null)){ -var bj=((N)[0])>>1; -var R=N[3]; -var S=N[4]; -var F=%_SubString(E,R,S); -var C=%_RegExpConstructResult(bj,R,E); -C[0]=F; -if(bj==1)return C; -var ax=3+2; -for(var Q=1;Q%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 1!==0){ -throw %make_range_error(169, -"start offset","Uint8Array",1); -} -} -var ah; -if((ae===(void 0))){ -if(af % 1!==0){ -throw %make_range_error(169, -"byte length","Uint8Array",1); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint8Array",1); -} -}else{ -ah=ae*1; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,1,ac,ag,ah,true); -} -function Uint8ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*1; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,1,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,1,null,0,aj,true); -} -} -function Uint8ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*1; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,1,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,1,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 1!==0){ -throw %make_range_error(169, -"start offset","Int8Array",1); -} -} -var ah; -if((ae===(void 0))){ -if(af % 1!==0){ -throw %make_range_error(169, -"byte length","Int8Array",1); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Int8Array",1); -} -}else{ -ah=ae*1; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,2,ac,ag,ah,true); -} -function Int8ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*1; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,2,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,2,null,0,aj,true); -} -} -function Int8ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*1; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,2,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,2,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 2!==0){ -throw %make_range_error(169, -"start offset","Uint16Array",2); -} -} -var ah; -if((ae===(void 0))){ -if(af % 2!==0){ -throw %make_range_error(169, -"byte length","Uint16Array",2); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint16Array",2); -} -}else{ -ah=ae*2; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,3,ac,ag,ah,true); -} -function Uint16ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*2; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,3,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,3,null,0,aj,true); -} -} -function Uint16ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*2; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,3,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,3,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 2!==0){ -throw %make_range_error(169, -"start offset","Int16Array",2); -} -} -var ah; -if((ae===(void 0))){ -if(af % 2!==0){ -throw %make_range_error(169, -"byte length","Int16Array",2); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Int16Array",2); -} -}else{ -ah=ae*2; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,4,ac,ag,ah,true); -} -function Int16ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*2; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,4,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,4,null,0,aj,true); -} -} -function Int16ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*2; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,4,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,4,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 4!==0){ -throw %make_range_error(169, -"start offset","Uint32Array",4); -} -} -var ah; -if((ae===(void 0))){ -if(af % 4!==0){ -throw %make_range_error(169, -"byte length","Uint32Array",4); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint32Array",4); -} -}else{ -ah=ae*4; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,5,ac,ag,ah,true); -} -function Uint32ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*4; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,5,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,5,null,0,aj,true); -} -} -function Uint32ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*4; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,5,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,5,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 4!==0){ -throw %make_range_error(169, -"start offset","Int32Array",4); -} -} -var ah; -if((ae===(void 0))){ -if(af % 4!==0){ -throw %make_range_error(169, -"byte length","Int32Array",4); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Int32Array",4); -} -}else{ -ah=ae*4; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,6,ac,ag,ah,true); -} -function Int32ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*4; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,6,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,6,null,0,aj,true); -} -} -function Int32ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*4; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,6,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,6,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 4!==0){ -throw %make_range_error(169, -"start offset","Float32Array",4); -} -} -var ah; -if((ae===(void 0))){ -if(af % 4!==0){ -throw %make_range_error(169, -"byte length","Float32Array",4); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Float32Array",4); -} -}else{ -ah=ae*4; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,7,ac,ag,ah,true); -} -function Float32ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*4; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,7,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,7,null,0,aj,true); -} -} -function Float32ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*4; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,7,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,7,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 8!==0){ -throw %make_range_error(169, -"start offset","Float64Array",8); -} -} -var ah; -if((ae===(void 0))){ -if(af % 8!==0){ -throw %make_range_error(169, -"byte length","Float64Array",8); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Float64Array",8); -} -}else{ -ah=ae*8; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,8,ac,ag,ah,true); -} -function Float64ArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*8; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,8,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,8,null,0,aj,true); -} -} -function Float64ArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*8; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,8,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,8,ak,ai); -} -if(!al){ -for(var am=0;am%_MaxSmi()){ -throw %make_range_error(170); -} -var af=%_ArrayBufferGetByteLength(ac); -var ag; -if((ad===(void 0))){ -ag=0; -}else{ -ag=ad; -if(ag % 1!==0){ -throw %make_range_error(169, -"start offset","Uint8ClampedArray",1); -} -} -var ah; -if((ae===(void 0))){ -if(af % 1!==0){ -throw %make_range_error(169, -"byte length","Uint8ClampedArray",1); -} -ah=af-ag; -if(ah<0){ -throw %make_range_error(169, -"byte length","Uint8ClampedArray",1); -} -}else{ -ah=ae*1; -if(ag+ah>af){ -throw %make_range_error(170); -} -} -%_TypedArrayInitialize(ab,9,ac,ag,ah,true); -} -function Uint8ClampedArrayConstructByLength(ab,ae){ -var ai=(ae===(void 0))? -0:D(ae,170); -if(ae>%_MaxSmi()){ -throw %make_range_error(170); -} -var aj=ai*1; -if(aj>%_TypedArrayMaxSizeInHeap()){ -var ac=new h(aj); -%_TypedArrayInitialize(ab,9,ac,0,aj,true); -}else{ -%_TypedArrayInitialize(ab,9,null,0,aj,true); -} -} -function Uint8ClampedArrayConstructByArrayLike(ab,ak,ae){ -var ai=C(ae,170); -if(ai>%_MaxSmi()){ -throw %make_range_error(170); -} -var al=false; -var aj=ai*1; -if(aj<=%_TypedArrayMaxSizeInHeap()){ -%_TypedArrayInitialize(ab,9,null,0,aj,false); -}else{ -al= -%TypedArrayInitializeFromArrayLike(ab,9,ak,ai); -} -if(!al){ -for(var am=0;am0){ -for(var am=0;am=aL&&aJ>=aK; -aM--){ -aE[ag+aM]=aF[aM]; -aJ-=aI; -aK-=aH; -} -return aM; -} -var aM=CopyRightPart(); -var aN=new g(aM+1-aL); -for(var am=aL;am<=aM;am++){ -aN[am-aL]=aF[am]; -} -for(am=aL;am<=aM;am++){ -aE[ag+am]=aN[am-aL]; -} -} -function TypedArraySet(ab,ag){ -var aO=(ag===(void 0))?0:(%_ToInteger(ag)); -if(aO<0)throw %make_type_error(182); -if(aO>%_MaxSmi()){ -throw %make_range_error(183); -} -switch(%TypedArraySetFastCases(this,ab,aO)){ -case 0: -return; -case 1: -TypedArraySetFromOverlappingTypedArray(this,ab,aO); -return; -case 2: -TypedArraySetFromArrayLike(this, -ab,%_TypedArrayGetLength(ab),aO); -return; -case 3: -var ai=ab.length; -if((ai===(void 0))){ -if((typeof(ab)==='number')){ -throw %make_type_error(47); -} -return; -} -ai=(%_ToLength(ai)); -if(aO+ai>%_TypedArrayGetLength(this)){ -throw %make_range_error(183); -} -TypedArraySetFromArrayLike(this,ab,ai,aO); -return; -} -} -%FunctionSetLength(TypedArraySet,1); -function TypedArrayGetToStringTag(){ -if(!(%_IsTypedArray(this)))return; -var aP=%_ClassOf(this); -if((aP===(void 0)))return; -return aP; -} -function TypedArrayCopyWithin(aE,aQ,ay){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -return k(aE,aQ,ay,this,ae); -} -%FunctionSetLength(TypedArrayCopyWithin,2); -function TypedArrayEvery(aR,aS){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -return l(aR,aS,this,ae); -} -%FunctionSetLength(TypedArrayEvery,1); -function TypedArrayForEach(aR,aS){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -q(aR,aS,this,ae); -} -%FunctionSetLength(TypedArrayForEach,1); -function TypedArrayFill(as,aQ,ay){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -return m(as,aQ,ay,this,ae); -} -%FunctionSetLength(TypedArrayFill,1); -function TypedArrayFilter(aR,aT){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -if(!(typeof(aR)==='function'))throw %make_type_error(15,aR); -var aU=new x(); -n(aR,aT,this,ae,aU); -var aV=aU.length; -var aW=TypedArraySpeciesCreate(this,aV); -for(var am=0;amaZ){ -return 1; -}else if((!%_IsSmi(%IS_VAR(aY))&&!(aY==aY))&&(!%_IsSmi(%IS_VAR(aZ))&&!(aZ==aZ))){ -return(!%_IsSmi(%IS_VAR(aZ))&&!(aZ==aZ))?0:1; -}else if((!%_IsSmi(%IS_VAR(aY))&&!(aY==aY))){ -return 1; -} -return 0; -} -function TypedArraySort(ba){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -if((ba===(void 0))){ -ba=TypedArrayComparefn; -} -return v(this,ae,ba); -} -function TypedArrayIndexOf(bb,bc){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -if(ae===0)return-1; -if(!(typeof(bb)==='number'))return-1; -var bd=(%_ToInteger(bc)); -var be; -if(bd===0){ -be=0; -}else if(bd>0){ -be=bd; -}else{ -be=ae+bd; -if(be<0){ -be=0; -} -} -while(be=0){ -if(ae<=bd){ -be=ae-1; -}else if(bd===0){ -be=0; -}else{ -be=bd; -} -}else{ -be=ae+bd; -} -while(be>=0){ -var bf=this[be]; -if(bb===bf){ -return be; -} ---be; -} -return-1; -} -%FunctionSetLength(TypedArrayLastIndexOf,1); -function TypedArrayMap(aR,aT){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -var ae=%_TypedArrayGetLength(this); -var aU=TypedArraySpeciesCreate(this,ae); -if(!(typeof(aR)==='function'))throw %make_type_error(15,aR); -for(var am=0;am=0){ -be=bd; -}else{ -be=ae+bd; -if(be<0){ -be=0; -} -} -while(be>>12); -n=n+(n<<2); -n=n^(n>>>4); -n=(n*2057)|0; -n=n^(n>>>16); -return n&0x3fffffff; -} -%SetForceInlineFlag(ComputeIntegerHash); -function GetExistingHash(q){ -if(%_IsSmi(q)){ -return ComputeIntegerHash(q,0); -} -if((typeof(q)==='string')){ -var v=%_StringGetRawHashField(q); -if((v&1)===0){ -return v>>>2; -} -}else if((%_IsJSReceiver(q))&&!(%_IsJSProxy(q))&&!(%_ClassOf(q)==='global')){ -var n=(q[f]); -return n; -} -return %GenericHash(q); -} -%SetForceInlineFlag(GetExistingHash); -function GetHash(q){ -var n=GetExistingHash(q); -if((n===(void 0))){ -n=(g()*0x40000000)|0; -if(n===0)n=1; -(q[f]=n); -} -return n; -} -%SetForceInlineFlag(GetHash); -function SetConstructor(w){ -if((new.target===(void 0))){ -throw %make_type_error(27,"Set"); -} -%_SetInitialize(this); -if(!(w==null)){ -var x=this.add; -if(!(typeof(x)==='function')){ -throw %make_type_error(87,x,'add',this); -} -for(var y of w){ -%_Call(x,this,y); -} -} -} -function SetAdd(q){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45,'Set.prototype.add',this); -} -if(q===0){ -q=0; -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -if(SetFindEntry(m,o,q,n)!==-1)return this; -var z=((%_FixedArrayGet(m,(1)|0))); -var A=((%_FixedArrayGet(m,(2)|0))); -var B=o<<1; -if((z+A)>=B){ -%SetGrow(this); -m=%_JSCollectionGetTable(this); -o=((%_FixedArrayGet(m,(0)|0))); -z=((%_FixedArrayGet(m,(1)|0))); -A=((%_FixedArrayGet(m,(2)|0))); -} -var r=z+A; -var C=(3+(o)+((r)<<1)); -var p=(n&((o)-1)); -var D=((%_FixedArrayGet(m,(3+(p))|0))); -((%_FixedArraySet(m,(3+(p))|0,r))); -(((%_FixedArraySet(m,(1)|0,(z+1)|0)))); -(%_FixedArraySet(m,(C)|0,q)); -((%_FixedArraySet(m,(C+1)|0,(D)|0))); -return this; -} -function SetHas(q){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45,'Set.prototype.has',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetExistingHash(q); -if((n===(void 0)))return false; -return SetFindEntry(m,o,q,n)!==-1; -} -function SetDelete(q){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.delete',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetExistingHash(q); -if((n===(void 0)))return false; -var r=SetFindEntry(m,o,q,n); -if(r===-1)return false; -var z=((%_FixedArrayGet(m,(1)|0)))-1; -var A=((%_FixedArrayGet(m,(2)|0)))+1; -var C=(3+(o)+((r)<<1)); -(%_FixedArraySet(m,(C)|0,%_TheHole())); -(((%_FixedArraySet(m,(1)|0,(z)|0)))); -(((%_FixedArraySet(m,(2)|0,(A)|0)))); -if(z<(o>>>1))%SetShrink(this); -return true; -} -function SetGetSize(){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.size',this); -} -var m=%_JSCollectionGetTable(this); -return((%_FixedArrayGet(m,(1)|0))); -} -function SetClearJS(){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.clear',this); -} -%_SetClear(this); -} -function SetForEach(E,F){ -if(!(%_ClassOf(this)==='Set')){ -throw %make_type_error(45, -'Set.prototype.forEach',this); -} -if(!(typeof(E)==='function'))throw %make_type_error(15,E); -var G=new i(this,2); -var q; -var H=[(void 0)]; -while(%SetIteratorNext(G,H)){ -q=H[0]; -%_Call(E,F,q,q,this); -} -} -function SetSpecies(){ -return this; -} -%SetCode(e,SetConstructor); -%FunctionSetLength(e,0); -%FunctionSetPrototype(e,new d()); -%AddNamedProperty(e.prototype,"constructor",e,2); -%AddNamedProperty(e.prototype,k,"Set", -2|1); -%FunctionSetLength(SetForEach,1); -b.InstallGetter(e,j,SetSpecies); -b.InstallGetter(e.prototype,"size",SetGetSize); -b.InstallFunctions(e.prototype,2,[ -"add",SetAdd, -"has",SetHas, -"delete",SetDelete, -"clear",SetClearJS, -"forEach",SetForEach -]); -function MapConstructor(w){ -if((new.target===(void 0))){ -throw %make_type_error(27,"Map"); -} -%_MapInitialize(this); -if(!(w==null)){ -var x=this.set; -if(!(typeof(x)==='function')){ -throw %make_type_error(87,x,'set',this); -} -for(var I of w){ -if(!(%_IsJSReceiver(I))){ -throw %make_type_error(52,I); -} -%_Call(x,this,I[0],I[1]); -} -} -} -function MapGet(q){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.get',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetExistingHash(q); -if((n===(void 0)))return(void 0); -var r=MapFindEntry(m,o,q,n); -if(r===-1)return(void 0); -return((%_FixedArrayGet(m,((3+(o)+((r)*3))+1)|0))); -} -function MapSet(q,y){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.set',this); -} -if(q===0){ -q=0; -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -var r=MapFindEntry(m,o,q,n); -if(r!==-1){ -var J=(3+(o)+((r)*3)); -(%_FixedArraySet(m,(J+1)|0,y)); -return this; -} -var z=((%_FixedArrayGet(m,(1)|0))); -var A=((%_FixedArrayGet(m,(2)|0))); -var B=o<<1; -if((z+A)>=B){ -%MapGrow(this); -m=%_JSCollectionGetTable(this); -o=((%_FixedArrayGet(m,(0)|0))); -z=((%_FixedArrayGet(m,(1)|0))); -A=((%_FixedArrayGet(m,(2)|0))); -} -r=z+A; -var C=(3+(o)+((r)*3)); -var p=(n&((o)-1)); -var D=((%_FixedArrayGet(m,(3+(p))|0))); -((%_FixedArraySet(m,(3+(p))|0,r))); -(((%_FixedArraySet(m,(1)|0,(z+1)|0)))); -(%_FixedArraySet(m,(C)|0,q)); -(%_FixedArraySet(m,(C+1)|0,y)); -(%_FixedArraySet(m,(C+2)|0,D)); -return this; -} -function MapHas(q){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.has',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -return MapFindEntry(m,o,q,n)!==-1; -} -function MapDelete(q){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.delete',this); -} -var m=%_JSCollectionGetTable(this); -var o=((%_FixedArrayGet(m,(0)|0))); -var n=GetHash(q); -var r=MapFindEntry(m,o,q,n); -if(r===-1)return false; -var z=((%_FixedArrayGet(m,(1)|0)))-1; -var A=((%_FixedArrayGet(m,(2)|0)))+1; -var C=(3+(o)+((r)*3)); -(%_FixedArraySet(m,(C)|0,%_TheHole())); -(%_FixedArraySet(m,(C+1)|0,%_TheHole())); -(((%_FixedArraySet(m,(1)|0,(z)|0)))); -(((%_FixedArraySet(m,(2)|0,(A)|0)))); -if(z<(o>>>1))%MapShrink(this); -return true; -} -function MapGetSize(){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.size',this); -} -var m=%_JSCollectionGetTable(this); -return((%_FixedArrayGet(m,(1)|0))); -} -function MapClearJS(){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.clear',this); -} -%_MapClear(this); -} -function MapForEach(E,F){ -if(!(%_ClassOf(this)==='Map')){ -throw %make_type_error(45, -'Map.prototype.forEach',this); -} -if(!(typeof(E)==='function'))throw %make_type_error(15,E); -var G=new h(this,3); -var H=[(void 0),(void 0)]; -while(%MapIteratorNext(G,H)){ -%_Call(E,F,H[1],H[0],this); -} -} -function MapSpecies(){ -return this; -} -%SetCode(c,MapConstructor); -%FunctionSetLength(c,0); -%FunctionSetPrototype(c,new d()); -%AddNamedProperty(c.prototype,"constructor",c,2); -%AddNamedProperty( -c.prototype,k,"Map",2|1); -%FunctionSetLength(MapForEach,1); -b.InstallGetter(c,j,MapSpecies); -b.InstallGetter(c.prototype,"size",MapGetSize); -b.InstallFunctions(c.prototype,2,[ -"get",MapGet, -"set",MapSet, -"has",MapHas, -"delete",MapDelete, -"clear",MapClearJS, -"forEach",MapForEach -]); -%InstallToContext([ -"map_get",MapGet, -"map_set",MapSet, -"map_has",MapHas, -"map_delete",MapDelete, -"set_add",SetAdd, -"set_has",SetHas, -"set_delete",SetDelete, -]); -b.Export(function(K){ -K.GetExistingHash=GetExistingHash; -K.GetHash=GetHash; -}); -}) - -{ -if(x===true)return; -x=true; -ResolvePromise(v,value); -}; -var z=reason=>{ -if(x===true)return; -x=true; -RejectPromise(v,reason,w); -}; -return{ -__proto__:null, -resolve:y, -reject:z -}; -} -var A=function Promise(B){ -if(B===m){ -return %_NewObject(A,new.target); -} -if((new.target===(void 0)))throw %make_type_error(66,this); -if(!(typeof(B)==='function')){ -throw %make_type_error(128,B); -} -var v=PromiseInit(%_NewObject(A,new.target)); -var C=CreateResolvingFunctions(v,true); -var D=(%_DebugIsActive()!=0); -try{ -if(D)%DebugPushPromise(v); -B(C.resolve,C.reject); -}%catch(e){ -%_Call(C.reject,(void 0),e); -}finally{ -if(D)%DebugPopPromise(); -} -return v; -} -function PromiseSet(v,E,F){ -(v[n]=E); -(v[o]=F); -(v[j]=(void 0)); -(v[i]=(void 0)); -(v[k]=(void 0)); -return v; -} -function PromiseCreateAndSet(E,F){ -var v=new A(m); -if((%_DebugIsActive()!=0))PromiseSet(v,kPending,(void 0)); -return PromiseSet(v,E,F); -} -function PromiseInit(v){ -return PromiseSet(v,kPending,(void 0)); -} -function FulfillPromise(v,E,F,G){ -if((v[n])===kPending){ -var H=(v[G]); -if(!(H===(void 0))){ -var I=(v[k]); -PromiseEnqueue(F,H,I,E); -} -PromiseSet(v,E,F); -} -} -function PromiseHandle(F,J,K){ -var D=(%_DebugIsActive()!=0); -try{ -if(D)%DebugPushPromise(K.promise); -var L=J(F); -K.resolve(L); -}%catch(exception){ -try{K.reject(exception);}catch(e){} -}finally{ -if(D)%DebugPopPromise(); -} -} -function PromiseEnqueue(F,H,I,E){ -var M,N,O=(%_DebugIsActive()!=0); -%EnqueueMicrotask(function(){ -if(O){ -%DebugAsyncTaskEvent({type:"willHandle",id:M,name:N}); -} -if((%_IsArray(H))){ -for(var P=0;P{ -if(!(L.resolve===(void 0))||!(L.reject===(void 0))) -throw %make_type_error(84); -L.resolve=y; -L.reject=z; -}); -if(!(typeof(L.resolve)==='function')||!(typeof(L.reject)==='function')) -throw %make_type_error(85); -return L; -} -function PromiseReject(X){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,PromiseResolve); -} -if(this===A){ -var v=PromiseCreateAndSet(kRejected,X); -%PromiseRejectEventFromStack(v,X); -return v; -}else{ -var ag=NewPromiseCapability(this,true); -%_Call(ag.reject,(void 0),X); -return ag.promise; -} -} -function PerformPromiseThen(v,Q,R,ah){ -if(!(typeof(Q)==='function'))Q=PromiseIdResolveHandler; -if(!(typeof(R)==='function'))R=PromiseIdRejectHandler; -var E=(v[n]); -switch(E){ -case kPending: -PromiseAttachCallbacks(v,ah,Q,R); -break; -case kFulfilled: -PromiseEnqueue((v[o]), -Q,ah,kFulfilled); -break; -case kRejected: -if(!(!(v[h]===(void 0)))){ -%PromiseRevokeReject(v); -} -PromiseEnqueue((v[o]), -R,ah,kRejected); -break; -} -(v[h]=true); -return ah.promise; -} -function PromiseThen(Q,R){ -var E=(this[n]); -if((E===(void 0))){ -throw %make_type_error(66,this); -} -var ai=p(this,A); -var ah=NewPromiseCapability(ai,false); -return PerformPromiseThen(this,Q,R,ah); -} -function PromiseCatch(R){ -return this.then((void 0),R); -} -function PromiseResolve(W){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,PromiseResolve); -} -if(IsPromise(W)&&W.constructor===this)return W; -if(this===A){ -var v=PromiseCreate(); -var aj=ResolvePromise(v,W); -return v; -} -var ag=NewPromiseCapability(this,true); -var aj=%_Call(ag.resolve,(void 0),W); -return ag.promise; -} -function PromiseAll(ak){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,"Promise.all"); -} -var K=NewPromiseCapability(this,false); -var al=new d(); -var am; -var O=(%_DebugIsActive()!=0); -if(O){ -(K.reject[g]=true); -} -function CreateResolveElementFunction(an,ao,ag){ -var ap=false; -return(W)=>{ -if(ap===true)return; -ap=true; -ao[an]=W; -if(--am===0){ -var aq=[]; -%MoveArrayContents(ao,aq); -%_Call(ag.resolve,(void 0),aq); -} -}; -} -try{ -var P=0; -am=1; -for(var F of ak){ -var ar=this.resolve(F); -++am; -var as=ar.then( -CreateResolveElementFunction(P,al,K), -K.reject); -if(O&&IsPromise(as)){ -(as[f]=K.promise); -} -++P; -} -if(--am===0){ -var aq=[]; -%MoveArrayContents(al,aq); -%_Call(K.resolve,(void 0),aq); -} -}catch(e){ -%_Call(K.reject,(void 0),e); -} -return K.promise; -} -function PromiseRace(ak){ -if(!(%_IsJSReceiver(this))){ -throw %make_type_error(16,PromiseRace); -} -var K=NewPromiseCapability(this,false); -var O=(%_DebugIsActive()!=0); -if(O){ -(K.reject[g]=true); -} -try{ -for(var F of ak){ -var as=this.resolve(F).then(K.resolve, -K.reject); -if(O&&IsPromise(as)){ -(as[f]=K.promise); -} -} -}catch(e){ -K.reject(e) -} -return K.promise; -} -function PromiseHasUserDefinedRejectHandlerCheck(J,K){ -if((J[g])){ -return PromiseHasUserDefinedRejectHandlerRecursive(K.promise); -} -return true; -} -function PromiseHasUserDefinedRejectHandlerRecursive(v){ -if((v[l]))return true; -var at=(v[f]); -if(at&& -PromiseHasUserDefinedRejectHandlerRecursive(at)){ -return true; -} -var au=(v[i]); -var I=(v[k]); -if((au===(void 0)))return false; -if(!(%_IsArray(au))){ -return PromiseHasUserDefinedRejectHandlerCheck(au,I); -} -for(var P=0;P>>0); -if(q>=s){ -(n[e]=(void 0)); -}else{ -(n[d]=q+1); -if(r==2){ -o=k[q]; -}else if(r==3){ -o=[q,k[q]]; -}else{ -o=q; -} -p=false; -} -} -return %_CreateIterResultObject(o,p); -} -function ArrayEntries(){ -return CreateArrayIterator(this,3); -} -function ArrayValues(){ -return CreateArrayIterator(this,2); -} -function ArrayKeys(){ -return CreateArrayIterator(this,1); -} -function TypedArrayEntries(){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -return %_Call(ArrayEntries,this); -} -function TypedArrayValues(){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -return %_Call(ArrayValues,this); -} -function TypedArrayKeys(){ -if(!(%_IsTypedArray(this)))throw %make_type_error(73); -return %_Call(ArrayKeys,this); -} -%FunctionSetPrototype(ArrayIterator,{__proto__:g}); -%FunctionSetInstanceClassName(ArrayIterator,'Array Iterator'); -b.InstallFunctions(ArrayIterator.prototype,2,[ -'next',ArrayIteratorNext -]); -b.SetFunctionName(ArrayIteratorIterator,h); -%AddNamedProperty(ArrayIterator.prototype,i, -"Array Iterator",1|2); -b.InstallFunctions(f.prototype,2,[ -'entries',ArrayEntries, -'keys',ArrayKeys -]); -b.SetFunctionName(ArrayValues,'values'); -%FunctionRemovePrototype(ArrayValues); -%SetNativeFlag(ArrayValues); -%AddNamedProperty(f.prototype,h,ArrayValues, -2); -b.InstallFunctions(j.prototype,2,[ -'entries',TypedArrayEntries, -'keys',TypedArrayKeys, -'values',TypedArrayValues -]); -%AddNamedProperty(j.prototype, -h,TypedArrayValues,2); -b.Export(function(t){ -t.ArrayValues=ArrayValues; -}); -%InstallToContext(["array_values_iterator",ArrayValues]); -}) - -$templates -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.Map; -var d=b.InternalArray; -var e=new c; -var f=c.prototype.get; -var g=c.prototype.set; -function SameCallSiteElements(h,i){ -var j=h.length; -var i=i.raw; -if(j!==i.length)return false; -for(var k=0;k%JSProxyRevoke(f)}; -} -b.InstallFunctions(c,2,[ -"revocable",ProxyCreateRevocable -]); -}) - -,async-await5 -(function(a,b,c){ -"use strict"; -%CheckIsBootstrapping(); -var d; -var e; -var f; -var g; -var h; -var i; -var j; -var k; -var l; -var m; -b.Import(function(n){ -d=n.AsyncFunctionNext; -e=n.AsyncFunctionThrow; -f=n.GlobalPromise; -g=n.IsPromise; -h=n.NewPromiseCapability; -i=n.PerformPromiseThen; -j=n.PromiseCreate; -k=n.PromiseNextMicrotaskID; -l=n.RejectPromise; -m=n.ResolvePromise; -}); -var o= -b.ImportNow("promise_async_stack_id_symbol"); -var p= -b.ImportNow("promise_handled_by_symbol"); -var q= -b.ImportNow("promise_forwarding_handler_symbol"); -var r= -b.ImportNow("promise_handled_hint_symbol"); -var s= -b.ImportNow("promise_has_handler_symbol"); -function PromiseCastResolved(t){ -if(g(t)){ -return t; -}else{ -var u=j(); -m(u,t); -return u; -} -} -function AsyncFunctionAwait(v,w,x){ -var u=PromiseCastResolved(w); -var y=sentValue=>{ -%_Call(d,v,sentValue); -return; -}; -var z=sentError=>{ -%_Call(e,v,sentError); -return; -} -var A=h(f,false); -(A.promise[s]=true); -if((%_DebugIsActive()!=0)){ -if(g(w)){ -(z[q]=true); -} -(A.promise[p]=x); -} -i(u,y,z,A); -} -function AsyncFunctionAwaitUncaught(v,w,x){ -AsyncFunctionAwait(v,w,x); -} -function AsyncFunctionAwaitCaught(v,w,x){ -if((%_DebugIsActive()!=0)&&g(w)){ -(w[r]=true); -} -AsyncFunctionAwait(v,w,x); -} -function RejectPromiseNoDebugEvent(u,B){ -return l(u,B,false); -} -function AsyncFunctionPromiseCreate(){ -var u=j(); -if((%_DebugIsActive()!=0)){ -%DebugPushPromise(u); -var C=k(); -(u[o]=C); -%DebugAsyncTaskEvent({ -type:"enqueueRecurring", -id:C, -name:"async function", -}); -} -return u; -} -function AsyncFunctionPromiseRelease(u){ -if((%_DebugIsActive()!=0)){ -var C=(u[o]); -%DebugAsyncTaskEvent({ -type:"cancel", -id:C, -name:"async function", -}); -%DebugPopPromise(); -} -} -%InstallToContext([ -"async_function_await_caught",AsyncFunctionAwaitCaught, -"async_function_await_uncaught",AsyncFunctionAwaitUncaught, -"reject_promise_no_debug_event",RejectPromiseNoDebugEvent, -"async_function_promise_create",AsyncFunctionPromiseCreate, -"async_function_promise_release",AsyncFunctionPromiseRelease, -]); -}) - -i18næ -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c; -var d; -var e=a.Date; -var f=a.Number; -var g=a.RegExp; -var h=a.String; -var i=b.InstallFunctions; -var j=b.InstallGetter; -var k=b.InternalArray; -var l; -var m -var n=b.ImportNow("ObjectHasOwnProperty"); -var o=b.OverrideFunction; -var p=b.ImportNow("intl_pattern_symbol"); -var q=b.ImportNow("intl_resolved_symbol"); -var r=b.SetFunctionName; -var s; -var t=h.prototype.substr; -var u=h.prototype.substring; -b.Import(function(v){ -c=v.ArrayJoin; -d=v.ArrayPush; -l=v.InternalRegExpMatch; -m=v.InternalRegExpReplace; -s=v.StringIndexOf; -}); -function InstallFunction(w,x,y){ -i(w,2,[x,y]); -} -function InstallConstructor(w,x,y){ -%CheckIsBootstrapping(); -r(y,x); -%AddNamedProperty(w,x,y,2); -%SetNativeFlag(y); -%ToFastProperties(w); -} -function AddBoundMethod(z,A,B,C,D){ -%CheckIsBootstrapping(); -var E=%CreatePrivateSymbol(A); -var F=(0,(function(){ -if(!%IsInitializedIntlObjectOfType(this,D)){ -throw %make_type_error(54,A); -} -if((this[E]===(void 0))){ -var G; -if((C===(void 0))||C===2){ -G=(0,((x,y)=>B(this,x,y))); -}else if(C===1){ -G=(0,(x=>B(this,x))); -}else{ -G=(0,((...args)=>{ -if(args.length>0){ -return B(this,args[0]); -}else{ -return B(this); -} -})); -} -%SetNativeFlag(G); -this[E]=G; -} -return this[E]; -})); -%FunctionRemovePrototype(F); -%DefineGetterPropertyUnchecked(z.prototype,A,F,2); -%SetNativeFlag(F); -} -var H={}; -%AddNamedProperty(a,"Intl",H,2); -var I={ -'collator':(void 0), -'numberformat':(void 0), -'dateformat':(void 0), -'breakiterator':(void 0) -}; -var J=(void 0); -function GetDefaultICULocaleJS(){ -if((J===(void 0))){ -J=%GetDefaultICULocale(); -} -return J; -} -var K=(void 0); -function GetUnicodeExtensionRE(){ -if(((void 0)===(void 0))){ -K=new g('-u(-[a-z0-9]{2,8})+','g'); -} -return K; -} -var L=(void 0); -function GetAnyExtensionRE(){ -if((L===(void 0))){ -L=new g('-[a-z0-9]{1}-.*','g'); -} -return L; -} -var M=(void 0); -function GetQuotedStringRE(){ -if((M===(void 0))){ -M=new g("'[^']+'",'g'); -} -return M; -} -var N=(void 0); -function GetServiceRE(){ -if((N===(void 0))){ -N= -new g('^(collator|numberformat|dateformat|breakiterator)$'); -} -return N; -} -var O=(void 0); -function GetLanguageTagRE(){ -if((O===(void 0))){ -BuildLanguageTagREs(); -} -return O; -} -var P=(void 0); -function GetLanguageVariantRE(){ -if((P===(void 0))){ -BuildLanguageTagREs(); -} -return P; -} -var Q=(void 0); -function GetLanguageSingletonRE(){ -if((Q===(void 0))){ -BuildLanguageTagREs(); -} -return Q; -} -var R=(void 0); -function GetTimezoneNameCheckRE(){ -if((R===(void 0))){ -R=new g( -'^([A-Za-z]+)/([A-Za-z_-]+)((?:\/[A-Za-z_-]+)+)*$'); -} -return R; -} -var S=(void 0); -function GetTimezoneNameLocationPartRE(){ -if((S===(void 0))){ -S= -new g('^([A-Za-z]+)((?:[_-][A-Za-z]+)+)*$'); -} -return S; -} -function supportedLocalesOf(T,U,V){ -if((l(GetServiceRE(),T)===null)){ -throw %make_error(7,T); -} -if((V===(void 0))){ -V={}; -}else{ -V=(%_ToObject(V)); -} -var W=V.localeMatcher; -if(!(W===(void 0))){ -W=(%_ToString(W)); -if(W!=='lookup'&&W!=='best fit'){ -throw %make_range_error(175,W); -} -}else{ -W='best fit'; -} -var X=initializeLocaleList(U); -if((I[T]===(void 0))){ -I[T]=getAvailableLocalesOf(T); -} -if(W==='best fit'){ -return initializeLocaleList(bestFitSupportedLocalesOf( -X,I[T])); -} -return initializeLocaleList(lookupSupportedLocalesOf( -X,I[T])); -} -function lookupSupportedLocalesOf(X,Y){ -var Z=new k(); -for(var aa=0;aa=3&&C<=8&&!(ao===(void 0))){ -if((ai===(void 0))){ -ai=ap; -}else{ -ai=ai+"-"+ap; -} -}else{ -return{}; -} -} -if(!(ao===(void 0))&&!(ao in an)){ -an[ao]=ai; -} -return an; -} -function setOptions(aq,an,ar,ae,as){ -var al=''; -var at=function updateExtension(ao,ai){ -return'-'+ao+'-'+(%_ToString(ai)); -} -var au=function updateProperty(af,D,ai){ -if(D==='boolean'&&(typeof ai==='string')){ -ai=(ai==='true')?true:false; -} -if(!(af===(void 0))){ -defineWEProperty(as,af,ai); -} -} -for(var ao in ar){ -if((%_Call(n,ar,ao))){ -var ai=(void 0); -var av=ar[ao]; -if(!(av.property===(void 0))){ -ai=ae(av.property,av.type,av.values); -} -if(!(ai===(void 0))){ -au(av.property,av.type,ai); -al+=at(ao,ai); -continue; -} -if((%_Call(n,an,ao))){ -ai=an[ao]; -if(!(ai===(void 0))){ -au(av.property,av.type,ai); -al+=at(ao,ai); -}else if(av.type==='boolean'){ -au(av.property,av.type,true); -al+=at(ao,true); -} -} -} -} -return al===''?'':'-u'+al; -} -function freezeArray(aw){ -var ax=[]; -var ay=aw.length; -for(var aa=0;aabw){ -throw %make_range_error(178,af); -} -return %math_floor(ai); -} -return bx; -} -var by={ -get(){ -%IncrementUseCounter(15); -return this[p]; -}, -set(ai){ -this[p]=ai; -} -}; -function initializeNumberFormat(bz,U,V){ -if(%IsInitializedIntlObject(bz)){ -throw %make_type_error(126,"NumberFormat"); -} -if((V===(void 0))){ -V={}; -} -var ae=getGetOption(V,'numberformat'); -var ab=resolveLocale('numberformat',U,V); -var bk={}; -defineWEProperty(bk,'style',ae( -'style','string',['decimal','percent','currency'],'decimal')); -var bu=ae('currency','string'); -if(!(bu===(void 0))&&!isWellFormedCurrencyCode(bu)){ -throw %make_range_error(159,bu); -} -if(bk.style==='currency'&&(bu===(void 0))){ -throw %make_type_error(29); -} -var bA=ae( -'currencyDisplay','string',['code','symbol','name'],'symbol'); -if(bk.style==='currency'){ -defineWEProperty(bk,'currency',%StringToUpperCase(bu)); -defineWEProperty(bk,'currencyDisplay',bA); -} -var bB=getNumberOption(V,'minimumIntegerDigits',1,21,1); -defineWEProperty(bk,'minimumIntegerDigits',bB); -var bC=V['minimumFractionDigits']; -var bD=V['maximumFractionDigits']; -if(!(bC===(void 0))||bk.style!=='currency'){ -bC=getNumberOption(V,'minimumFractionDigits',0,20,0); -defineWEProperty(bk,'minimumFractionDigits',bC); -} -if(!(bD===(void 0))||bk.style!=='currency'){ -var bE=bk.style==='percent'?0:3; -bC=(bC===(void 0))?0:bC; -var bF=(bC>bE)?bC:bE; -bD=getNumberOption(V,'maximumFractionDigits',bC,20,bF); -defineWEProperty(bk,'maximumFractionDigits',bD); -} -var bG=V['minimumSignificantDigits']; -var bH=V['maximumSignificantDigits']; -if(!(bG===(void 0))||!(bH===(void 0))){ -bG=getNumberOption(V,'minimumSignificantDigits',1,21,0); -defineWEProperty(bk,'minimumSignificantDigits',bG); -bH=getNumberOption(V,'maximumSignificantDigits',bG,21,21); -defineWEProperty(bk,'maximumSignificantDigits',bH); -} -defineWEProperty(bk,'useGrouping',ae( -'useGrouping','boolean',(void 0),true)); -var an=parseExtension(ab.extension); -var bI={ -'nu':{'property':(void 0),'type':'string'} -}; -var al=setOptions(V,an,bI, -ae,bk); -var bp=ab.locale+al; -var aj=%object_define_properties({},{ -currency:{writable:true}, -currencyDisplay:{writable:true}, -locale:{writable:true}, -maximumFractionDigits:{writable:true}, -minimumFractionDigits:{writable:true}, -minimumIntegerDigits:{writable:true}, -numberingSystem:{writable:true}, -requestedLocale:{value:bp,writable:true}, -style:{value:bk.style,writable:true}, -useGrouping:{writable:true} -}); -if((%_Call(n,bk,'minimumSignificantDigits'))){ -defineWEProperty(aj,'minimumSignificantDigits',(void 0)); -} -if((%_Call(n,bk,'maximumSignificantDigits'))){ -defineWEProperty(aj,'maximumSignificantDigits',(void 0)); -} -var bJ=%CreateNumberFormat(bp, -bk, -aj); -if(bk.style==='currency'){ -%object_define_property(aj,'currencyDisplay', -{value:bA,writable:true}); -} -%MarkAsInitializedIntlObjectOfType(bz,'numberformat',bJ); -bz[q]=aj; -return bz; -} -InstallConstructor(H,'NumberFormat',function(){ -var U=arguments[0]; -var V=arguments[1]; -if(!this||this===H){ -return new H.NumberFormat(U,V); -} -return initializeNumberFormat((%_ToObject(this)),U,V); -} -); -InstallFunction(H.NumberFormat.prototype,'resolvedOptions',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if(!%IsInitializedIntlObjectOfType(this,'numberformat')){ -throw %make_type_error(127,"NumberFormat"); -} -var bK=this; -var ab=getOptimalLanguageTag(bK[q].requestedLocale, -bK[q].locale); -var aG={ -locale:ab, -numberingSystem:bK[q].numberingSystem, -style:bK[q].style, -useGrouping:bK[q].useGrouping, -minimumIntegerDigits:bK[q].minimumIntegerDigits, -minimumFractionDigits:bK[q].minimumFractionDigits, -maximumFractionDigits:bK[q].maximumFractionDigits, -}; -if(aG.style==='currency'){ -defineWECProperty(aG,'currency',bK[q].currency); -defineWECProperty(aG,'currencyDisplay', -bK[q].currencyDisplay); -} -if((%_Call(n,bK[q],'minimumSignificantDigits'))){ -defineWECProperty(aG,'minimumSignificantDigits', -bK[q].minimumSignificantDigits); -} -if((%_Call(n,bK[q],'maximumSignificantDigits'))){ -defineWECProperty(aG,'maximumSignificantDigits', -bK[q].maximumSignificantDigits); -} -return aG; -} -); -InstallFunction(H.NumberFormat,'supportedLocalesOf',function(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -return supportedLocalesOf('numberformat',U,arguments[1]); -} -); -function formatNumber(bJ,ai){ -var bL=(%_ToNumber(ai))+0; -return %InternalNumberFormat(%GetImplFromInitializedIntlObject(bJ), -bL); -} -AddBoundMethod(H.NumberFormat,'format',formatNumber,1,'numberformat'); -function toLDMLString(V){ -var ae=getGetOption(V,'dateformat'); -var bM=''; -var bN=ae('weekday','string',['narrow','short','long']); -bM+=appendToLDMLString( -bN,{narrow:'EEEEE',short:'EEE',long:'EEEE'}); -bN=ae('era','string',['narrow','short','long']); -bM+=appendToLDMLString( -bN,{narrow:'GGGGG',short:'GGG',long:'GGGG'}); -bN=ae('year','string',['2-digit','numeric']); -bM+=appendToLDMLString(bN,{'2-digit':'yy','numeric':'y'}); -bN=ae('month','string', -['2-digit','numeric','narrow','short','long']); -bM+=appendToLDMLString(bN,{'2-digit':'MM','numeric':'M', -'narrow':'MMMMM','short':'MMM','long':'MMMM'}); -bN=ae('day','string',['2-digit','numeric']); -bM+=appendToLDMLString( -bN,{'2-digit':'dd','numeric':'d'}); -var bO=ae('hour12','boolean'); -bN=ae('hour','string',['2-digit','numeric']); -if((bO===(void 0))){ -bM+=appendToLDMLString(bN,{'2-digit':'jj','numeric':'j'}); -}else if(bO===true){ -bM+=appendToLDMLString(bN,{'2-digit':'hh','numeric':'h'}); -}else{ -bM+=appendToLDMLString(bN,{'2-digit':'HH','numeric':'H'}); -} -bN=ae('minute','string',['2-digit','numeric']); -bM+=appendToLDMLString(bN,{'2-digit':'mm','numeric':'m'}); -bN=ae('second','string',['2-digit','numeric']); -bM+=appendToLDMLString(bN,{'2-digit':'ss','numeric':'s'}); -bN=ae('timeZoneName','string',['short','long']); -bM+=appendToLDMLString(bN,{short:'z',long:'zzzz'}); -return bM; -} -function appendToLDMLString(bN,bP){ -if(!(bN===(void 0))){ -return bP[bN]; -}else{ -return''; -} -} -function fromLDMLString(bM){ -bM=m(GetQuotedStringRE(),bM,''); -var V={}; -var aF=l(/E{3,5}/,bM); -V=appendToDateTimeObject( -V,'weekday',aF,{EEEEE:'narrow',EEE:'short',EEEE:'long'}); -aF=l(/G{3,5}/,bM); -V=appendToDateTimeObject( -V,'era',aF,{GGGGG:'narrow',GGG:'short',GGGG:'long'}); -aF=l(/y{1,2}/,bM); -V=appendToDateTimeObject( -V,'year',aF,{y:'numeric',yy:'2-digit'}); -aF=l(/M{1,5}/,bM); -V=appendToDateTimeObject(V,'month',aF,{MM:'2-digit', -M:'numeric',MMMMM:'narrow',MMM:'short',MMMM:'long'}); -aF=l(/L{1,5}/,bM); -V=appendToDateTimeObject(V,'month',aF,{LL:'2-digit', -L:'numeric',LLLLL:'narrow',LLL:'short',LLLL:'long'}); -aF=l(/d{1,2}/,bM); -V=appendToDateTimeObject( -V,'day',aF,{d:'numeric',dd:'2-digit'}); -aF=l(/h{1,2}/,bM); -if(aF!==null){ -V['hour12']=true; -} -V=appendToDateTimeObject( -V,'hour',aF,{h:'numeric',hh:'2-digit'}); -aF=l(/H{1,2}/,bM); -if(aF!==null){ -V['hour12']=false; -} -V=appendToDateTimeObject( -V,'hour',aF,{H:'numeric',HH:'2-digit'}); -aF=l(/m{1,2}/,bM); -V=appendToDateTimeObject( -V,'minute',aF,{m:'numeric',mm:'2-digit'}); -aF=l(/s{1,2}/,bM); -V=appendToDateTimeObject( -V,'second',aF,{s:'numeric',ss:'2-digit'}); -aF=l(/z|zzzz/,bM); -V=appendToDateTimeObject( -V,'timeZoneName',aF,{z:'short',zzzz:'long'}); -return V; -} -function appendToDateTimeObject(V,bN,aF,bP){ -if((aF===null)){ -if(!(%_Call(n,V,bN))){ -defineWEProperty(V,bN,(void 0)); -} -return V; -} -var af=aF[0]; -defineWEProperty(V,bN,bP[af]); -return V; -} -function toDateTimeOptions(V,bQ,bR){ -if((V===(void 0))){ -V={}; -}else{ -V=(%_ToObject(V)); -} -var bS=true; -if((bQ==='date'||bQ==='any')&& -(!(V.weekday===(void 0))||!(V.year===(void 0))|| -!(V.month===(void 0))||!(V.day===(void 0)))){ -bS=false; -} -if((bQ==='time'||bQ==='any')&& -(!(V.hour===(void 0))||!(V.minute===(void 0))|| -!(V.second===(void 0)))){ -bS=false; -} -if(bS&&(bR==='date'||bR==='all')){ -%object_define_property(V,'year',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'month',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'day',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -} -if(bS&&(bR==='time'||bR==='all')){ -%object_define_property(V,'hour',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'minute',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -%object_define_property(V,'second',{value:'numeric', -writable:true, -enumerable:true, -configurable:true}); -} -return V; -} -function initializeDateTimeFormat(bT,U,V){ -if(%IsInitializedIntlObject(bT)){ -throw %make_type_error(126,"DateTimeFormat"); -} -if((V===(void 0))){ -V={}; -} -var ab=resolveLocale('dateformat',U,V); -V=toDateTimeOptions(V,'any','date'); -var ae=getGetOption(V,'dateformat'); -var W=ae('formatMatcher','string', -['basic','best fit'],'best fit'); -var bM=toLDMLString(V); -var bU=canonicalizeTimeZoneID(V.timeZone); -var bk={}; -var an=parseExtension(ab.extension); -var bV={ -'ca':{'property':(void 0),'type':'string'}, -'nu':{'property':(void 0),'type':'string'} -}; -var al=setOptions(V,an,bV, -ae,bk); -var bp=ab.locale+al; -var aj=%object_define_properties({},{ -calendar:{writable:true}, -day:{writable:true}, -era:{writable:true}, -hour12:{writable:true}, -hour:{writable:true}, -locale:{writable:true}, -minute:{writable:true}, -month:{writable:true}, -numberingSystem:{writable:true}, -[p]:{writable:true}, -requestedLocale:{value:bp,writable:true}, -second:{writable:true}, -timeZone:{writable:true}, -timeZoneName:{writable:true}, -tz:{value:bU,writable:true}, -weekday:{writable:true}, -year:{writable:true} -}); -var bJ=%CreateDateTimeFormat( -bp,{skeleton:bM,timeZone:bU},aj); -if(aj.timeZone==="Etc/Unknown"){ -throw %make_range_error(184,bU); -} -%MarkAsInitializedIntlObjectOfType(bT,'dateformat',bJ); -bT[q]=aj; -return bT; -} -InstallConstructor(H,'DateTimeFormat',function(){ -var U=arguments[0]; -var V=arguments[1]; -if(!this||this===H){ -return new H.DateTimeFormat(U,V); -} -return initializeDateTimeFormat((%_ToObject(this)),U,V); -} -); -InstallFunction(H.DateTimeFormat.prototype,'resolvedOptions',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if(!%IsInitializedIntlObjectOfType(this,'dateformat')){ -throw %make_type_error(127,"DateTimeFormat"); -} -var bW={ -'gregorian':'gregory', -'ethiopic-amete-alem':'ethioaa' -}; -var bK=this; -var bX=fromLDMLString(bK[q][p]); -var bY=bW[bK[q].calendar]; -if((bY===(void 0))){ -bY=bK[q].calendar; -} -var ab=getOptimalLanguageTag(bK[q].requestedLocale, -bK[q].locale); -var aG={ -locale:ab, -numberingSystem:bK[q].numberingSystem, -calendar:bY, -timeZone:bK[q].timeZone -}; -addWECPropertyIfDefined(aG,'timeZoneName',bX.timeZoneName); -addWECPropertyIfDefined(aG,'era',bX.era); -addWECPropertyIfDefined(aG,'year',bX.year); -addWECPropertyIfDefined(aG,'month',bX.month); -addWECPropertyIfDefined(aG,'day',bX.day); -addWECPropertyIfDefined(aG,'weekday',bX.weekday); -addWECPropertyIfDefined(aG,'hour12',bX.hour12); -addWECPropertyIfDefined(aG,'hour',bX.hour); -addWECPropertyIfDefined(aG,'minute',bX.minute); -addWECPropertyIfDefined(aG,'second',bX.second); -return aG; -} -); -InstallFunction(H.DateTimeFormat,'supportedLocalesOf',function(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -return supportedLocalesOf('dateformat',U,arguments[1]); -} -); -function formatDate(bJ,bZ){ -var ca; -if((bZ===(void 0))){ -ca=%DateCurrentTime(); -}else{ -ca=(%_ToNumber(bZ)); -} -if(!(%_IsSmi(%IS_VAR(ca))||((ca==ca)&&(ca!=1/0)&&(ca!=-1/0))))throw %make_range_error(150); -return %InternalDateFormat(%GetImplFromInitializedIntlObject(bJ), -new e(ca)); -} -function FormatDateToParts(bZ){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"Intl.DateTimeFormat.prototype.formatToParts"); -if(!(typeof(this)==='object')){ -throw %make_type_error(16,this); -} -var ca; -if((bZ===(void 0))){ -ca=%DateCurrentTime(); -}else{ -ca=(%_ToNumber(bZ)); -} -if(!(%_IsSmi(%IS_VAR(ca))||((ca==ca)&&(ca!=1/0)&&(ca!=-1/0))))throw %make_range_error(150); -return %InternalDateFormatToParts( -%GetImplFromInitializedIntlObject(this),new e(ca)); -} -%FunctionSetLength(FormatDateToParts,0); -AddBoundMethod(H.DateTimeFormat,'format',formatDate,0,'dateformat'); -function canonicalizeTimeZoneID(cb){ -if((cb===(void 0))){ -return cb; -} -cb=(%_ToString(cb)); -var cc=%StringToUpperCase(cb); -if(cc==='UTC'||cc==='GMT'|| -cc==='ETC/UTC'||cc==='ETC/GMT'){ -return'UTC'; -} -var aF=l(GetTimezoneNameCheckRE(),cb); -if((aF===null))throw %make_range_error(151,cb); -var aG=toTitleCaseTimezoneLocation(aF[1])+'/'+ -toTitleCaseTimezoneLocation(aF[2]); -if(!(aF[3]===(void 0))&&30?U[0]:GetDefaultICULocaleJS(); -} -var ac=%_Call(s,bf,'-'); -if(ac!=-1){ -bf=%_Call(u,bf,0,ac); -} -var cp=['az','el','lt','tr']; -var cq=%ArrayIndexOf(cp,bf,0); -if(cq==-1){ -return co?%StringToUpperCaseI18N(cn):%StringToLowerCaseI18N(cn); -} -return %StringLocaleConvertCase(cn,co, -cp[cq]); -} -o(h.prototype,'localeCompare',function(cr){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((this==null)){ -throw %make_type_error(55); -} -var U=arguments[1]; -var V=arguments[2]; -var bj=cachedOrNewService('collator',U,V); -return compare(bj,this,cr); -} -); -o(h.prototype,'normalize',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.normalize"); -var cn=(%_ToString(this)); -var cs=arguments[0]; -var ct=(cs===(void 0))?'NFC':(%_ToString(cs)); -var cu=['NFC','NFD','NFKC','NFKD']; -var cv=%ArrayIndexOf(cu,ct,0); -if(cv===-1){ -throw %make_range_error(176, -%_Call(c,cu,', ')); -} -return %StringNormalize(cn,cv); -} -); -function ToLowerCaseI18N(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLowerCase"); -var cn=(%_ToString(this)); -return %StringToLowerCaseI18N(cn); -} -function ToUpperCaseI18N(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toUpperCase"); -var cn=(%_ToString(this)); -return %StringToUpperCaseI18N(cn); -} -function ToLocaleLowerCaseI18N(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleLowerCase"); -return LocaleConvertCase((%_ToString(this)),U,false); -} -%FunctionSetLength(ToLocaleLowerCaseI18N,0); -function ToLocaleUpperCaseI18N(U){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.toLocaleUpperCase"); -return LocaleConvertCase((%_ToString(this)),U,true); -} -%FunctionSetLength(ToLocaleUpperCaseI18N,0); -%FunctionRemovePrototype(ToLowerCaseI18N); -%FunctionRemovePrototype(ToUpperCaseI18N); -%FunctionRemovePrototype(ToLocaleLowerCaseI18N); -%FunctionRemovePrototype(ToLocaleUpperCaseI18N); -b.Export(function(cw){ -cw.ToLowerCaseI18N=ToLowerCaseI18N; -cw.ToUpperCaseI18N=ToUpperCaseI18N; -cw.ToLocaleLowerCaseI18N=ToLocaleLowerCaseI18N; -cw.ToLocaleUpperCaseI18N=ToLocaleUpperCaseI18N; -}); -o(f.prototype,'toLocaleString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -if(!(this instanceof f)&&typeof(this)!=='number'){ -throw %make_type_error(56,"Number"); -} -var U=arguments[0]; -var V=arguments[1]; -var bz=cachedOrNewService('numberformat',U,V); -return formatNumber(bz,this); -} -); -function toLocaleDateTime(cx,U,V,bQ,bR,T){ -if(!(cx instanceof e)){ -throw %make_type_error(56,"Date"); -} -var bZ=(%_ToNumber(cx)); -if((!%_IsSmi(%IS_VAR(bZ))&&!(bZ==bZ)))return'Invalid Date'; -var bk=toDateTimeOptions(V,bQ,bR); -var bT= -cachedOrNewService(T,U,V,bk); -return formatDate(bT,cx); -} -o(e.prototype,'toLocaleString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -var U=arguments[0]; -var V=arguments[1]; -return toLocaleDateTime( -this,U,V,'any','all','dateformatall'); -} -); -o(e.prototype,'toLocaleDateString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -var U=arguments[0]; -var V=arguments[1]; -return toLocaleDateTime( -this,U,V,'date','date','dateformatdate'); -} -); -o(e.prototype,'toLocaleTimeString',function(){ -if(!(new.target===(void 0))){ -throw %make_type_error(82); -} -var U=arguments[0]; -var V=arguments[1]; -return toLocaleDateTime( -this,U,V,'time','time','dateformattime'); -} -); -%FunctionRemovePrototype(FormatDateToParts); -b.Export(function(cw){ -cw.FormatDateToParts=FormatDateToParts; -}); -}) - -=i){ -throw %make_range_error(156); -} -return k; -} -function AtomicsCompareExchangeJS(l,h,m,n){ -CheckSharedIntegerTypedArray(l); -h=ValidateIndex(h,%_TypedArrayGetLength(l)); -m=(%_ToNumber(m)); -n=(%_ToNumber(n)); -return %_AtomicsCompareExchange(l,h,m,n); -} -function AtomicsAddJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsAdd(g,h,o); -} -function AtomicsSubJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsSub(g,h,o); -} -function AtomicsAndJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsAnd(g,h,o); -} -function AtomicsOrJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsOr(g,h,o); -} -function AtomicsXorJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsXor(g,h,o); -} -function AtomicsExchangeJS(g,h,o){ -CheckSharedIntegerTypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -o=(%_ToNumber(o)); -return %_AtomicsExchange(g,h,o); -} -function AtomicsIsLockFreeJS(p){ -return %_AtomicsIsLockFree(p); -} -function AtomicsWaitJS(g,h,o,q){ -CheckSharedInteger32TypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -if((q===(void 0))){ -q=(1/0); -}else{ -q=(%_ToNumber(q)); -if((!%_IsSmi(%IS_VAR(q))&&!(q==q))){ -q=(1/0); -}else{ -q=d(0,q); -} -} -return %AtomicsWait(g,h,o,q); -} -function AtomicsWakeJS(g,h,r){ -CheckSharedInteger32TypedArray(g); -h=ValidateIndex(h,%_TypedArrayGetLength(g)); -r=d(0,(%_ToInteger(r))); -return %AtomicsWake(g,h,r); -} -var s=a.Atomics; -%AddNamedProperty(s,e,"Atomics",1|2); -b.InstallFunctions(s,2,[ -"compareExchange",AtomicsCompareExchangeJS, -"add",AtomicsAddJS, -"sub",AtomicsSubJS, -"and",AtomicsAndJS, -"or",AtomicsOrJS, -"xor",AtomicsXorJS, -"exchange",AtomicsExchangeJS, -"isLockFree",AtomicsIsLockFreeJS, -"wait",AtomicsWaitJS, -"wake",AtomicsWakeJS, -]); -}) - -0harmony-simdŽ´ -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.SIMD; -var d=b.ImportNow("to_string_tag_symbol"); -var e=c.Float32x4; - - -var f=c.Int32x4; - -var g=c.Int16x8; - -var h=c.Int8x16; - - -var i=c.Uint32x4; - -var j=c.Uint16x8; - -var k=c.Uint8x16; - - -var l=c.Bool32x4; - -var m=c.Bool16x8; - -var n=c.Bool8x16; - - - -function Float32x4CheckJS(o){ -return %Float32x4Check(o); -} -function Float32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='float32x4'){ -throw %make_type_error(45, -"Float32x4.prototype.toString",this); -} -var q="SIMD.Float32x4("; -q+=%Float32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Float32x4ExtractLane(p,r); -} -return q+")"; -} -function Float32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='float32x4'){ -throw %make_type_error(45, -"Float32x4.prototype.toLocaleString",this); -} -var q="SIMD.Float32x4("; -q+=%Float32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Float32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Float32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='float32x4'){ -throw %make_type_error(45, -"Float32x4.prototype.valueOf",this); -} -return p; -} -function Float32x4ExtractLaneJS(s,t){ -return %Float32x4ExtractLane(s,t); -} - - -function Int32x4CheckJS(o){ -return %Int32x4Check(o); -} -function Int32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int32x4'){ -throw %make_type_error(45, -"Int32x4.prototype.toString",this); -} -var q="SIMD.Int32x4("; -q+=%Int32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Int32x4ExtractLane(p,r); -} -return q+")"; -} -function Int32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int32x4'){ -throw %make_type_error(45, -"Int32x4.prototype.toLocaleString",this); -} -var q="SIMD.Int32x4("; -q+=%Int32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Int32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Int32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='int32x4'){ -throw %make_type_error(45, -"Int32x4.prototype.valueOf",this); -} -return p; -} -function Int32x4ExtractLaneJS(s,t){ -return %Int32x4ExtractLane(s,t); -} - -function Int16x8CheckJS(o){ -return %Int16x8Check(o); -} -function Int16x8ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int16x8'){ -throw %make_type_error(45, -"Int16x8.prototype.toString",this); -} -var q="SIMD.Int16x8("; -q+=%Int16x8ExtractLane(p,0); -for(var r=1;r<8;r++){ -q+=", "+%Int16x8ExtractLane(p,r); -} -return q+")"; -} -function Int16x8ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int16x8'){ -throw %make_type_error(45, -"Int16x8.prototype.toLocaleString",this); -} -var q="SIMD.Int16x8("; -q+=%Int16x8ExtractLane(p,0).toLocaleString(); -for(var r=1;r<8;r++){ -q+=", "+%Int16x8ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Int16x8ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='int16x8'){ -throw %make_type_error(45, -"Int16x8.prototype.valueOf",this); -} -return p; -} -function Int16x8ExtractLaneJS(s,t){ -return %Int16x8ExtractLane(s,t); -} - -function Int8x16CheckJS(o){ -return %Int8x16Check(o); -} -function Int8x16ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int8x16'){ -throw %make_type_error(45, -"Int8x16.prototype.toString",this); -} -var q="SIMD.Int8x16("; -q+=%Int8x16ExtractLane(p,0); -for(var r=1;r<16;r++){ -q+=", "+%Int8x16ExtractLane(p,r); -} -return q+")"; -} -function Int8x16ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='int8x16'){ -throw %make_type_error(45, -"Int8x16.prototype.toLocaleString",this); -} -var q="SIMD.Int8x16("; -q+=%Int8x16ExtractLane(p,0).toLocaleString(); -for(var r=1;r<16;r++){ -q+=", "+%Int8x16ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Int8x16ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='int8x16'){ -throw %make_type_error(45, -"Int8x16.prototype.valueOf",this); -} -return p; -} -function Int8x16ExtractLaneJS(s,t){ -return %Int8x16ExtractLane(s,t); -} - - -function Uint32x4CheckJS(o){ -return %Uint32x4Check(o); -} -function Uint32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint32x4'){ -throw %make_type_error(45, -"Uint32x4.prototype.toString",this); -} -var q="SIMD.Uint32x4("; -q+=%Uint32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Uint32x4ExtractLane(p,r); -} -return q+")"; -} -function Uint32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint32x4'){ -throw %make_type_error(45, -"Uint32x4.prototype.toLocaleString",this); -} -var q="SIMD.Uint32x4("; -q+=%Uint32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Uint32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Uint32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint32x4'){ -throw %make_type_error(45, -"Uint32x4.prototype.valueOf",this); -} -return p; -} -function Uint32x4ExtractLaneJS(s,t){ -return %Uint32x4ExtractLane(s,t); -} - -function Uint16x8CheckJS(o){ -return %Uint16x8Check(o); -} -function Uint16x8ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint16x8'){ -throw %make_type_error(45, -"Uint16x8.prototype.toString",this); -} -var q="SIMD.Uint16x8("; -q+=%Uint16x8ExtractLane(p,0); -for(var r=1;r<8;r++){ -q+=", "+%Uint16x8ExtractLane(p,r); -} -return q+")"; -} -function Uint16x8ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint16x8'){ -throw %make_type_error(45, -"Uint16x8.prototype.toLocaleString",this); -} -var q="SIMD.Uint16x8("; -q+=%Uint16x8ExtractLane(p,0).toLocaleString(); -for(var r=1;r<8;r++){ -q+=", "+%Uint16x8ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Uint16x8ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint16x8'){ -throw %make_type_error(45, -"Uint16x8.prototype.valueOf",this); -} -return p; -} -function Uint16x8ExtractLaneJS(s,t){ -return %Uint16x8ExtractLane(s,t); -} - -function Uint8x16CheckJS(o){ -return %Uint8x16Check(o); -} -function Uint8x16ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint8x16'){ -throw %make_type_error(45, -"Uint8x16.prototype.toString",this); -} -var q="SIMD.Uint8x16("; -q+=%Uint8x16ExtractLane(p,0); -for(var r=1;r<16;r++){ -q+=", "+%Uint8x16ExtractLane(p,r); -} -return q+")"; -} -function Uint8x16ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint8x16'){ -throw %make_type_error(45, -"Uint8x16.prototype.toLocaleString",this); -} -var q="SIMD.Uint8x16("; -q+=%Uint8x16ExtractLane(p,0).toLocaleString(); -for(var r=1;r<16;r++){ -q+=", "+%Uint8x16ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Uint8x16ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='uint8x16'){ -throw %make_type_error(45, -"Uint8x16.prototype.valueOf",this); -} -return p; -} -function Uint8x16ExtractLaneJS(s,t){ -return %Uint8x16ExtractLane(s,t); -} - - -function Bool32x4CheckJS(o){ -return %Bool32x4Check(o); -} -function Bool32x4ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool32x4'){ -throw %make_type_error(45, -"Bool32x4.prototype.toString",this); -} -var q="SIMD.Bool32x4("; -q+=%Bool32x4ExtractLane(p,0); -for(var r=1;r<4;r++){ -q+=", "+%Bool32x4ExtractLane(p,r); -} -return q+")"; -} -function Bool32x4ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool32x4'){ -throw %make_type_error(45, -"Bool32x4.prototype.toLocaleString",this); -} -var q="SIMD.Bool32x4("; -q+=%Bool32x4ExtractLane(p,0).toLocaleString(); -for(var r=1;r<4;r++){ -q+=", "+%Bool32x4ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Bool32x4ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool32x4'){ -throw %make_type_error(45, -"Bool32x4.prototype.valueOf",this); -} -return p; -} -function Bool32x4ExtractLaneJS(s,t){ -return %Bool32x4ExtractLane(s,t); -} - -function Bool16x8CheckJS(o){ -return %Bool16x8Check(o); -} -function Bool16x8ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool16x8'){ -throw %make_type_error(45, -"Bool16x8.prototype.toString",this); -} -var q="SIMD.Bool16x8("; -q+=%Bool16x8ExtractLane(p,0); -for(var r=1;r<8;r++){ -q+=", "+%Bool16x8ExtractLane(p,r); -} -return q+")"; -} -function Bool16x8ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool16x8'){ -throw %make_type_error(45, -"Bool16x8.prototype.toLocaleString",this); -} -var q="SIMD.Bool16x8("; -q+=%Bool16x8ExtractLane(p,0).toLocaleString(); -for(var r=1;r<8;r++){ -q+=", "+%Bool16x8ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Bool16x8ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool16x8'){ -throw %make_type_error(45, -"Bool16x8.prototype.valueOf",this); -} -return p; -} -function Bool16x8ExtractLaneJS(s,t){ -return %Bool16x8ExtractLane(s,t); -} - -function Bool8x16CheckJS(o){ -return %Bool8x16Check(o); -} -function Bool8x16ToString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool8x16'){ -throw %make_type_error(45, -"Bool8x16.prototype.toString",this); -} -var q="SIMD.Bool8x16("; -q+=%Bool8x16ExtractLane(p,0); -for(var r=1;r<16;r++){ -q+=", "+%Bool8x16ExtractLane(p,r); -} -return q+")"; -} -function Bool8x16ToLocaleString(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool8x16'){ -throw %make_type_error(45, -"Bool8x16.prototype.toLocaleString",this); -} -var q="SIMD.Bool8x16("; -q+=%Bool8x16ExtractLane(p,0).toLocaleString(); -for(var r=1;r<16;r++){ -q+=", "+%Bool8x16ExtractLane(p,r).toLocaleString(); -} -return q+")"; -} -function Bool8x16ValueOf(){ -var p=%ValueOf(this); -if(typeof(p)!=='bool8x16'){ -throw %make_type_error(45, -"Bool8x16.prototype.valueOf",this); -} -return p; -} -function Bool8x16ExtractLaneJS(s,t){ -return %Bool8x16ExtractLane(s,t); -} - - - -function Int32x4ShiftLeftByScalarJS(s,u){ -return %Int32x4ShiftLeftByScalar(s,u); -} -function Int32x4ShiftRightByScalarJS(s,u){ -return %Int32x4ShiftRightByScalar(s,u); -} - -function Int16x8ShiftLeftByScalarJS(s,u){ -return %Int16x8ShiftLeftByScalar(s,u); -} -function Int16x8ShiftRightByScalarJS(s,u){ -return %Int16x8ShiftRightByScalar(s,u); -} - -function Int8x16ShiftLeftByScalarJS(s,u){ -return %Int8x16ShiftLeftByScalar(s,u); -} -function Int8x16ShiftRightByScalarJS(s,u){ -return %Int8x16ShiftRightByScalar(s,u); -} - - -function Uint32x4ShiftLeftByScalarJS(s,u){ -return %Uint32x4ShiftLeftByScalar(s,u); -} -function Uint32x4ShiftRightByScalarJS(s,u){ -return %Uint32x4ShiftRightByScalar(s,u); -} - -function Uint16x8ShiftLeftByScalarJS(s,u){ -return %Uint16x8ShiftLeftByScalar(s,u); -} -function Uint16x8ShiftRightByScalarJS(s,u){ -return %Uint16x8ShiftRightByScalar(s,u); -} - -function Uint8x16ShiftLeftByScalarJS(s,u){ -return %Uint8x16ShiftLeftByScalar(s,u); -} -function Uint8x16ShiftRightByScalarJS(s,u){ -return %Uint8x16ShiftRightByScalar(s,u); -} - - -function Int16x8AddSaturateJS(o,v){ -return %Int16x8AddSaturate(o,v); -} -function Int16x8SubSaturateJS(o,v){ -return %Int16x8SubSaturate(o,v); -} - -function Int8x16AddSaturateJS(o,v){ -return %Int8x16AddSaturate(o,v); -} -function Int8x16SubSaturateJS(o,v){ -return %Int8x16SubSaturate(o,v); -} - -function Uint8x16AddSaturateJS(o,v){ -return %Uint8x16AddSaturate(o,v); -} -function Uint8x16SubSaturateJS(o,v){ -return %Uint8x16SubSaturate(o,v); -} - -function Uint16x8AddSaturateJS(o,v){ -return %Uint16x8AddSaturate(o,v); -} -function Uint16x8SubSaturateJS(o,v){ -return %Uint16x8SubSaturate(o,v); -} - - -function Float32x4NegJS(o){ -return %Float32x4Neg(o); -} - - -function Int32x4NegJS(o){ -return %Int32x4Neg(o); -} - -function Int16x8NegJS(o){ -return %Int16x8Neg(o); -} - -function Int8x16NegJS(o){ -return %Int8x16Neg(o); -} - - -function Bool32x4ReplaceLaneJS(s,t,p){ -return %Bool32x4ReplaceLane(s,t,p); -} -function Bool32x4AnyTrueJS(w){ -return %Bool32x4AnyTrue(w); -} -function Bool32x4AllTrueJS(w){ -return %Bool32x4AllTrue(w); -} - -function Bool16x8ReplaceLaneJS(s,t,p){ -return %Bool16x8ReplaceLane(s,t,p); -} -function Bool16x8AnyTrueJS(w){ -return %Bool16x8AnyTrue(w); -} -function Bool16x8AllTrueJS(w){ -return %Bool16x8AllTrue(w); -} - -function Bool8x16ReplaceLaneJS(s,t,p){ -return %Bool8x16ReplaceLane(s,t,p); -} -function Bool8x16AnyTrueJS(w){ -return %Bool8x16AnyTrue(w); -} -function Bool8x16AllTrueJS(w){ -return %Bool8x16AllTrue(w); -} - - -function Float32x4ReplaceLaneJS(s,t,p){ -return %Float32x4ReplaceLane(s,t,(%_ToNumber(p))); -} -function Float32x4SelectJS(x,o,v){ -return %Float32x4Select(x,o,v); -} -function Float32x4AddJS(o,v){ -return %Float32x4Add(o,v); -} -function Float32x4SubJS(o,v){ -return %Float32x4Sub(o,v); -} -function Float32x4MulJS(o,v){ -return %Float32x4Mul(o,v); -} -function Float32x4MinJS(o,v){ -return %Float32x4Min(o,v); -} -function Float32x4MaxJS(o,v){ -return %Float32x4Max(o,v); -} -function Float32x4EqualJS(o,v){ -return %Float32x4Equal(o,v); -} -function Float32x4NotEqualJS(o,v){ -return %Float32x4NotEqual(o,v); -} -function Float32x4LessThanJS(o,v){ -return %Float32x4LessThan(o,v); -} -function Float32x4LessThanOrEqualJS(o,v){ -return %Float32x4LessThanOrEqual(o,v); -} -function Float32x4GreaterThanJS(o,v){ -return %Float32x4GreaterThan(o,v); -} -function Float32x4GreaterThanOrEqualJS(o,v){ -return %Float32x4GreaterThanOrEqual(o,v); -} -function Float32x4LoadJS(y,z){ -return %Float32x4Load(y,z); -} -function Float32x4StoreJS(y,z,o){ -return %Float32x4Store(y,z,o); -} - - -function Int32x4ReplaceLaneJS(s,t,p){ -return %Int32x4ReplaceLane(s,t,(%_ToNumber(p))); -} -function Int32x4SelectJS(x,o,v){ -return %Int32x4Select(x,o,v); -} -function Int32x4AddJS(o,v){ -return %Int32x4Add(o,v); -} -function Int32x4SubJS(o,v){ -return %Int32x4Sub(o,v); -} -function Int32x4MulJS(o,v){ -return %Int32x4Mul(o,v); -} -function Int32x4MinJS(o,v){ -return %Int32x4Min(o,v); -} -function Int32x4MaxJS(o,v){ -return %Int32x4Max(o,v); -} -function Int32x4EqualJS(o,v){ -return %Int32x4Equal(o,v); -} -function Int32x4NotEqualJS(o,v){ -return %Int32x4NotEqual(o,v); -} -function Int32x4LessThanJS(o,v){ -return %Int32x4LessThan(o,v); -} -function Int32x4LessThanOrEqualJS(o,v){ -return %Int32x4LessThanOrEqual(o,v); -} -function Int32x4GreaterThanJS(o,v){ -return %Int32x4GreaterThan(o,v); -} -function Int32x4GreaterThanOrEqualJS(o,v){ -return %Int32x4GreaterThanOrEqual(o,v); -} -function Int32x4LoadJS(y,z){ -return %Int32x4Load(y,z); -} -function Int32x4StoreJS(y,z,o){ -return %Int32x4Store(y,z,o); -} - -function Int16x8ReplaceLaneJS(s,t,p){ -return %Int16x8ReplaceLane(s,t,(%_ToNumber(p))); -} -function Int16x8SelectJS(x,o,v){ -return %Int16x8Select(x,o,v); -} -function Int16x8AddJS(o,v){ -return %Int16x8Add(o,v); -} -function Int16x8SubJS(o,v){ -return %Int16x8Sub(o,v); -} -function Int16x8MulJS(o,v){ -return %Int16x8Mul(o,v); -} -function Int16x8MinJS(o,v){ -return %Int16x8Min(o,v); -} -function Int16x8MaxJS(o,v){ -return %Int16x8Max(o,v); -} -function Int16x8EqualJS(o,v){ -return %Int16x8Equal(o,v); -} -function Int16x8NotEqualJS(o,v){ -return %Int16x8NotEqual(o,v); -} -function Int16x8LessThanJS(o,v){ -return %Int16x8LessThan(o,v); -} -function Int16x8LessThanOrEqualJS(o,v){ -return %Int16x8LessThanOrEqual(o,v); -} -function Int16x8GreaterThanJS(o,v){ -return %Int16x8GreaterThan(o,v); -} -function Int16x8GreaterThanOrEqualJS(o,v){ -return %Int16x8GreaterThanOrEqual(o,v); -} -function Int16x8LoadJS(y,z){ -return %Int16x8Load(y,z); -} -function Int16x8StoreJS(y,z,o){ -return %Int16x8Store(y,z,o); -} - -function Int8x16ReplaceLaneJS(s,t,p){ -return %Int8x16ReplaceLane(s,t,(%_ToNumber(p))); -} -function Int8x16SelectJS(x,o,v){ -return %Int8x16Select(x,o,v); -} -function Int8x16AddJS(o,v){ -return %Int8x16Add(o,v); -} -function Int8x16SubJS(o,v){ -return %Int8x16Sub(o,v); -} -function Int8x16MulJS(o,v){ -return %Int8x16Mul(o,v); -} -function Int8x16MinJS(o,v){ -return %Int8x16Min(o,v); -} -function Int8x16MaxJS(o,v){ -return %Int8x16Max(o,v); -} -function Int8x16EqualJS(o,v){ -return %Int8x16Equal(o,v); -} -function Int8x16NotEqualJS(o,v){ -return %Int8x16NotEqual(o,v); -} -function Int8x16LessThanJS(o,v){ -return %Int8x16LessThan(o,v); -} -function Int8x16LessThanOrEqualJS(o,v){ -return %Int8x16LessThanOrEqual(o,v); -} -function Int8x16GreaterThanJS(o,v){ -return %Int8x16GreaterThan(o,v); -} -function Int8x16GreaterThanOrEqualJS(o,v){ -return %Int8x16GreaterThanOrEqual(o,v); -} -function Int8x16LoadJS(y,z){ -return %Int8x16Load(y,z); -} -function Int8x16StoreJS(y,z,o){ -return %Int8x16Store(y,z,o); -} - - -function Uint32x4ReplaceLaneJS(s,t,p){ -return %Uint32x4ReplaceLane(s,t,(%_ToNumber(p))); -} -function Uint32x4SelectJS(x,o,v){ -return %Uint32x4Select(x,o,v); -} -function Uint32x4AddJS(o,v){ -return %Uint32x4Add(o,v); -} -function Uint32x4SubJS(o,v){ -return %Uint32x4Sub(o,v); -} -function Uint32x4MulJS(o,v){ -return %Uint32x4Mul(o,v); -} -function Uint32x4MinJS(o,v){ -return %Uint32x4Min(o,v); -} -function Uint32x4MaxJS(o,v){ -return %Uint32x4Max(o,v); -} -function Uint32x4EqualJS(o,v){ -return %Uint32x4Equal(o,v); -} -function Uint32x4NotEqualJS(o,v){ -return %Uint32x4NotEqual(o,v); -} -function Uint32x4LessThanJS(o,v){ -return %Uint32x4LessThan(o,v); -} -function Uint32x4LessThanOrEqualJS(o,v){ -return %Uint32x4LessThanOrEqual(o,v); -} -function Uint32x4GreaterThanJS(o,v){ -return %Uint32x4GreaterThan(o,v); -} -function Uint32x4GreaterThanOrEqualJS(o,v){ -return %Uint32x4GreaterThanOrEqual(o,v); -} -function Uint32x4LoadJS(y,z){ -return %Uint32x4Load(y,z); -} -function Uint32x4StoreJS(y,z,o){ -return %Uint32x4Store(y,z,o); -} - -function Uint16x8ReplaceLaneJS(s,t,p){ -return %Uint16x8ReplaceLane(s,t,(%_ToNumber(p))); -} -function Uint16x8SelectJS(x,o,v){ -return %Uint16x8Select(x,o,v); -} -function Uint16x8AddJS(o,v){ -return %Uint16x8Add(o,v); -} -function Uint16x8SubJS(o,v){ -return %Uint16x8Sub(o,v); -} -function Uint16x8MulJS(o,v){ -return %Uint16x8Mul(o,v); -} -function Uint16x8MinJS(o,v){ -return %Uint16x8Min(o,v); -} -function Uint16x8MaxJS(o,v){ -return %Uint16x8Max(o,v); -} -function Uint16x8EqualJS(o,v){ -return %Uint16x8Equal(o,v); -} -function Uint16x8NotEqualJS(o,v){ -return %Uint16x8NotEqual(o,v); -} -function Uint16x8LessThanJS(o,v){ -return %Uint16x8LessThan(o,v); -} -function Uint16x8LessThanOrEqualJS(o,v){ -return %Uint16x8LessThanOrEqual(o,v); -} -function Uint16x8GreaterThanJS(o,v){ -return %Uint16x8GreaterThan(o,v); -} -function Uint16x8GreaterThanOrEqualJS(o,v){ -return %Uint16x8GreaterThanOrEqual(o,v); -} -function Uint16x8LoadJS(y,z){ -return %Uint16x8Load(y,z); -} -function Uint16x8StoreJS(y,z,o){ -return %Uint16x8Store(y,z,o); -} - -function Uint8x16ReplaceLaneJS(s,t,p){ -return %Uint8x16ReplaceLane(s,t,(%_ToNumber(p))); -} -function Uint8x16SelectJS(x,o,v){ -return %Uint8x16Select(x,o,v); -} -function Uint8x16AddJS(o,v){ -return %Uint8x16Add(o,v); -} -function Uint8x16SubJS(o,v){ -return %Uint8x16Sub(o,v); -} -function Uint8x16MulJS(o,v){ -return %Uint8x16Mul(o,v); -} -function Uint8x16MinJS(o,v){ -return %Uint8x16Min(o,v); -} -function Uint8x16MaxJS(o,v){ -return %Uint8x16Max(o,v); -} -function Uint8x16EqualJS(o,v){ -return %Uint8x16Equal(o,v); -} -function Uint8x16NotEqualJS(o,v){ -return %Uint8x16NotEqual(o,v); -} -function Uint8x16LessThanJS(o,v){ -return %Uint8x16LessThan(o,v); -} -function Uint8x16LessThanOrEqualJS(o,v){ -return %Uint8x16LessThanOrEqual(o,v); -} -function Uint8x16GreaterThanJS(o,v){ -return %Uint8x16GreaterThan(o,v); -} -function Uint8x16GreaterThanOrEqualJS(o,v){ -return %Uint8x16GreaterThanOrEqual(o,v); -} -function Uint8x16LoadJS(y,z){ -return %Uint8x16Load(y,z); -} -function Uint8x16StoreJS(y,z,o){ -return %Uint8x16Store(y,z,o); -} - - - -function Int32x4AndJS(o,v){ -return %Int32x4And(o,v); -} -function Int32x4OrJS(o,v){ -return %Int32x4Or(o,v); -} -function Int32x4XorJS(o,v){ -return %Int32x4Xor(o,v); -} -function Int32x4NotJS(o){ -return %Int32x4Not(o); -} - -function Int16x8AndJS(o,v){ -return %Int16x8And(o,v); -} -function Int16x8OrJS(o,v){ -return %Int16x8Or(o,v); -} -function Int16x8XorJS(o,v){ -return %Int16x8Xor(o,v); -} -function Int16x8NotJS(o){ -return %Int16x8Not(o); -} - -function Int8x16AndJS(o,v){ -return %Int8x16And(o,v); -} -function Int8x16OrJS(o,v){ -return %Int8x16Or(o,v); -} -function Int8x16XorJS(o,v){ -return %Int8x16Xor(o,v); -} -function Int8x16NotJS(o){ -return %Int8x16Not(o); -} - - -function Uint32x4AndJS(o,v){ -return %Uint32x4And(o,v); -} -function Uint32x4OrJS(o,v){ -return %Uint32x4Or(o,v); -} -function Uint32x4XorJS(o,v){ -return %Uint32x4Xor(o,v); -} -function Uint32x4NotJS(o){ -return %Uint32x4Not(o); -} - -function Uint16x8AndJS(o,v){ -return %Uint16x8And(o,v); -} -function Uint16x8OrJS(o,v){ -return %Uint16x8Or(o,v); -} -function Uint16x8XorJS(o,v){ -return %Uint16x8Xor(o,v); -} -function Uint16x8NotJS(o){ -return %Uint16x8Not(o); -} - -function Uint8x16AndJS(o,v){ -return %Uint8x16And(o,v); -} -function Uint8x16OrJS(o,v){ -return %Uint8x16Or(o,v); -} -function Uint8x16XorJS(o,v){ -return %Uint8x16Xor(o,v); -} -function Uint8x16NotJS(o){ -return %Uint8x16Not(o); -} - - -function Bool32x4AndJS(o,v){ -return %Bool32x4And(o,v); -} -function Bool32x4OrJS(o,v){ -return %Bool32x4Or(o,v); -} -function Bool32x4XorJS(o,v){ -return %Bool32x4Xor(o,v); -} -function Bool32x4NotJS(o){ -return %Bool32x4Not(o); -} - -function Bool16x8AndJS(o,v){ -return %Bool16x8And(o,v); -} -function Bool16x8OrJS(o,v){ -return %Bool16x8Or(o,v); -} -function Bool16x8XorJS(o,v){ -return %Bool16x8Xor(o,v); -} -function Bool16x8NotJS(o){ -return %Bool16x8Not(o); -} - -function Bool8x16AndJS(o,v){ -return %Bool8x16And(o,v); -} -function Bool8x16OrJS(o,v){ -return %Bool8x16Or(o,v); -} -function Bool8x16XorJS(o,v){ -return %Bool8x16Xor(o,v); -} -function Bool8x16NotJS(o){ -return %Bool8x16Not(o); -} - - - -function Float32x4FromInt32x4JS(o){ -return %Float32x4FromInt32x4(o); -} - -function Float32x4FromUint32x4JS(o){ -return %Float32x4FromUint32x4(o); -} - -function Int32x4FromFloat32x4JS(o){ -return %Int32x4FromFloat32x4(o); -} - -function Int32x4FromUint32x4JS(o){ -return %Int32x4FromUint32x4(o); -} - -function Uint32x4FromFloat32x4JS(o){ -return %Uint32x4FromFloat32x4(o); -} - -function Uint32x4FromInt32x4JS(o){ -return %Uint32x4FromInt32x4(o); -} - -function Int16x8FromUint16x8JS(o){ -return %Int16x8FromUint16x8(o); -} - -function Uint16x8FromInt16x8JS(o){ -return %Uint16x8FromInt16x8(o); -} - -function Int8x16FromUint8x16JS(o){ -return %Int8x16FromUint8x16(o); -} - -function Uint8x16FromInt8x16JS(o){ -return %Uint8x16FromInt8x16(o); -} - - -function Float32x4FromInt32x4BitsJS(o){ -return %Float32x4FromInt32x4Bits(o); -} - -function Float32x4FromUint32x4BitsJS(o){ -return %Float32x4FromUint32x4Bits(o); -} - -function Float32x4FromInt16x8BitsJS(o){ -return %Float32x4FromInt16x8Bits(o); -} - -function Float32x4FromUint16x8BitsJS(o){ -return %Float32x4FromUint16x8Bits(o); -} - -function Float32x4FromInt8x16BitsJS(o){ -return %Float32x4FromInt8x16Bits(o); -} - -function Float32x4FromUint8x16BitsJS(o){ -return %Float32x4FromUint8x16Bits(o); -} - -function Int32x4FromFloat32x4BitsJS(o){ -return %Int32x4FromFloat32x4Bits(o); -} - -function Int32x4FromUint32x4BitsJS(o){ -return %Int32x4FromUint32x4Bits(o); -} - -function Int32x4FromInt16x8BitsJS(o){ -return %Int32x4FromInt16x8Bits(o); -} - -function Int32x4FromUint16x8BitsJS(o){ -return %Int32x4FromUint16x8Bits(o); -} - -function Int32x4FromInt8x16BitsJS(o){ -return %Int32x4FromInt8x16Bits(o); -} - -function Int32x4FromUint8x16BitsJS(o){ -return %Int32x4FromUint8x16Bits(o); -} - -function Uint32x4FromFloat32x4BitsJS(o){ -return %Uint32x4FromFloat32x4Bits(o); -} - -function Uint32x4FromInt32x4BitsJS(o){ -return %Uint32x4FromInt32x4Bits(o); -} - -function Uint32x4FromInt16x8BitsJS(o){ -return %Uint32x4FromInt16x8Bits(o); -} - -function Uint32x4FromUint16x8BitsJS(o){ -return %Uint32x4FromUint16x8Bits(o); -} - -function Uint32x4FromInt8x16BitsJS(o){ -return %Uint32x4FromInt8x16Bits(o); -} - -function Uint32x4FromUint8x16BitsJS(o){ -return %Uint32x4FromUint8x16Bits(o); -} - -function Int16x8FromFloat32x4BitsJS(o){ -return %Int16x8FromFloat32x4Bits(o); -} - -function Int16x8FromInt32x4BitsJS(o){ -return %Int16x8FromInt32x4Bits(o); -} - -function Int16x8FromUint32x4BitsJS(o){ -return %Int16x8FromUint32x4Bits(o); -} - -function Int16x8FromUint16x8BitsJS(o){ -return %Int16x8FromUint16x8Bits(o); -} - -function Int16x8FromInt8x16BitsJS(o){ -return %Int16x8FromInt8x16Bits(o); -} - -function Int16x8FromUint8x16BitsJS(o){ -return %Int16x8FromUint8x16Bits(o); -} - -function Uint16x8FromFloat32x4BitsJS(o){ -return %Uint16x8FromFloat32x4Bits(o); -} - -function Uint16x8FromInt32x4BitsJS(o){ -return %Uint16x8FromInt32x4Bits(o); -} - -function Uint16x8FromUint32x4BitsJS(o){ -return %Uint16x8FromUint32x4Bits(o); -} - -function Uint16x8FromInt16x8BitsJS(o){ -return %Uint16x8FromInt16x8Bits(o); -} - -function Uint16x8FromInt8x16BitsJS(o){ -return %Uint16x8FromInt8x16Bits(o); -} - -function Uint16x8FromUint8x16BitsJS(o){ -return %Uint16x8FromUint8x16Bits(o); -} - -function Int8x16FromFloat32x4BitsJS(o){ -return %Int8x16FromFloat32x4Bits(o); -} - -function Int8x16FromInt32x4BitsJS(o){ -return %Int8x16FromInt32x4Bits(o); -} - -function Int8x16FromUint32x4BitsJS(o){ -return %Int8x16FromUint32x4Bits(o); -} - -function Int8x16FromInt16x8BitsJS(o){ -return %Int8x16FromInt16x8Bits(o); -} - -function Int8x16FromUint16x8BitsJS(o){ -return %Int8x16FromUint16x8Bits(o); -} - -function Int8x16FromUint8x16BitsJS(o){ -return %Int8x16FromUint8x16Bits(o); -} - -function Uint8x16FromFloat32x4BitsJS(o){ -return %Uint8x16FromFloat32x4Bits(o); -} - -function Uint8x16FromInt32x4BitsJS(o){ -return %Uint8x16FromInt32x4Bits(o); -} - -function Uint8x16FromUint32x4BitsJS(o){ -return %Uint8x16FromUint32x4Bits(o); -} - -function Uint8x16FromInt16x8BitsJS(o){ -return %Uint8x16FromInt16x8Bits(o); -} - -function Uint8x16FromUint16x8BitsJS(o){ -return %Uint8x16FromUint16x8Bits(o); -} - -function Uint8x16FromInt8x16BitsJS(o){ -return %Uint8x16FromInt8x16Bits(o); -} - - -function Float32x4Load1JS(y,z){ -return %Float32x4Load1(y,z); -} -function Float32x4Store1JS(y,z,o){ -return %Float32x4Store1(y,z,o); -} - -function Float32x4Load2JS(y,z){ -return %Float32x4Load2(y,z); -} -function Float32x4Store2JS(y,z,o){ -return %Float32x4Store2(y,z,o); -} - -function Float32x4Load3JS(y,z){ -return %Float32x4Load3(y,z); -} -function Float32x4Store3JS(y,z,o){ -return %Float32x4Store3(y,z,o); -} - -function Int32x4Load1JS(y,z){ -return %Int32x4Load1(y,z); -} -function Int32x4Store1JS(y,z,o){ -return %Int32x4Store1(y,z,o); -} - -function Int32x4Load2JS(y,z){ -return %Int32x4Load2(y,z); -} -function Int32x4Store2JS(y,z,o){ -return %Int32x4Store2(y,z,o); -} - -function Int32x4Load3JS(y,z){ -return %Int32x4Load3(y,z); -} -function Int32x4Store3JS(y,z,o){ -return %Int32x4Store3(y,z,o); -} - -function Uint32x4Load1JS(y,z){ -return %Uint32x4Load1(y,z); -} -function Uint32x4Store1JS(y,z,o){ -return %Uint32x4Store1(y,z,o); -} - -function Uint32x4Load2JS(y,z){ -return %Uint32x4Load2(y,z); -} -function Uint32x4Store2JS(y,z,o){ -return %Uint32x4Store2(y,z,o); -} - -function Uint32x4Load3JS(y,z){ -return %Uint32x4Load3(y,z); -} -function Uint32x4Store3JS(y,z,o){ -return %Uint32x4Store3(y,z,o); -} - - -function Float32x4Splat(w){ -return %CreateFloat32x4(w,w,w,w); -} -function Float32x4SwizzleJS(o,A,B,C,D){ -return %Float32x4Swizzle(o,A,B,C,D); -} -function Float32x4ShuffleJS(o,v,A,B,C,D){ -return %Float32x4Shuffle(o,v,A,B,C,D); -} - -function Int32x4Splat(w){ -return %CreateInt32x4(w,w,w,w); -} -function Int32x4SwizzleJS(o,A,B,C,D){ -return %Int32x4Swizzle(o,A,B,C,D); -} -function Int32x4ShuffleJS(o,v,A,B,C,D){ -return %Int32x4Shuffle(o,v,A,B,C,D); -} - -function Uint32x4Splat(w){ -return %CreateUint32x4(w,w,w,w); -} -function Uint32x4SwizzleJS(o,A,B,C,D){ -return %Uint32x4Swizzle(o,A,B,C,D); -} -function Uint32x4ShuffleJS(o,v,A,B,C,D){ -return %Uint32x4Shuffle(o,v,A,B,C,D); -} - -function Bool32x4Splat(w){ -return %CreateBool32x4(w,w,w,w); -} -function Bool32x4SwizzleJS(o,A,B,C,D){ -return %Bool32x4Swizzle(o,A,B,C,D); -} -function Bool32x4ShuffleJS(o,v,A,B,C,D){ -return %Bool32x4Shuffle(o,v,A,B,C,D); -} - - -function Int16x8Splat(w){ -return %CreateInt16x8(w,w,w,w,w,w,w,w); -} -function Int16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ -return %Int16x8Swizzle(o,A,B,C,D,E,F,G,H); -} -function Int16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ -return %Int16x8Shuffle(o,v,A,B,C,D,E,F,G,H); -} - -function Uint16x8Splat(w){ -return %CreateUint16x8(w,w,w,w,w,w,w,w); -} -function Uint16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ -return %Uint16x8Swizzle(o,A,B,C,D,E,F,G,H); -} -function Uint16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ -return %Uint16x8Shuffle(o,v,A,B,C,D,E,F,G,H); -} - -function Bool16x8Splat(w){ -return %CreateBool16x8(w,w,w,w,w,w,w,w); -} -function Bool16x8SwizzleJS(o,A,B,C,D,E,F,G,H){ -return %Bool16x8Swizzle(o,A,B,C,D,E,F,G,H); -} -function Bool16x8ShuffleJS(o,v,A,B,C,D,E,F,G,H){ -return %Bool16x8Shuffle(o,v,A,B,C,D,E,F,G,H); -} - - -function Int8x16Splat(w){ -return %CreateInt8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); -} -function Int8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -return %Int8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15); -} -function Int8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15){ -return %Int8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15); -} - -function Uint8x16Splat(w){ -return %CreateUint8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); -} -function Uint8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -return %Uint8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15); -} -function Uint8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15){ -return %Uint8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15); -} - -function Bool8x16Splat(w){ -return %CreateBool8x16(w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w); -} -function Bool8x16SwizzleJS(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -return %Bool8x16Swizzle(o,A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15); -} -function Bool8x16ShuffleJS(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15){ -return %Bool8x16Shuffle(o,v,A,B,C,D,E,F,G,H,c8,c9,c10, -c11,c12,c13,c14,c15); -} - - -function Float32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Float32x4"); -} -return %CreateFloat32x4((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D))); -} -function Int32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Int32x4"); -} -return %CreateInt32x4((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D))); -} -function Uint32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Uint32x4"); -} -return %CreateUint32x4((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D))); -} -function Bool32x4Constructor(A,B,C,D){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Bool32x4"); -} -return %CreateBool32x4(A,B,C,D); -} -function Int16x8Constructor(A,B,C,D,E,F,G,H){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Int16x8"); -} -return %CreateInt16x8((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H))); -} -function Uint16x8Constructor(A,B,C,D,E,F,G,H){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Uint16x8"); -} -return %CreateUint16x8((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H))); -} -function Bool16x8Constructor(A,B,C,D,E,F,G,H){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Bool16x8"); -} -return %CreateBool16x8(A,B,C,D,E,F,G,H); -} -function Int8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Int8x16"); -} -return %CreateInt8x16((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H)), -(%_ToNumber(c8)),(%_ToNumber(c9)), -(%_ToNumber(c10)),(%_ToNumber(c11)), -(%_ToNumber(c12)),(%_ToNumber(c13)), -(%_ToNumber(c14)),(%_ToNumber(c15))); -} -function Uint8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Uint8x16"); -} -return %CreateUint8x16((%_ToNumber(A)),(%_ToNumber(B)), -(%_ToNumber(C)),(%_ToNumber(D)), -(%_ToNumber(E)),(%_ToNumber(F)), -(%_ToNumber(G)),(%_ToNumber(H)), -(%_ToNumber(c8)),(%_ToNumber(c9)), -(%_ToNumber(c10)),(%_ToNumber(c11)), -(%_ToNumber(c12)),(%_ToNumber(c13)), -(%_ToNumber(c14)),(%_ToNumber(c15))); -} -function Bool8x16Constructor(A,B,C,D,E,F,G,H,c8,c9,c10,c11, -c12,c13,c14,c15){ -if(!(new.target===(void 0))){ -throw %make_type_error(67,"Bool8x16"); -} -return %CreateBool8x16(A,B,C,D,E,F,G,H,c8,c9,c10,c11,c12, -c13,c14,c15); -} -function Float32x4AbsJS(o){ -return %Float32x4Abs(o); -} -function Float32x4SqrtJS(o){ -return %Float32x4Sqrt(o); -} -function Float32x4RecipApproxJS(o){ -return %Float32x4RecipApprox(o); -} -function Float32x4RecipSqrtApproxJS(o){ -return %Float32x4RecipSqrtApprox(o); -} -function Float32x4DivJS(o,v){ -return %Float32x4Div(o,v); -} -function Float32x4MinNumJS(o,v){ -return %Float32x4MinNum(o,v); -} -function Float32x4MaxNumJS(o,v){ -return %Float32x4MaxNum(o,v); -} -%AddNamedProperty(c,d,'SIMD',1|2); -%SetCode(e,Float32x4Constructor); -%FunctionSetPrototype(e,{}); -%AddNamedProperty(e.prototype,'constructor',e, -2); -%AddNamedProperty(e.prototype,d,'Float32x4', -2|1); -b.InstallFunctions(e.prototype,2,[ -'toLocaleString',Float32x4ToLocaleString, -'toString',Float32x4ToString, -'valueOf',Float32x4ValueOf, -]); - - -%SetCode(f,Int32x4Constructor); -%FunctionSetPrototype(f,{}); -%AddNamedProperty(f.prototype,'constructor',f, -2); -%AddNamedProperty(f.prototype,d,'Int32x4', -2|1); -b.InstallFunctions(f.prototype,2,[ -'toLocaleString',Int32x4ToLocaleString, -'toString',Int32x4ToString, -'valueOf',Int32x4ValueOf, -]); - -%SetCode(g,Int16x8Constructor); -%FunctionSetPrototype(g,{}); -%AddNamedProperty(g.prototype,'constructor',g, -2); -%AddNamedProperty(g.prototype,d,'Int16x8', -2|1); -b.InstallFunctions(g.prototype,2,[ -'toLocaleString',Int16x8ToLocaleString, -'toString',Int16x8ToString, -'valueOf',Int16x8ValueOf, -]); - -%SetCode(h,Int8x16Constructor); -%FunctionSetPrototype(h,{}); -%AddNamedProperty(h.prototype,'constructor',h, -2); -%AddNamedProperty(h.prototype,d,'Int8x16', -2|1); -b.InstallFunctions(h.prototype,2,[ -'toLocaleString',Int8x16ToLocaleString, -'toString',Int8x16ToString, -'valueOf',Int8x16ValueOf, -]); - - -%SetCode(i,Uint32x4Constructor); -%FunctionSetPrototype(i,{}); -%AddNamedProperty(i.prototype,'constructor',i, -2); -%AddNamedProperty(i.prototype,d,'Uint32x4', -2|1); -b.InstallFunctions(i.prototype,2,[ -'toLocaleString',Uint32x4ToLocaleString, -'toString',Uint32x4ToString, -'valueOf',Uint32x4ValueOf, -]); - -%SetCode(j,Uint16x8Constructor); -%FunctionSetPrototype(j,{}); -%AddNamedProperty(j.prototype,'constructor',j, -2); -%AddNamedProperty(j.prototype,d,'Uint16x8', -2|1); -b.InstallFunctions(j.prototype,2,[ -'toLocaleString',Uint16x8ToLocaleString, -'toString',Uint16x8ToString, -'valueOf',Uint16x8ValueOf, -]); - -%SetCode(k,Uint8x16Constructor); -%FunctionSetPrototype(k,{}); -%AddNamedProperty(k.prototype,'constructor',k, -2); -%AddNamedProperty(k.prototype,d,'Uint8x16', -2|1); -b.InstallFunctions(k.prototype,2,[ -'toLocaleString',Uint8x16ToLocaleString, -'toString',Uint8x16ToString, -'valueOf',Uint8x16ValueOf, -]); - - -%SetCode(l,Bool32x4Constructor); -%FunctionSetPrototype(l,{}); -%AddNamedProperty(l.prototype,'constructor',l, -2); -%AddNamedProperty(l.prototype,d,'Bool32x4', -2|1); -b.InstallFunctions(l.prototype,2,[ -'toLocaleString',Bool32x4ToLocaleString, -'toString',Bool32x4ToString, -'valueOf',Bool32x4ValueOf, -]); - -%SetCode(m,Bool16x8Constructor); -%FunctionSetPrototype(m,{}); -%AddNamedProperty(m.prototype,'constructor',m, -2); -%AddNamedProperty(m.prototype,d,'Bool16x8', -2|1); -b.InstallFunctions(m.prototype,2,[ -'toLocaleString',Bool16x8ToLocaleString, -'toString',Bool16x8ToString, -'valueOf',Bool16x8ValueOf, -]); - -%SetCode(n,Bool8x16Constructor); -%FunctionSetPrototype(n,{}); -%AddNamedProperty(n.prototype,'constructor',n, -2); -%AddNamedProperty(n.prototype,d,'Bool8x16', -2|1); -b.InstallFunctions(n.prototype,2,[ -'toLocaleString',Bool8x16ToLocaleString, -'toString',Bool8x16ToString, -'valueOf',Bool8x16ValueOf, -]); - - - -b.InstallFunctions(e,2,[ -'splat',Float32x4Splat, -'check',Float32x4CheckJS, -'extractLane',Float32x4ExtractLaneJS, -'replaceLane',Float32x4ReplaceLaneJS, -'neg',Float32x4NegJS, -'abs',Float32x4AbsJS, -'sqrt',Float32x4SqrtJS, -'reciprocalApproximation',Float32x4RecipApproxJS, -'reciprocalSqrtApproximation',Float32x4RecipSqrtApproxJS, -'add',Float32x4AddJS, -'sub',Float32x4SubJS, -'mul',Float32x4MulJS, -'div',Float32x4DivJS, -'min',Float32x4MinJS, -'max',Float32x4MaxJS, -'minNum',Float32x4MinNumJS, -'maxNum',Float32x4MaxNumJS, -'lessThan',Float32x4LessThanJS, -'lessThanOrEqual',Float32x4LessThanOrEqualJS, -'greaterThan',Float32x4GreaterThanJS, -'greaterThanOrEqual',Float32x4GreaterThanOrEqualJS, -'equal',Float32x4EqualJS, -'notEqual',Float32x4NotEqualJS, -'select',Float32x4SelectJS, -'swizzle',Float32x4SwizzleJS, -'shuffle',Float32x4ShuffleJS, -'fromInt32x4',Float32x4FromInt32x4JS, -'fromUint32x4',Float32x4FromUint32x4JS, -'fromInt32x4Bits',Float32x4FromInt32x4BitsJS, -'fromUint32x4Bits',Float32x4FromUint32x4BitsJS, -'fromInt16x8Bits',Float32x4FromInt16x8BitsJS, -'fromUint16x8Bits',Float32x4FromUint16x8BitsJS, -'fromInt8x16Bits',Float32x4FromInt8x16BitsJS, -'fromUint8x16Bits',Float32x4FromUint8x16BitsJS, -'load',Float32x4LoadJS, -'load1',Float32x4Load1JS, -'load2',Float32x4Load2JS, -'load3',Float32x4Load3JS, -'store',Float32x4StoreJS, -'store1',Float32x4Store1JS, -'store2',Float32x4Store2JS, -'store3',Float32x4Store3JS, -]); -b.InstallFunctions(f,2,[ -'splat',Int32x4Splat, -'check',Int32x4CheckJS, -'extractLane',Int32x4ExtractLaneJS, -'replaceLane',Int32x4ReplaceLaneJS, -'neg',Int32x4NegJS, -'add',Int32x4AddJS, -'sub',Int32x4SubJS, -'mul',Int32x4MulJS, -'min',Int32x4MinJS, -'max',Int32x4MaxJS, -'and',Int32x4AndJS, -'or',Int32x4OrJS, -'xor',Int32x4XorJS, -'not',Int32x4NotJS, -'shiftLeftByScalar',Int32x4ShiftLeftByScalarJS, -'shiftRightByScalar',Int32x4ShiftRightByScalarJS, -'lessThan',Int32x4LessThanJS, -'lessThanOrEqual',Int32x4LessThanOrEqualJS, -'greaterThan',Int32x4GreaterThanJS, -'greaterThanOrEqual',Int32x4GreaterThanOrEqualJS, -'equal',Int32x4EqualJS, -'notEqual',Int32x4NotEqualJS, -'select',Int32x4SelectJS, -'swizzle',Int32x4SwizzleJS, -'shuffle',Int32x4ShuffleJS, -'fromFloat32x4',Int32x4FromFloat32x4JS, -'fromUint32x4',Int32x4FromUint32x4JS, -'fromFloat32x4Bits',Int32x4FromFloat32x4BitsJS, -'fromUint32x4Bits',Int32x4FromUint32x4BitsJS, -'fromInt16x8Bits',Int32x4FromInt16x8BitsJS, -'fromUint16x8Bits',Int32x4FromUint16x8BitsJS, -'fromInt8x16Bits',Int32x4FromInt8x16BitsJS, -'fromUint8x16Bits',Int32x4FromUint8x16BitsJS, -'load',Int32x4LoadJS, -'load1',Int32x4Load1JS, -'load2',Int32x4Load2JS, -'load3',Int32x4Load3JS, -'store',Int32x4StoreJS, -'store1',Int32x4Store1JS, -'store2',Int32x4Store2JS, -'store3',Int32x4Store3JS, -]); -b.InstallFunctions(i,2,[ -'splat',Uint32x4Splat, -'check',Uint32x4CheckJS, -'extractLane',Uint32x4ExtractLaneJS, -'replaceLane',Uint32x4ReplaceLaneJS, -'add',Uint32x4AddJS, -'sub',Uint32x4SubJS, -'mul',Uint32x4MulJS, -'min',Uint32x4MinJS, -'max',Uint32x4MaxJS, -'and',Uint32x4AndJS, -'or',Uint32x4OrJS, -'xor',Uint32x4XorJS, -'not',Uint32x4NotJS, -'shiftLeftByScalar',Uint32x4ShiftLeftByScalarJS, -'shiftRightByScalar',Uint32x4ShiftRightByScalarJS, -'lessThan',Uint32x4LessThanJS, -'lessThanOrEqual',Uint32x4LessThanOrEqualJS, -'greaterThan',Uint32x4GreaterThanJS, -'greaterThanOrEqual',Uint32x4GreaterThanOrEqualJS, -'equal',Uint32x4EqualJS, -'notEqual',Uint32x4NotEqualJS, -'select',Uint32x4SelectJS, -'swizzle',Uint32x4SwizzleJS, -'shuffle',Uint32x4ShuffleJS, -'fromFloat32x4',Uint32x4FromFloat32x4JS, -'fromInt32x4',Uint32x4FromInt32x4JS, -'fromFloat32x4Bits',Uint32x4FromFloat32x4BitsJS, -'fromInt32x4Bits',Uint32x4FromInt32x4BitsJS, -'fromInt16x8Bits',Uint32x4FromInt16x8BitsJS, -'fromUint16x8Bits',Uint32x4FromUint16x8BitsJS, -'fromInt8x16Bits',Uint32x4FromInt8x16BitsJS, -'fromUint8x16Bits',Uint32x4FromUint8x16BitsJS, -'load',Uint32x4LoadJS, -'load1',Uint32x4Load1JS, -'load2',Uint32x4Load2JS, -'load3',Uint32x4Load3JS, -'store',Uint32x4StoreJS, -'store1',Uint32x4Store1JS, -'store2',Uint32x4Store2JS, -'store3',Uint32x4Store3JS, -]); -b.InstallFunctions(l,2,[ -'splat',Bool32x4Splat, -'check',Bool32x4CheckJS, -'extractLane',Bool32x4ExtractLaneJS, -'replaceLane',Bool32x4ReplaceLaneJS, -'and',Bool32x4AndJS, -'or',Bool32x4OrJS, -'xor',Bool32x4XorJS, -'not',Bool32x4NotJS, -'anyTrue',Bool32x4AnyTrueJS, -'allTrue',Bool32x4AllTrueJS, -'swizzle',Bool32x4SwizzleJS, -'shuffle',Bool32x4ShuffleJS, -]); -b.InstallFunctions(g,2,[ -'splat',Int16x8Splat, -'check',Int16x8CheckJS, -'extractLane',Int16x8ExtractLaneJS, -'replaceLane',Int16x8ReplaceLaneJS, -'neg',Int16x8NegJS, -'add',Int16x8AddJS, -'sub',Int16x8SubJS, -'addSaturate',Int16x8AddSaturateJS, -'subSaturate',Int16x8SubSaturateJS, -'mul',Int16x8MulJS, -'min',Int16x8MinJS, -'max',Int16x8MaxJS, -'and',Int16x8AndJS, -'or',Int16x8OrJS, -'xor',Int16x8XorJS, -'not',Int16x8NotJS, -'shiftLeftByScalar',Int16x8ShiftLeftByScalarJS, -'shiftRightByScalar',Int16x8ShiftRightByScalarJS, -'lessThan',Int16x8LessThanJS, -'lessThanOrEqual',Int16x8LessThanOrEqualJS, -'greaterThan',Int16x8GreaterThanJS, -'greaterThanOrEqual',Int16x8GreaterThanOrEqualJS, -'equal',Int16x8EqualJS, -'notEqual',Int16x8NotEqualJS, -'select',Int16x8SelectJS, -'swizzle',Int16x8SwizzleJS, -'shuffle',Int16x8ShuffleJS, -'fromUint16x8',Int16x8FromUint16x8JS, -'fromFloat32x4Bits',Int16x8FromFloat32x4BitsJS, -'fromInt32x4Bits',Int16x8FromInt32x4BitsJS, -'fromUint32x4Bits',Int16x8FromUint32x4BitsJS, -'fromUint16x8Bits',Int16x8FromUint16x8BitsJS, -'fromInt8x16Bits',Int16x8FromInt8x16BitsJS, -'fromUint8x16Bits',Int16x8FromUint8x16BitsJS, -'load',Int16x8LoadJS, -'store',Int16x8StoreJS, -]); -b.InstallFunctions(j,2,[ -'splat',Uint16x8Splat, -'check',Uint16x8CheckJS, -'extractLane',Uint16x8ExtractLaneJS, -'replaceLane',Uint16x8ReplaceLaneJS, -'add',Uint16x8AddJS, -'sub',Uint16x8SubJS, -'addSaturate',Uint16x8AddSaturateJS, -'subSaturate',Uint16x8SubSaturateJS, -'mul',Uint16x8MulJS, -'min',Uint16x8MinJS, -'max',Uint16x8MaxJS, -'and',Uint16x8AndJS, -'or',Uint16x8OrJS, -'xor',Uint16x8XorJS, -'not',Uint16x8NotJS, -'shiftLeftByScalar',Uint16x8ShiftLeftByScalarJS, -'shiftRightByScalar',Uint16x8ShiftRightByScalarJS, -'lessThan',Uint16x8LessThanJS, -'lessThanOrEqual',Uint16x8LessThanOrEqualJS, -'greaterThan',Uint16x8GreaterThanJS, -'greaterThanOrEqual',Uint16x8GreaterThanOrEqualJS, -'equal',Uint16x8EqualJS, -'notEqual',Uint16x8NotEqualJS, -'select',Uint16x8SelectJS, -'swizzle',Uint16x8SwizzleJS, -'shuffle',Uint16x8ShuffleJS, -'fromInt16x8',Uint16x8FromInt16x8JS, -'fromFloat32x4Bits',Uint16x8FromFloat32x4BitsJS, -'fromInt32x4Bits',Uint16x8FromInt32x4BitsJS, -'fromUint32x4Bits',Uint16x8FromUint32x4BitsJS, -'fromInt16x8Bits',Uint16x8FromInt16x8BitsJS, -'fromInt8x16Bits',Uint16x8FromInt8x16BitsJS, -'fromUint8x16Bits',Uint16x8FromUint8x16BitsJS, -'load',Uint16x8LoadJS, -'store',Uint16x8StoreJS, -]); -b.InstallFunctions(m,2,[ -'splat',Bool16x8Splat, -'check',Bool16x8CheckJS, -'extractLane',Bool16x8ExtractLaneJS, -'replaceLane',Bool16x8ReplaceLaneJS, -'and',Bool16x8AndJS, -'or',Bool16x8OrJS, -'xor',Bool16x8XorJS, -'not',Bool16x8NotJS, -'anyTrue',Bool16x8AnyTrueJS, -'allTrue',Bool16x8AllTrueJS, -'swizzle',Bool16x8SwizzleJS, -'shuffle',Bool16x8ShuffleJS, -]); -b.InstallFunctions(h,2,[ -'splat',Int8x16Splat, -'check',Int8x16CheckJS, -'extractLane',Int8x16ExtractLaneJS, -'replaceLane',Int8x16ReplaceLaneJS, -'neg',Int8x16NegJS, -'add',Int8x16AddJS, -'sub',Int8x16SubJS, -'addSaturate',Int8x16AddSaturateJS, -'subSaturate',Int8x16SubSaturateJS, -'mul',Int8x16MulJS, -'min',Int8x16MinJS, -'max',Int8x16MaxJS, -'and',Int8x16AndJS, -'or',Int8x16OrJS, -'xor',Int8x16XorJS, -'not',Int8x16NotJS, -'shiftLeftByScalar',Int8x16ShiftLeftByScalarJS, -'shiftRightByScalar',Int8x16ShiftRightByScalarJS, -'lessThan',Int8x16LessThanJS, -'lessThanOrEqual',Int8x16LessThanOrEqualJS, -'greaterThan',Int8x16GreaterThanJS, -'greaterThanOrEqual',Int8x16GreaterThanOrEqualJS, -'equal',Int8x16EqualJS, -'notEqual',Int8x16NotEqualJS, -'select',Int8x16SelectJS, -'swizzle',Int8x16SwizzleJS, -'shuffle',Int8x16ShuffleJS, -'fromUint8x16',Int8x16FromUint8x16JS, -'fromFloat32x4Bits',Int8x16FromFloat32x4BitsJS, -'fromInt32x4Bits',Int8x16FromInt32x4BitsJS, -'fromUint32x4Bits',Int8x16FromUint32x4BitsJS, -'fromInt16x8Bits',Int8x16FromInt16x8BitsJS, -'fromUint16x8Bits',Int8x16FromUint16x8BitsJS, -'fromUint8x16Bits',Int8x16FromUint8x16BitsJS, -'load',Int8x16LoadJS, -'store',Int8x16StoreJS, -]); -b.InstallFunctions(k,2,[ -'splat',Uint8x16Splat, -'check',Uint8x16CheckJS, -'extractLane',Uint8x16ExtractLaneJS, -'replaceLane',Uint8x16ReplaceLaneJS, -'add',Uint8x16AddJS, -'sub',Uint8x16SubJS, -'addSaturate',Uint8x16AddSaturateJS, -'subSaturate',Uint8x16SubSaturateJS, -'mul',Uint8x16MulJS, -'min',Uint8x16MinJS, -'max',Uint8x16MaxJS, -'and',Uint8x16AndJS, -'or',Uint8x16OrJS, -'xor',Uint8x16XorJS, -'not',Uint8x16NotJS, -'shiftLeftByScalar',Uint8x16ShiftLeftByScalarJS, -'shiftRightByScalar',Uint8x16ShiftRightByScalarJS, -'lessThan',Uint8x16LessThanJS, -'lessThanOrEqual',Uint8x16LessThanOrEqualJS, -'greaterThan',Uint8x16GreaterThanJS, -'greaterThanOrEqual',Uint8x16GreaterThanOrEqualJS, -'equal',Uint8x16EqualJS, -'notEqual',Uint8x16NotEqualJS, -'select',Uint8x16SelectJS, -'swizzle',Uint8x16SwizzleJS, -'shuffle',Uint8x16ShuffleJS, -'fromInt8x16',Uint8x16FromInt8x16JS, -'fromFloat32x4Bits',Uint8x16FromFloat32x4BitsJS, -'fromInt32x4Bits',Uint8x16FromInt32x4BitsJS, -'fromUint32x4Bits',Uint8x16FromUint32x4BitsJS, -'fromInt16x8Bits',Uint8x16FromInt16x8BitsJS, -'fromUint16x8Bits',Uint8x16FromUint16x8BitsJS, -'fromInt8x16Bits',Uint8x16FromInt8x16BitsJS, -'load',Uint8x16LoadJS, -'store',Uint8x16StoreJS, -]); -b.InstallFunctions(n,2,[ -'splat',Bool8x16Splat, -'check',Bool8x16CheckJS, -'extractLane',Bool8x16ExtractLaneJS, -'replaceLane',Bool8x16ReplaceLaneJS, -'and',Bool8x16AndJS, -'or',Bool8x16OrJS, -'xor',Bool8x16XorJS, -'not',Bool8x16NotJS, -'anyTrue',Bool8x16AnyTrueJS, -'allTrue',Bool8x16AllTrueJS, -'swizzle',Bool8x16SwizzleJS, -'shuffle',Bool8x16ShuffleJS, -]); -}) - -Xharmony-string-paddingY -(function(a,b){ -%CheckIsBootstrapping(); -var c=a.String; -function StringPad(d,e,f){ -e=(%_ToLength(e)); -var g=d.length; -if(e<=g)return""; -if((f===(void 0))){ -f=" "; -}else{ -f=(%_ToString(f)); -if(f===""){ -return""; -} -} -var h=e-g; -var i=(h/f.length)|0; -var j=(h-f.length*i)|0; -var k=""; -while(true){ -if(i&1)k+=f; -i>>=1; -if(i===0)break; -f+=f; -} -if(j){ -k+=%_SubString(f,0,j); -} -return k; -} -function StringPadStart(e,f){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.padStart") -var d=(%_ToString(this)); -return StringPad(d,e,f)+d; -} -%FunctionSetLength(StringPadStart,1); -function StringPadEnd(e,f){ -if((%IS_VAR(this)===null)||(this===(void 0)))throw %make_type_error(17,"String.prototype.padEnd") -var d=(%_ToString(this)); -return d+StringPad(d,e,f); -} -%FunctionSetLength(StringPadEnd,1); -b.InstallFunctions(c.prototype,2,[ -"padStart",StringPadStart, -"padEnd",StringPadEnd -]); -}); - -`datetime-format-to-partsé -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.Intl; -var d=b.ImportNow("FormatDateToParts"); -b.InstallFunctions(c.DateTimeFormat.prototype,2,[ -'formatToParts',d -]); -}) - -@icu-case-mapping± -(function(a,b){ -"use strict"; -%CheckIsBootstrapping(); -var c=a.String; -var d=b.OverrideFunction; -var e=b.ImportNow("ToLowerCaseI18N"); -var f=b.ImportNow("ToUpperCaseI18N"); -var g=b.ImportNow("ToLocaleLowerCaseI18N"); -var h=b.ImportNow("ToLocaleUpperCaseI18N"); -d(c.prototype,'toLowerCase',e,true); -d(c.prototype,'toUpperCase',f,true); -d(c.prototype,'toLocaleLowerCase', -g,true); -d(c.prototype,'toLocaleUpperCase', -h,true); -}) - - dByteLengthQueuingStrategyÑ -(function(global, binding, v8) { - 'use strict'; - const defineProperty = global.Object.defineProperty; - class ByteLengthQueuingStrategy { - constructor(options) { - defineProperty(this, 'highWaterMark', { - value: options.highWaterMark, - enumerable: true, - configurable: true, - writable: true - }); - } - size(chunk) { return chunk.byteLength; } - } - defineProperty(global, 'ByteLengthQueuingStrategy', { - value: ByteLengthQueuingStrategy, - enumerable: false, - configurable: true, - writable: true - }); -}); -PCountQueuingStrategyý -(function(global, binding, v8) { - 'use strict'; - const defineProperty = global.Object.defineProperty; - class CountQueuingStrategy { - constructor(options) { - defineProperty(this, 'highWaterMark', { - value: options.highWaterMark, - enumerable: true, - configurable: true, - writable: true - }); - } - size(chunk) { return 1; } - } - defineProperty(global, 'CountQueuingStrategy', { - value: CountQueuingStrategy, - enumerable: false, - configurable: true, - writable: true - }); - class BuiltInCountQueuingStrategy { - constructor(highWaterMark) { - defineProperty(this, 'highWaterMark', {value: highWaterMark}); - } - size(chunk) { return 1; } - } - binding.createBuiltInCountQueuingStrategy = highWaterMark => - new BuiltInCountQueuingStrategy(highWaterMark); -}); -8ReadableStream6Ý -(function(global, binding, v8) { - 'use strict'; - const readableStreamReader = v8.createPrivateSymbol('[[reader]]'); - const readableStreamStoredError = v8.createPrivateSymbol('[[storedError]]'); - const readableStreamController = v8.createPrivateSymbol('[[controller]]'); - const readableStreamReaderClosedPromise = - v8.createPrivateSymbol('[[closedPromise]]'); - const readableStreamReaderOwnerReadableStream = - v8.createPrivateSymbol('[[ownerReadableStream]]'); - const readableStreamDefaultReaderReadRequests = - v8.createPrivateSymbol('[[readRequests]]'); - const createWithExternalControllerSentinel = - v8.createPrivateSymbol('flag for UA-created ReadableStream to pass'); - const readableStreamBits = v8.createPrivateSymbol('bit field for [[state]] and [[disturbed]]'); - const DISTURBED = 0b1; - const STATE_MASK = 0b110; - const STATE_BITS_OFFSET = 1; - const STATE_READABLE = 0; - const STATE_CLOSED = 1; - const STATE_ERRORED = 2; - const readableStreamDefaultControllerUnderlyingSource = - v8.createPrivateSymbol('[[underlyingSource]]'); - const readableStreamDefaultControllerControlledReadableStream = - v8.createPrivateSymbol('[[controlledReadableStream]]'); - const readableStreamDefaultControllerQueue = v8.createPrivateSymbol('[[queue]]'); - const readableStreamDefaultControllerQueueSize = - v8.createPrivateSymbol('[[queue]] total size'); - const readableStreamDefaultControllerStrategySize = - v8.createPrivateSymbol('[[strategySize]]'); - const readableStreamDefaultControllerStrategyHWM = - v8.createPrivateSymbol('[[strategyHWM]]'); - const readableStreamDefaultControllerBits = v8.createPrivateSymbol( - 'bit field for [[started]], [[closeRequested]], [[pulling]], [[pullAgain]]'); - const STARTED = 0b1; - const CLOSE_REQUESTED = 0b10; - const PULLING = 0b100; - const PULL_AGAIN = 0b1000; - const EXTERNALLY_CONTROLLED = 0b10000; - const readableStreamControllerCancel = - v8.createPrivateSymbol('[[InternalCancel]]'); - const readableStreamControllerPull = v8.createPrivateSymbol('[[InternalPull]]'); - const undefined = global.undefined; - const Infinity = global.Infinity; - const defineProperty = global.Object.defineProperty; - const hasOwnProperty = v8.uncurryThis(global.Object.hasOwnProperty); - const callFunction = v8.uncurryThis(global.Function.prototype.call); - const TypeError = global.TypeError; - const RangeError = global.RangeError; - const Number = global.Number; - const Number_isNaN = Number.isNaN; - const Number_isFinite = Number.isFinite; - const Promise = global.Promise; - const thenPromise = v8.uncurryThis(Promise.prototype.then); - const Promise_resolve = v8.simpleBind(Promise.resolve, Promise); - const Promise_reject = v8.simpleBind(Promise.reject, Promise); - const errIllegalInvocation = 'Illegal invocation'; - const errIllegalConstructor = 'Illegal constructor'; - const errCancelLockedStream = - 'Cannot cancel a readable stream that is locked to a reader'; - const errEnqueueCloseRequestedStream = - 'Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed'; - const errCancelReleasedReader = - 'This readable stream reader has been released and cannot be used to cancel its previous owner stream'; - const errReadReleasedReader = - 'This readable stream reader has been released and cannot be used to read from its previous owner stream'; - const errCloseCloseRequestedStream = - 'Cannot close a readable stream that has already been requested to be closed'; - const errEnqueueClosedStream = 'Cannot enqueue a chunk into a closed readable stream'; - const errEnqueueErroredStream = 'Cannot enqueue a chunk into an errored readable stream'; - const errCloseClosedStream = 'Cannot close a closed readable stream'; - const errCloseErroredStream = 'Cannot close an errored readable stream'; - const errErrorClosedStream = 'Cannot error a close readable stream'; - const errErrorErroredStream = - 'Cannot error a readable stream that is already errored'; - const errGetReaderNotByteStream = 'This readable stream does not support BYOB readers'; - const errGetReaderBadMode = 'Invalid reader mode given: expected undefined or "byob"'; - const errReaderConstructorBadArgument = - 'ReadableStreamReader constructor argument is not a readable stream'; - const errReaderConstructorStreamAlreadyLocked = - 'ReadableStreamReader constructor can only accept readable streams that are not yet locked to a reader'; - const errReleaseReaderWithPendingRead = - 'Cannot release a readable stream reader when it still has outstanding read() calls that have not yet settled'; - const errReleasedReaderClosedPromise = - 'This readable stream reader has been released and cannot be used to monitor the stream\'s state'; - const errInvalidSize = - 'The return value of a queuing strategy\'s size function must be a finite, non-NaN, non-negative number'; - const errSizeNotAFunction = - 'A queuing strategy\'s size property must be a function'; - const errInvalidHWM = - 'A queueing strategy\'s highWaterMark property must be a nonnegative, non-NaN number'; - const errTmplMustBeFunctionOrUndefined = name => - `${name} must be a function or undefined`; - class ReadableStream { - constructor() { - const underlyingSource = arguments[0] === undefined ? {} : arguments[0]; - const strategy = arguments[1] === undefined ? {} : arguments[1]; - const size = strategy.size; - let highWaterMark = strategy.highWaterMark; - if (highWaterMark === undefined) { - highWaterMark = 1; - } - this[readableStreamBits] = 0b0; - ReadableStreamSetState(this, STATE_READABLE); - this[readableStreamReader] = undefined; - this[readableStreamStoredError] = undefined; - this[readableStreamController] = undefined; - const type = underlyingSource.type; - const typeString = String(type); - if (typeString === 'bytes') { - throw new RangeError('bytes type is not yet implemented'); - } else if (type !== undefined) { - throw new RangeError('Invalid type is specified'); - } - this[readableStreamController] = - new ReadableStreamDefaultController(this, underlyingSource, size, highWaterMark, arguments[2] === createWithExternalControllerSentinel); - } - get locked() { - if (IsReadableStream(this) === false) { - throw new TypeError(errIllegalInvocation); - } - return IsReadableStreamLocked(this); - } - cancel(reason) { - if (IsReadableStream(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - if (IsReadableStreamLocked(this) === true) { - return Promise_reject(new TypeError(errCancelLockedStream)); - } - return ReadableStreamCancel(this, reason); - } - getReader({ mode } = {}) { - if (IsReadableStream(this) === false) { - throw new TypeError(errIllegalInvocation); - } - if (mode === 'byob') { - if (IsReadableByteStreamDefaultController(this[readableStreamController]) === false) { - throw new TypeError(errGetReaderNotByteStream); - } - return AcquireReadableStreamBYOBReader(this); - } - if (mode === undefined) { - return AcquireReadableStreamDefaultReader(this); - } - throw new RangeError(errGetReaderBadMode); - } - tee() { - if (IsReadableStream(this) === false) { - throw new TypeError(errIllegalInvocation); - } - return ReadableStreamTee(this); - } - } - class ReadableStreamDefaultController { - constructor(stream, underlyingSource, size, highWaterMark, isExternallyControlled) { - if (IsReadableStream(stream) === false) { - throw new TypeError(errIllegalConstructor); - } - if (stream[readableStreamController] !== undefined) { - throw new TypeError(errIllegalConstructor); - } - this[readableStreamDefaultControllerControlledReadableStream] = stream; - this[readableStreamDefaultControllerUnderlyingSource] = underlyingSource; - this[readableStreamDefaultControllerQueue] = new v8.InternalPackedArray(); - this[readableStreamDefaultControllerQueueSize] = 0; - this[readableStreamDefaultControllerBits] = 0b0; - if (isExternallyControlled === true) { - this[readableStreamDefaultControllerBits] |= EXTERNALLY_CONTROLLED; - } - const normalizedStrategy = - ValidateAndNormalizeQueuingStrategy(size, highWaterMark); - this[readableStreamDefaultControllerStrategySize] = normalizedStrategy.size; - this[readableStreamDefaultControllerStrategyHWM] = normalizedStrategy.highWaterMark; - const controller = this; - const startResult = CallOrNoop( - underlyingSource, 'start', this, 'underlyingSource.start'); - thenPromise(Promise_resolve(startResult), - () => { - controller[readableStreamDefaultControllerBits] |= STARTED; - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - }, - r => { - if (ReadableStreamGetState(stream) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, r); - } - }); - } - get desiredSize() { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - return ReadableStreamDefaultControllerGetDesiredSize(this); - } - close() { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamDefaultControllerControlledReadableStream]; - if (this[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { - throw new TypeError(errCloseCloseRequestedStream); - } - const state = ReadableStreamGetState(stream); - if (state === STATE_ERRORED) { - throw new TypeError(errCloseErroredStream); - } - if (state === STATE_CLOSED) { - throw new TypeError(errCloseClosedStream); - } - return ReadableStreamDefaultControllerClose(this); - } - enqueue(chunk) { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamDefaultControllerControlledReadableStream]; - if (this[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { - throw new TypeError(errEnqueueCloseRequestedStream); - } - const state = ReadableStreamGetState(stream); - if (state === STATE_ERRORED) { - throw new TypeError(errEnqueueErroredStream); - } - if (state === STATE_CLOSED) { - throw new TypeError(errEnqueueClosedStream); - } - return ReadableStreamDefaultControllerEnqueue(this, chunk); - } - error(e) { - if (IsReadableStreamDefaultController(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamDefaultControllerControlledReadableStream]; - const state = ReadableStreamGetState(stream); - if (state === STATE_ERRORED) { - throw new TypeError(errErrorErroredStream); - } - if (state === STATE_CLOSED) { - throw new TypeError(errErrorClosedStream); - } - return ReadableStreamDefaultControllerError(this, e); - } - } - function ReadableStreamDefaultControllerCancel(controller, reason) { - controller[readableStreamDefaultControllerQueue] = new v8.InternalPackedArray(); - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - return PromiseCallOrNoop(underlyingSource, 'cancel', reason, 'underlyingSource.cancel'); - } - function ReadableStreamDefaultControllerPull(controller) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - if (controller[readableStreamDefaultControllerQueue].length > 0) { - const chunk = DequeueValue(controller); - if ((controller[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) && - controller[readableStreamDefaultControllerQueue].length === 0) { - ReadableStreamClose(stream); - } else { - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - return Promise_resolve(CreateIterResultObject(chunk, false)); - } - const pendingPromise = ReadableStreamAddReadRequest(stream); - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - return pendingPromise; - } - function ReadableStreamAddReadRequest(stream) { - const promise = v8.createPromise(); - stream[readableStreamReader][readableStreamDefaultReaderReadRequests].push(promise); - return promise; - } - class ReadableStreamDefaultReader { - constructor(stream) { - if (IsReadableStream(stream) === false) { - throw new TypeError(errReaderConstructorBadArgument); - } - if (IsReadableStreamLocked(stream) === true) { - throw new TypeError(errReaderConstructorStreamAlreadyLocked); - } - ReadableStreamReaderGenericInitialize(this, stream); - this[readableStreamDefaultReaderReadRequests] = new v8.InternalPackedArray(); - } - get closed() { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - return this[readableStreamReaderClosedPromise]; - } - cancel(reason) { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - const stream = this[readableStreamReaderOwnerReadableStream]; - if (stream === undefined) { - return Promise_reject(new TypeError(errCancelReleasedReader)); - } - return ReadableStreamReaderGenericCancel(this, reason); - } - read() { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise_reject(new TypeError(errIllegalInvocation)); - } - if (this[readableStreamReaderOwnerReadableStream] === undefined) { - return Promise_reject(new TypeError(errReadReleasedReader)); - } - return ReadableStreamDefaultReaderRead(this); - } - releaseLock() { - if (IsReadableStreamDefaultReader(this) === false) { - throw new TypeError(errIllegalInvocation); - } - const stream = this[readableStreamReaderOwnerReadableStream]; - if (stream === undefined) { - return undefined; - } - if (this[readableStreamDefaultReaderReadRequests].length > 0) { - throw new TypeError(errReleaseReaderWithPendingRead); - } - ReadableStreamReaderGenericRelease(this); - } - } - function ReadableStreamReaderGenericCancel(reader, reason) { - return ReadableStreamCancel(reader[readableStreamReaderOwnerReadableStream], reason); - } - function AcquireReadableStreamDefaultReader(stream) { - return new ReadableStreamDefaultReader(stream); - } - function ReadableStreamCancel(stream, reason) { - stream[readableStreamBits] |= DISTURBED; - const state = ReadableStreamGetState(stream); - if (state === STATE_CLOSED) { - return Promise_resolve(undefined); - } - if (state === STATE_ERRORED) { - return Promise_reject(stream[readableStreamStoredError]); - } - ReadableStreamClose(stream); - const sourceCancelPromise = ReadableStreamDefaultControllerCancel(stream[readableStreamController], reason); - return thenPromise(sourceCancelPromise, () => undefined); - } - function ReadableStreamDefaultControllerClose(controller) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - controller[readableStreamDefaultControllerBits] |= CLOSE_REQUESTED; - if (controller[readableStreamDefaultControllerQueue].length === 0) { - ReadableStreamClose(stream); - } - } - function ReadableStreamFulfillReadRequest(stream, chunk, done) { - const reader = stream[readableStreamReader]; - const readRequest = - stream[readableStreamReader][readableStreamDefaultReaderReadRequests] - .shift(); - v8.resolvePromise(readRequest, CreateIterResultObject(chunk, done)); - } - function ReadableStreamDefaultControllerEnqueue(controller, chunk) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - ReadableStreamFulfillReadRequest(stream, chunk, false); - } else { - let chunkSize = 1; - const strategySize = controller[readableStreamDefaultControllerStrategySize]; - if (strategySize !== undefined) { - try { - chunkSize = strategySize(chunk); - } catch (chunkSizeE) { - if (ReadableStreamGetState(stream) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, chunkSizeE); - } - throw chunkSizeE; - } - } - try { - EnqueueValueWithSize(controller, chunk, chunkSize); - } catch (enqueueE) { - if (ReadableStreamGetState(stream) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, enqueueE); - } - throw enqueueE; - } - } - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - function ReadableStreamGetState(stream) { - return (stream[readableStreamBits] & STATE_MASK) >> STATE_BITS_OFFSET; - } - function ReadableStreamSetState(stream, state) { - stream[readableStreamBits] = (stream[readableStreamBits] & ~STATE_MASK) | - (state << STATE_BITS_OFFSET); - } - function ReadableStreamDefaultControllerError(controller, e) { - controller[readableStreamDefaultControllerQueue] = new v8.InternalPackedArray(); - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - ReadableStreamError(stream, e); - } - function ReadableStreamError(stream, e) { - stream[readableStreamStoredError] = e; - ReadableStreamSetState(stream, STATE_ERRORED); - const reader = stream[readableStreamReader]; - if (reader === undefined) { - return undefined; - } - if (IsReadableStreamDefaultReader(reader) === true) { - const readRequests = reader[readableStreamDefaultReaderReadRequests]; - for (let i = 0; i < readRequests.length; i++) { - v8.rejectPromise(readRequests[i], e); - } - reader[readableStreamDefaultReaderReadRequests] = new v8.InternalPackedArray(); - } - v8.rejectPromise(reader[readableStreamReaderClosedPromise], e); - } - function ReadableStreamClose(stream) { - ReadableStreamSetState(stream, STATE_CLOSED); - const reader = stream[readableStreamReader]; - if (reader === undefined) { - return undefined; - } - if (IsReadableStreamDefaultReader(reader) === true) { - const readRequests = reader[readableStreamDefaultReaderReadRequests]; - for (let i = 0; i < readRequests.length; i++) { - v8.resolvePromise( - readRequests[i], CreateIterResultObject(undefined, true)); - } - reader[readableStreamDefaultReaderReadRequests] = new v8.InternalPackedArray(); - } - v8.resolvePromise(reader[readableStreamReaderClosedPromise], undefined); - } - function ReadableStreamDefaultControllerGetDesiredSize(controller) { - const queueSize = GetTotalQueueSize(controller); - return controller[readableStreamDefaultControllerStrategyHWM] - queueSize; - } - function IsReadableStream(x) { - return hasOwnProperty(x, readableStreamController); - } - function IsReadableStreamDisturbed(stream) { - return stream[readableStreamBits] & DISTURBED; - } - function IsReadableStreamLocked(stream) { - return stream[readableStreamReader] !== undefined; - } - function IsReadableStreamDefaultController(x) { - return hasOwnProperty(x, readableStreamDefaultControllerControlledReadableStream); - } - function IsReadableStreamDefaultReader(x) { - return hasOwnProperty(x, readableStreamDefaultReaderReadRequests); - } - function IsReadableStreamReadable(stream) { - return ReadableStreamGetState(stream) === STATE_READABLE; - } - function IsReadableStreamClosed(stream) { - return ReadableStreamGetState(stream) === STATE_CLOSED; - } - function IsReadableStreamErrored(stream) { - return ReadableStreamGetState(stream) === STATE_ERRORED; - } - function ReadableStreamReaderGenericInitialize(reader, stream) { - const controller = stream[readableStreamController]; - if (controller[readableStreamDefaultControllerBits] & EXTERNALLY_CONTROLLED) { - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - callFunction(underlyingSource.notifyLockAcquired, underlyingSource); - } - reader[readableStreamReaderOwnerReadableStream] = stream; - stream[readableStreamReader] = reader; - switch (ReadableStreamGetState(stream)) { - case STATE_READABLE: - reader[readableStreamReaderClosedPromise] = v8.createPromise(); - break; - case STATE_CLOSED: - reader[readableStreamReaderClosedPromise] = Promise_resolve(undefined); - break; - case STATE_ERRORED: - reader[readableStreamReaderClosedPromise] = - Promise_reject(stream[readableStreamStoredError]); - break; - } - } - function ReadableStreamReaderGenericRelease(reader) { - const controller = reader[readableStreamReaderOwnerReadableStream][readableStreamController]; - if (controller[readableStreamDefaultControllerBits] & EXTERNALLY_CONTROLLED) { - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - callFunction(underlyingSource.notifyLockReleased, underlyingSource); - } - if (ReadableStreamGetState(reader[readableStreamReaderOwnerReadableStream]) === STATE_READABLE) { - v8.rejectPromise(reader[readableStreamReaderClosedPromise], new TypeError(errReleasedReaderClosedPromise)); - } else { - reader[readableStreamReaderClosedPromise] = Promise_reject(new TypeError(errReleasedReaderClosedPromise)); - } - reader[readableStreamReaderOwnerReadableStream][readableStreamReader] = - undefined; - reader[readableStreamReaderOwnerReadableStream] = undefined; - } - function ReadableStreamDefaultReaderRead(reader) { - const stream = reader[readableStreamReaderOwnerReadableStream]; - stream[readableStreamBits] |= DISTURBED; - if (ReadableStreamGetState(stream) === STATE_CLOSED) { - return Promise_resolve(CreateIterResultObject(undefined, true)); - } - if (ReadableStreamGetState(stream) === STATE_ERRORED) { - return Promise_reject(stream[readableStreamStoredError]); - } - return ReadableStreamDefaultControllerPull(stream[readableStreamController]); - } - function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { - const shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); - if (shouldPull === false) { - return undefined; - } - if (controller[readableStreamDefaultControllerBits] & PULLING) { - controller[readableStreamDefaultControllerBits] |= PULL_AGAIN; - return undefined; - } - controller[readableStreamDefaultControllerBits] |= PULLING; - const underlyingSource = controller[readableStreamDefaultControllerUnderlyingSource]; - const pullPromise = PromiseCallOrNoop( - underlyingSource, 'pull', controller, 'underlyingSource.pull'); - thenPromise(pullPromise, - () => { - controller[readableStreamDefaultControllerBits] &= ~PULLING; - if (controller[readableStreamDefaultControllerBits] & PULL_AGAIN) { - controller[readableStreamDefaultControllerBits] &= ~PULL_AGAIN; - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - }, - e => { - if (ReadableStreamGetState(controller[readableStreamDefaultControllerControlledReadableStream]) === STATE_READABLE) { - ReadableStreamDefaultControllerError(controller, e); - } - }); - } - function ReadableStreamDefaultControllerShouldCallPull(controller) { - const stream = controller[readableStreamDefaultControllerControlledReadableStream]; - const state = ReadableStreamGetState(stream); - if (state === STATE_CLOSED || state === STATE_ERRORED) { - return false; - } - if (controller[readableStreamDefaultControllerBits] & CLOSE_REQUESTED) { - return false; - } - if (!(controller[readableStreamDefaultControllerBits] & STARTED)) { - return false; - } - if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - return true; - } - const desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); - if (desiredSize > 0) { - return true; - } - return false; - } - function ReadableStreamGetNumReadRequests(stream) { - const reader = stream[readableStreamReader]; - const readRequests = reader[readableStreamDefaultReaderReadRequests]; - return readRequests.length; - } - function ReadableStreamTee(stream) { - const reader = AcquireReadableStreamDefaultReader(stream); - let closedOrErrored = false; - let canceled1 = false; - let canceled2 = false; - let reason1; - let reason2; - let promise = v8.createPromise(); - const branch1Stream = new ReadableStream({pull, cancel: cancel1}); - const branch2Stream = new ReadableStream({pull, cancel: cancel2}); - const branch1 = branch1Stream[readableStreamController]; - const branch2 = branch2Stream[readableStreamController]; - thenPromise( - reader[readableStreamReaderClosedPromise], undefined, function(r) { - if (closedOrErrored === true) { - return; - } - ReadableStreamDefaultControllerError(branch1, r); - ReadableStreamDefaultControllerError(branch2, r); - closedOrErrored = true; - }); - return [branch1Stream, branch2Stream]; - function pull() { - return thenPromise( - ReadableStreamDefaultReaderRead(reader), function(result) { - const value = result.value; - const done = result.done; - if (done === true && closedOrErrored === false) { - if (canceled1 === false) { - ReadableStreamDefaultControllerClose(branch1); - } - if (canceled2 === false) { - ReadableStreamDefaultControllerClose(branch2); - } - closedOrErrored = true; - } - if (closedOrErrored === true) { - return; - } - if (canceled1 === false) { - ReadableStreamDefaultControllerEnqueue(branch1, value); - } - if (canceled2 === false) { - ReadableStreamDefaultControllerEnqueue(branch2, value); - } - }); - } - function cancel1(reason) { - canceled1 = true; - reason1 = reason; - if (canceled2 === true) { - const compositeReason = [reason1, reason2]; - const cancelResult = ReadableStreamCancel(stream, compositeReason); - v8.resolvePromise(promise, cancelResult); - } - return promise; - } - function cancel2(reason) { - canceled2 = true; - reason2 = reason; - if (canceled1 === true) { - const compositeReason = [reason1, reason2]; - const cancelResult = ReadableStreamCancel(stream, compositeReason); - v8.resolvePromise(promise, cancelResult); - } - return promise; - } - } - function DequeueValue(controller) { - const result = controller[readableStreamDefaultControllerQueue].shift(); - controller[readableStreamDefaultControllerQueueSize] -= result.size; - return result.value; - } - function EnqueueValueWithSize(controller, value, size) { - size = Number(size); - if (Number_isNaN(size) || size === +Infinity || size < 0) { - throw new RangeError(errInvalidSize); - } - controller[readableStreamDefaultControllerQueueSize] += size; - controller[readableStreamDefaultControllerQueue].push({value, size}); - } - function GetTotalQueueSize(controller) { return controller[readableStreamDefaultControllerQueueSize]; } - function ValidateAndNormalizeQueuingStrategy(size, highWaterMark) { - if (size !== undefined && typeof size !== 'function') { - throw new TypeError(errSizeNotAFunction); - } - highWaterMark = Number(highWaterMark); - if (Number_isNaN(highWaterMark)) { - throw new TypeError(errInvalidHWM); - } - if (highWaterMark < 0) { - throw new RangeError(errInvalidHWM); - } - return {size, highWaterMark}; - } - function CallOrNoop(O, P, arg, nameForError) { - const method = O[P]; - if (method === undefined) { - return undefined; - } - if (typeof method !== 'function') { - throw new TypeError(errTmplMustBeFunctionOrUndefined(nameForError)); - } - return callFunction(method, O, arg); - } - function PromiseCallOrNoop(O, P, arg, nameForError) { - let method; - try { - method = O[P]; - } catch (methodE) { - return Promise_reject(methodE); - } - if (method === undefined) { - return Promise_resolve(undefined); - } - if (typeof method !== 'function') { - return Promise_reject(new TypeError(errTmplMustBeFunctionOrUndefined(nameForError))); - } - try { - return Promise_resolve(callFunction(method, O, arg)); - } catch (e) { - return Promise_reject(e); - } - } - function CreateIterResultObject(value, done) { return {value, done}; } - defineProperty(global, 'ReadableStream', { - value: ReadableStream, - enumerable: false, - configurable: true, - writable: true - }); - binding.AcquireReadableStreamDefaultReader = AcquireReadableStreamDefaultReader; - binding.IsReadableStream = IsReadableStream; - binding.IsReadableStreamDisturbed = IsReadableStreamDisturbed; - binding.IsReadableStreamLocked = IsReadableStreamLocked; - binding.IsReadableStreamReadable = IsReadableStreamReadable; - binding.IsReadableStreamClosed = IsReadableStreamClosed; - binding.IsReadableStreamErrored = IsReadableStreamErrored; - binding.IsReadableStreamDefaultReader = IsReadableStreamDefaultReader; - binding.ReadableStreamDefaultReaderRead = ReadableStreamDefaultReaderRead; - binding.ReadableStreamTee = ReadableStreamTee; - binding.ReadableStreamDefaultControllerClose = ReadableStreamDefaultControllerClose; - binding.ReadableStreamDefaultControllerGetDesiredSize = ReadableStreamDefaultControllerGetDesiredSize; - binding.ReadableStreamDefaultControllerEnqueue = ReadableStreamDefaultControllerEnqueue; - binding.ReadableStreamDefaultControllerError = ReadableStreamDefaultControllerError; - binding.createReadableStreamWithExternalController = - (underlyingSource, strategy) => { - return new ReadableStream( - underlyingSource, strategy, createWithExternalControllerSentinel); - }; -}); -dummy<(function() {}) \ No newline at end of file diff --git a/demos/SimpleOSRBrowser/snapshot_blob.bin b/demos/SimpleOSRBrowser/snapshot_blob.bin deleted file mode 100644 index f47dfc7c..00000000 Binary files a/demos/SimpleOSRBrowser/snapshot_blob.bin and /dev/null differ diff --git a/demos/SimpleOSRBrowser/uSimpleOSRBrowser.dfm b/demos/SimpleOSRBrowser/uSimpleOSRBrowser.dfm deleted file mode 100644 index d3caf925..00000000 --- a/demos/SimpleOSRBrowser/uSimpleOSRBrowser.dfm +++ /dev/null @@ -1,80 +0,0 @@ -object Form1: TForm1 - Left = 0 - Top = 0 - Caption = 'Simple OSR Browser' - ClientHeight = 578 - ClientWidth = 677 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - OldCreateOrder = False - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object Panel1: TPanel - Left = 0 - Top = 0 - Width = 677 - Height = 30 - Align = alTop - BevelOuter = bvNone - Padding.Left = 5 - Padding.Top = 5 - Padding.Right = 5 - Padding.Bottom = 5 - ShowCaption = False - TabOrder = 0 - object Edit1: TEdit - Left = 5 - Top = 5 - Width = 636 - Height = 20 - Margins.Right = 5 - Align = alClient - TabOrder = 0 - Text = 'http://www.google.com' - ExplicitHeight = 21 - end - object Button1: TButton - Left = 641 - Top = 5 - Width = 31 - Height = 20 - Margins.Left = 5 - Align = alRight - Caption = 'Go' - TabOrder = 1 - OnClick = Button1Click - end - end - object PaintBox: TPaintBox32 - Left = 0 - Top = 30 - Width = 677 - Height = 548 - Align = alClient - TabOrder = 1 - OnMouseDown = PaintBoxMouseDown - OnMouseMove = PaintBoxMouseMove - OnMouseUp = PaintBoxMouseUp - OnMouseWheel = PaintBoxMouseWheel - OnResize = PaintBoxResize - end - object chrmosr: TChromium - OnGetRootScreenRect = chrmosrGetRootScreenRect - OnGetViewRect = chrmosrGetViewRect - OnGetScreenPoint = chrmosrGetScreenPoint - OnPaint = chrmosrPaint - OnCursorChange = chrmosrCursorChange - Left = 304 - Top = 304 - end - object AppEvents: TApplicationEvents - OnMessage = AppEventsMessage - Left = 504 - Top = 240 - end -end diff --git a/demos/SimpleOSRBrowser/uSimpleOSRBrowser.pas b/demos/SimpleOSRBrowser/uSimpleOSRBrowser.pas deleted file mode 100644 index a555b1ea..00000000 --- a/demos/SimpleOSRBrowser/uSimpleOSRBrowser.pas +++ /dev/null @@ -1,299 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uSimpleOSRBrowser; - -interface - -uses - Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, - Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, - uCEFChromium, GR32_Image, Vcl.AppEvnts, uCEFTypes, uCEFInterfaces; - -type - TForm1 = class(TForm) - Panel1: TPanel; - Edit1: TEdit; - Button1: TButton; - PaintBox: TPaintBox32; - chrmosr: TChromium; - AppEvents: TApplicationEvents; - procedure FormShow(Sender: TObject); - procedure PaintBoxResize(Sender: TObject); - procedure PaintBoxMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure AppEventsMessage(var Msg: tagMSG; var Handled: Boolean); - procedure PaintBoxMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); - procedure PaintBoxMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); - procedure chrmosrPaint(Sender: TObject; const browser: ICefBrowser; - kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; - const dirtyRects: PCefRectArray; const buffer: Pointer; width, - height: Integer); - procedure chrmosrGetRootScreenRect(Sender: TObject; - const browser: ICefBrowser; rect: PCefRect; out Result: Boolean); - procedure chrmosrCursorChange(Sender: TObject; - const browser: ICefBrowser; cursor: HICON; - cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); - procedure PaintBoxMouseWheel(Sender: TObject; Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); - procedure Button1Click(Sender: TObject); - procedure chrmosrGetViewRect(Sender: TObject; - const browser: ICefBrowser; rect: PCefRect; out Result: Boolean); - procedure chrmosrGetScreenPoint(Sender: TObject; - const browser: ICefBrowser; viewX, viewY: Integer; screenX, - screenY: PInteger; out Result: Boolean); - private - function getModifiers(Shift: TShiftState): TCefEventFlags; - function GetButton(Button: TMouseButton): TCefMouseButtonType; - public - { Public declarations } - end; - -var - Form1: TForm1; - -implementation - -{$R *.dfm} - -procedure TForm1.AppEventsMessage(var Msg: tagMSG; var Handled: Boolean); -var - event: TCefKeyEvent; -begin - case Msg.message of - WM_CHAR: - begin - FillChar(event, SizeOf(TCefKeyEvent), 0); - event.kind := KEYEVENT_CHAR; - event.windows_key_code := Msg.wParam; - event.native_key_code := Msg.lParam; - chrmosr.SendKeyEvent(@event); - end; - end; -end; - -procedure TForm1.Button1Click(Sender: TObject); -begin - chrmosr.LoadURL(Edit1.Text); -end; - -procedure TForm1.chrmosrCursorChange(Sender: TObject; - const browser: ICefBrowser; cursor: HICON; cursorType: TCefCursorType; - const customCursorInfo: PCefCursorInfo); -begin - case cursorType of - CT_POINTER: PaintBox.Cursor := crArrow; - CT_CROSS: PaintBox.Cursor:= crCross; - CT_HAND: PaintBox.Cursor := crHandPoint; - CT_IBEAM: PaintBox.Cursor := crIBeam; - CT_WAIT: PaintBox.Cursor := crHourGlass; - CT_HELP: PaintBox.Cursor := crHelp; - CT_EASTRESIZE: PaintBox.Cursor := crSizeWE; - CT_NORTHRESIZE: PaintBox.Cursor := crSizeNS; - CT_NORTHEASTRESIZE: PaintBox.Cursor:= crSizeNESW; - CT_NORTHWESTRESIZE: PaintBox.Cursor:= crSizeNWSE; - CT_SOUTHRESIZE: PaintBox.Cursor:= crSizeNS; - CT_SOUTHEASTRESIZE: PaintBox.Cursor:= crSizeNWSE; - CT_SOUTHWESTRESIZE: PaintBox.Cursor:= crSizeNESW; - CT_WESTRESIZE: PaintBox.Cursor := crSizeWE; - CT_NORTHSOUTHRESIZE: PaintBox.Cursor:= crSizeNS; - CT_EASTWESTRESIZE: PaintBox.Cursor := crSizeWE; - CT_NORTHEASTSOUTHWESTRESIZE: PaintBox.Cursor:= crSizeNESW; - CT_NORTHWESTSOUTHEASTRESIZE: PaintBox.Cursor:= crSizeNWSE; - CT_COLUMNRESIZE: PaintBox.Cursor:= crHSplit; - CT_ROWRESIZE: PaintBox.Cursor:= crVSplit; - CT_MOVE: PaintBox.Cursor := crSizeAll; - CT_PROGRESS: PaintBox.Cursor := crAppStart; - CT_NODROP: PaintBox.Cursor:= crNo; - CT_NONE: PaintBox.Cursor:= crNone; - CT_NOTALLOWED: PaintBox.Cursor:= crNo; - else - PaintBox.Cursor := crArrow; - end; -end; - -procedure TForm1.chrmosrGetRootScreenRect(Sender: TObject; - const browser: ICefBrowser; rect: PCefRect; out Result: Boolean); -begin - rect.x := 0; - rect.y := 0; - rect.width := PaintBox.Width; - rect.height := PaintBox.Height; - Result := True; -end; - -procedure TForm1.chrmosrGetScreenPoint(Sender: TObject; - const browser: ICefBrowser; viewX, viewY: Integer; screenX, - screenY: PInteger; out Result: Boolean); -var - TempScreenPt, TempViewPt : TPoint; -begin - TempViewPt.x := viewX; - TempViewPt.y := viewY; - TempScreenPt := PaintBox.ClientToScreen(TempViewPt); - screenX^ := TempScreenPt.x; - screenY^ := TempScreenPt.y; - Result := True; -end; - -procedure TForm1.chrmosrGetViewRect(Sender: TObject; - const browser: ICefBrowser; rect: PCefRect; out Result: Boolean); -begin - rect.x := 0; - rect.y := 0; - rect.width := PaintBox.Width; - rect.height := PaintBox.Height; - Result := True; -end; - -procedure TForm1.chrmosrPaint(Sender: TObject; const browser: ICefBrowser; - kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; - const dirtyRects: PCefRectArray; const buffer: Pointer; width, - height: Integer); -var - src, dst: PByte; - offset, i, j, w: Integer; -begin - if (width <> PaintBox.Width) or (height <> PaintBox.Height) then Exit; - - with PaintBox.Buffer do - begin - PaintBox.Canvas.Lock; - Lock; - try - for j := 0 to dirtyRectsCount - 1 do - begin - w := Width * 4; - offset := ((dirtyRects[j].y * Width) + dirtyRects[j].x) * 4; - src := @PByte(buffer)[offset]; - dst := @PByte(Bits)[offset]; - offset := dirtyRects[j].width * 4; - for i := 0 to dirtyRects[j].height - 1 do - begin - Move(src^, dst^, offset); - Inc(dst, w); - Inc(src, w); - end; - PaintBox.Flush(Rect(dirtyRects[j].x, dirtyRects[j].y, - dirtyRects[j].x + dirtyRects[j].width, dirtyRects[j].y + dirtyRects[j].height)); - end; - finally - Unlock; - PaintBox.Canvas.Unlock; - end; - end; -end; - -function TForm1.getModifiers(Shift: TShiftState): TCefEventFlags; -begin - Result := []; - if ssShift in Shift then Include(Result, EVENTFLAG_SHIFT_DOWN); - if ssAlt in Shift then Include(Result, EVENTFLAG_ALT_DOWN); - if ssCtrl in Shift then Include(Result, EVENTFLAG_CONTROL_DOWN); - if ssLeft in Shift then Include(Result, EVENTFLAG_LEFT_MOUSE_BUTTON); - if ssRight in Shift then Include(Result, EVENTFLAG_RIGHT_MOUSE_BUTTON); - if ssMiddle in Shift then Include(Result, EVENTFLAG_MIDDLE_MOUSE_BUTTON); -end; - -function TForm1.GetButton(Button: TMouseButton): TCefMouseButtonType; -begin - case Button of - TMouseButton.mbRight: Result := MBT_RIGHT; - TMouseButton.mbMiddle: Result := MBT_MIDDLE; - else Result := MBT_LEFT; - end; -end; - -procedure TForm1.FormShow(Sender: TObject); -begin - chrmosr.CreateBrowser(nil, ''); -end; - -procedure TForm1.PaintBoxMouseDown(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - event: TCefMouseEvent; -begin - event.x := X; - event.y := Y; - event.modifiers := getModifiers(Shift); - chrmosr.SendMouseClickEvent(@event, GetButton(Button), False, 1); -end; - -procedure TForm1.PaintBoxMouseMove(Sender: TObject; Shift: TShiftState; X, - Y: Integer); -var - event: TCefMouseEvent; -begin - event.x := X; - event.y := Y; - event.modifiers := getModifiers(Shift); - chrmosr.SendMouseMoveEvent(@event, not PaintBox.MouseInControl); -end; - -procedure TForm1.PaintBoxMouseUp(Sender: TObject; Button: TMouseButton; - Shift: TShiftState; X, Y: Integer); -var - event: TCefMouseEvent; -begin - event.x := X; - event.y := Y; - event.modifiers := getModifiers(Shift); - chrmosr.SendMouseClickEvent(@event, GetButton(Button), True, 1); -end; - -procedure TForm1.PaintBoxMouseWheel(Sender: TObject; Shift: TShiftState; - WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); -var - event: TCefMouseEvent; -begin - event.x := MousePos.X; - event.y := MousePos.Y; - event.modifiers := getModifiers(Shift); - chrmosr.SendMouseWheelEvent(@event, 0, WheelDelta); -end; - -procedure TForm1.PaintBoxResize(Sender: TObject); -begin - PaintBox.Buffer.SetSize(PaintBox.Width, PaintBox.Height); - chrmosr.WasResized; - chrmosr.SendFocusEvent(True); -end; - -end. diff --git a/demos/SimpleOSRBrowser/widevinecdmadapter.dll b/demos/SimpleOSRBrowser/widevinecdmadapter.dll deleted file mode 100644 index 8be28982..00000000 Binary files a/demos/SimpleOSRBrowser/widevinecdmadapter.dll and /dev/null differ diff --git a/demos/SubProcess/00-DeleteDCUs.bat b/demos/SubProcess/00-DeleteDCUs.bat deleted file mode 100644 index 9cd24f09..00000000 --- a/demos/SubProcess/00-DeleteDCUs.bat +++ /dev/null @@ -1,7 +0,0 @@ -del /s /q *.dcu -del /s /q *.dcp -del /s /q *.bpl -del /s /q *.bpi -del /s /q *.hpp -del /s /q *.exe -del /s /q *.~* diff --git a/demos/SubProcess/SubProcess.dpr b/demos/SubProcess/SubProcess.dpr deleted file mode 100644 index 92f97032..00000000 --- a/demos/SubProcess/SubProcess.dpr +++ /dev/null @@ -1,48 +0,0 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -program SubProcess; - -uses - uCEFApplication; - -begin - GlobalCEFApp := TCefApplication.Create; - GlobalCEFApp.StartSubProcess; - GlobalCEFApp.Free; -end. - diff --git a/demos/SubProcess/SubProcess.dproj b/demos/SubProcess/SubProcess.dproj deleted file mode 100644 index eef8ebe9..00000000 --- a/demos/SubProcess/SubProcess.dproj +++ /dev/null @@ -1,533 +0,0 @@ - - - {6ABCF641-08D0-4F35-9D13-2FBD18E5152A} - 18.0 - VCL - SubProcess.dpr - True - Release - Win32 - 1 - Application - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - true - Cfg_2 - true - true - - - 3082 - System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - $(BDS)\bin\delphi_PROJECTICON.ico - SubProcess - .\$(Platform)\$(Config) - false - false - false - false - false - - - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - true - 1033 - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - $(BDS)\bin\default_app.manifest - DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;Componentes;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;Componentes_Int;CEF4Delphi;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;Componentes_UI;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Componentes_Misc;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;Componentes_RTF;DBXInformixDriver;bindcompvcl;frxDB23;Componentes_vCard;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;frx23;fmxase;$(DCC_UsePackage) - - - DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;vclib;FireDACDBXDriver;dbexpress;IndyProtocols230;vclx;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;vcl;DBXSybaseASEDriver;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;bindcompvcl;TeeUI;IndyCore230;vclribbon;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;IndySystem230;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage) - - - DEBUG;$(DCC_Define) - true - false - true - true - true - - - true - 1033 - true - true - false - - - false - RELEASE;$(DCC_Define) - 0 - 0 - - - true - true - - - - MainSource - - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - - - - Delphi.Personality.12 - Application - - - - SubProcess.dpr - - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - - - SubProcess.exe - true - - - - - 0 - .dll;.bpl - - - 1 - .dylib - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - Contents\Resources - 1 - - - - - classes - 1 - - - - - Contents\MacOS - 0 - - - 1 - - - Contents\MacOS - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - 0 - - - 1 - - - Contents\MacOS - 1 - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 1 - - - - - 0 - - - Contents\MacOS - 1 - .framework - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - 0 - - - 1 - - - Contents\MacOS - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-normal - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ../ - 1 - - - ../ - 1 - - - - - res\drawable-hdpi - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - Contents - 1 - - - - - ../ - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\values - 1 - - - - - res\drawable-small - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - - - res\drawable - 1 - - - - - 0 - - - 0 - - - Contents\Resources\StartUp\ - 0 - - - 0 - - - 0 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 0 - .bpl - - - 1 - .dylib - - - Contents\MacOS - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-ldpi - 1 - - - - - 1 - - - 1 - - - - - - - - - - - - True - False - - - 12 - - - - - diff --git a/demos/SubProcess/SubProcess.dproj.local b/demos/SubProcess/SubProcess.dproj.local deleted file mode 100644 index c1c84b0b..00000000 --- a/demos/SubProcess/SubProcess.dproj.local +++ /dev/null @@ -1,10 +0,0 @@ - - - - 2017/01/22 17:09:17.000.147,=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2017/01/22 17:09:45.000.533,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\uSubProcess.dfm=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.dfm - 2017/01/22 17:09:45.000.533,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\uSubProcess.pas=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Unit1.pas - 2017/01/22 17:09:50.000.228,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\SubProcess.dproj=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Project1.dproj - 2017/01/22 17:10:06.000.790,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\uSubProcess.pas= - - diff --git a/demos/SubProcess/SubProcess.dsk b/demos/SubProcess/SubProcess.dsk deleted file mode 100644 index 85160329..00000000 --- a/demos/SubProcess/SubProcess.dsk +++ /dev/null @@ -1,747 +0,0 @@ -[Closed Files] -File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\uSubProcess.pas',0,1,1,1,1,0,0,, -File_1=TSourceModule,'c:\program files\embarcadero\studio\17.0\cef3\uCEFApplication.pas',0,1,49,34,71,0,0,, -File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\SubProcess\SubProcessMain.pas',0,1,1,70,6,0,0,, -File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\SubProcess\SubProcess.pas',0,1,1,1,1,0,0,, -File_4=TSourceModule,'c:\program files\embarcadero\studio\17.0\dcef3\src\cefvcl.pas',0,1,38,19,51,0,0,, -File_5=TSourceModule,'c:\program files\embarcadero\studio\17.0\dcef3\src\cefgui.pas',0,1,283,38,307,0,0,, -File_6=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\dcef3\demos\guiclient\main.pas',0,1,474,1,476,0,0,, -File_7=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\SysInit.pas',0,1,42,1,71,0,0,, -File_8=TSourceModule,'c:\program files\embarcadero\studio\17.0\SOURCE\RTL\SYS\System.pas',0,1,405,1,2001,0,0,, -File_9=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes\base_components\uHTTPIEPanel.pas',0,1,82,19,97,0,0,, - -[Modules] -Module0=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\SubProcess.dproj -Module1=default.htm -Count=2 -EditWindowCount=1 - -[C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\SubProcess.dproj] -ModuleType=TBaseProject - -[default.htm] -ModuleType=TURLModule - -[EditWindow0] -ViewCount=2 -CurrentEditView=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\SubProcess.dpr -View0=0 -View1=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=10000 -Height=9428 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=10000 -ClientHeight=9428 -DockedToMainForm=1 -BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 -TopPanelSize=0 -LeftPanelSize=2172 -LeftPanelClients=PropertyInspector,DockSite3 -LeftPanelData=00000800010100000000AA19000000000000017C080000000000000100000000CC07000009000000446F636B53697465330100000000A12300001100000050726F7065727479496E73706563746F72FFFFFFFF -RightPanelSize=2000 -RightPanelClients=DockSite2,DockSite4 -RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF -BottomPanelSize=0 -BottomPanelClients=DockSite1,MessageView -BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF -BottomMiddlePanelSize=0 -BottomMiddlePanelClients=DockSite0,GraphDrawingModel -BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF - -[View0] -CustomEditViewType=TWelcomePageView -WelcomePageURL=bds:/default.htm - -[View1] -CustomEditViewType=TEditView -Module=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\SubProcess.dpr -CursorX=1 -CursorY=38 -TopLine=1 -LeftCol=1 -Elisions= -Bookmarks= -EditViewName=C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi demos\SubProcess\SubProcess.dpr - -[Watches] -Count=0 - -[WatchWindow] -WatchColumnWidth=120 -WatchShowColumnHeaders=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=13602 -Dockable=1 -StayOnTop=0 - -[Breakpoints] -Count=0 - -[EmbarcaderoWin32Debugger_AddressBreakpoints] -Count=0 - -[EmbarcaderoWin64Debugger_AddressBreakpoints] -Count=0 - -[Main Window] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=0 -State=2 -Left=148 -Top=269 -Width=8930 -Height=8520 -MaxLeft=-8 -MaxTop=-11 -MaxWidth=8930 -MaxHeight=8520 -ClientWidth=10000 -ClientHeight=9753 -BottomPanelSize=9121 -BottomPanelClients=EditWindow0 -BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF - -[ProjectManager] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4226 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4226 -TBDockHeight=5897 -LRDockWidth=2352 -Dockable=1 -StayOnTop=0 - -[MessageView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2773 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2773 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=2773 -Dockable=1 -StayOnTop=0 - -[ToolForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7152 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 - -[ClipboardHistory] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1906 -Height=4989 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1781 -ClientHeight=4563 -TBDockHeight=4989 -LRDockWidth=1906 -Dockable=1 -StayOnTop=0 - -[ProjectStatistics] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=2062 -Height=5740 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1938 -ClientHeight=5314 -TBDockHeight=5740 -LRDockWidth=2062 -Dockable=1 -StayOnTop=0 - -[ClassBrowserTool] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-148 -Top=-137 -Width=1844 -Height=3139 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1844 -ClientHeight=3139 -TBDockHeight=3139 -LRDockWidth=1844 -Dockable=1 -StayOnTop=0 - -[MetricsView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[QAView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[PropertyInspector] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=207 -Width=2172 -Height=7108 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=7108 -TBDockHeight=7164 -LRDockWidth=2172 -Dockable=1 -StayOnTop=0 -SplitPos=142 - -[frmDesignPreview] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=5964 -LRDockWidth=2508 -Dockable=1 -StayOnTop=0 - -[TFileExplorerForm] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-898 -Top=-137 -Width=2844 -Height=6200 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2844 -ClientHeight=6200 -TBDockHeight=6200 -LRDockWidth=2844 -Dockable=1 -StayOnTop=0 - -[TemplateView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-1026 -Top=-137 -Width=273 -Height=359 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=273 -ClientHeight=359 -TBDockHeight=359 -LRDockWidth=273 -Dockable=1 -StayOnTop=0 -Name=120 -Description=334 -filter=1 - -[DebugLogView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=415 -LRDockWidth=4953 -Dockable=1 -StayOnTop=0 - -[ThreadStatusWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=7406 -Dockable=1 -StayOnTop=0 -Column0Width=145 -Column1Width=100 -Column2Width=115 -Column3Width=250 - -[LocalVarsWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1536 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[CallStackWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=2063 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[FindReferencsForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=2321 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[RefactoringForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=3206 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[ToDo List] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=1155 -LRDockWidth=3680 -Dockable=1 -StayOnTop=0 -Column0Width=314 -Column1Width=30 -Column2Width=150 -Column3Width=172 -Column4Width=129 -SortOrder=4 -ShowHints=1 -ShowChecked=1 - -[DataExplorerContainer] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=7148 -Dockable=1 -StayOnTop=0 - -[GraphDrawingModel] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2859 -Height=3206 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2859 -ClientHeight=3206 -TBDockHeight=3206 -LRDockWidth=2859 -Dockable=1 -StayOnTop=0 - -[BreakpointWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1547 -LRDockWidth=8742 -Dockable=1 -StayOnTop=0 -Column0Width=200 -Column1Width=75 -Column2Width=200 -Column3Width=200 -Column4Width=200 -Column5Width=75 -Column6Width=75 - -[StructureView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2172 -Height=1760 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=1760 -TBDockHeight=3677 -LRDockWidth=1898 -Dockable=1 -StayOnTop=0 - -[ModelViewTool] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=5305 -Dockable=1 -StayOnTop=0 - -[BorlandEditorCodeExplorer@EditWindow0] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1828 -Height=6177 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1703 -ClientHeight=5751 -TBDockHeight=6177 -LRDockWidth=1828 -Dockable=1 -StayOnTop=0 - -[DockHosts] -DockHostCount=5 - -[DockSite0] -HostDockSite=DockBottomCenterPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1480 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1480 -TBDockHeight=1480 -LRDockWidth=2336 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=RefactoringForm -TabDockClients=RefactoringForm,FindReferencsForm,ToDo List,MetricsView,QAView - -[DockSite1] -HostDockSite=DockBottomPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=3820 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=DebugLogView -TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow - -[DockSite2] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2000 -Height=4529 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4529 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ProjectManager -TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm - -[DockSite3] -HostDockSite=DockLeftPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2172 -Height=1760 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2172 -ClientHeight=1760 -TBDockHeight=7164 -LRDockWidth=2172 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=StructureView -TabDockClients=StructureView,ClassBrowserTool - -[DockSite4] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=454 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ToolForm -TabDockClients=ToolForm,TemplateView - diff --git a/demos/SubProcess/SubProcess.identcache b/demos/SubProcess/SubProcess.identcache deleted file mode 100644 index 03fccf92..00000000 Binary files a/demos/SubProcess/SubProcess.identcache and /dev/null differ diff --git a/demos/SubProcess/SubProcess.res b/demos/SubProcess/SubProcess.res deleted file mode 100644 index 20ba5530..00000000 Binary files a/demos/SubProcess/SubProcess.res and /dev/null differ diff --git a/demos/SubProcess/SubProcess.stat b/demos/SubProcess/SubProcess.stat deleted file mode 100644 index e4603b22..00000000 --- a/demos/SubProcess/SubProcess.stat +++ /dev/null @@ -1,10 +0,0 @@ -[Stats] -EditorSecs=37 -DesignerSecs=1 -InspectorSecs=1 -CompileSecs=1476 -OtherSecs=1 -StartTime=22/01/2017 17:12:14 -RealKeys=0 -EffectiveKeys=0 -DebugSecs=1 diff --git a/00-CreateResources.bat b/source/00-CreateResources.bat similarity index 97% rename from 00-CreateResources.bat rename to source/00-CreateResources.bat index 6661674a..af5012b4 100644 --- a/00-CreateResources.bat +++ b/source/00-CreateResources.bat @@ -1,2 +1,2 @@ -brc32 chromium.rc -r -fochromium.dcr +brc32 chromium.rc -r -fochromium.dcr pause \ No newline at end of file diff --git a/00-DeleteDCUs.bat b/source/00-DeleteDCUs.bat similarity index 93% rename from 00-DeleteDCUs.bat rename to source/00-DeleteDCUs.bat index c0cfa266..947449dd 100644 --- a/00-DeleteDCUs.bat +++ b/source/00-DeleteDCUs.bat @@ -1,2 +1,2 @@ -del /s /q *.dcu -del /s /q *.~* +del /s /q *.dcu +del /s /q *.~* diff --git a/CEF4Delphi.dpk b/source/CEF4Delphi.dpk similarity index 97% rename from CEF4Delphi.dpk rename to source/CEF4Delphi.dpk index d1ddf7a4..11e5f64c 100644 --- a/CEF4Delphi.dpk +++ b/source/CEF4Delphi.dpk @@ -1,154 +1,154 @@ -package CEF4Delphi; - -{$R *.res} -{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} -{$ALIGN 8} -{$ASSERTIONS ON} -{$BOOLEVAL OFF} -{$DEBUGINFO OFF} -{$EXTENDEDSYNTAX ON} -{$IMPORTEDDATA ON} -{$IOCHECKS ON} -{$LOCALSYMBOLS ON} -{$LONGSTRINGS ON} -{$OPENSTRINGS ON} -{$OPTIMIZATION OFF} -{$OVERFLOWCHECKS OFF} -{$RANGECHECKS OFF} -{$REFERENCEINFO ON} -{$SAFEDIVIDE OFF} -{$STACKFRAMES ON} -{$TYPEDADDRESS OFF} -{$VARSTRINGCHECKS ON} -{$WRITEABLECONST OFF} -{$MINENUMSIZE 1} -{$IMAGEBASE $400000} -{$DEFINE DEBUG} -{$ENDIF IMPLICITBUILDING} -{$DESCRIPTION 'CEF4Delphi'} -{$IMPLICITBUILD OFF} - -requires - rtl, - vcl; - -contains - uCEFRegisterComponents in 'uCEFRegisterComponents.pas', - uCEFFindHandler in 'uCEFFindHandler.pas', - uCEFConstants in 'uCEFConstants.pas', - uCEFTypes in 'uCEFTypes.pas', - uCEFInterfaces in 'uCEFInterfaces.pas', - uCEFMiscFunctions in 'uCEFMiscFunctions.pas', - uCEFLibFunctions in 'uCEFLibFunctions.pas', - uCEFApplication in 'uCEFApplication.pas', - uCEFBase in 'uCEFBase.pas', - uCEFSchemeRegistrar in 'uCEFSchemeRegistrar.pas', - uCEFCommandLine in 'uCEFCommandLine.pas', - uCEFClient in 'uCEFClient.pas', - uCEFProcessMessage in 'uCEFProcessMessage.pas', - uCEFBrowser in 'uCEFBrowser.pas', - uCEFListValue in 'uCEFListValue.pas', - uCEFBinaryValue in 'uCEFBinaryValue.pas', - uCEFValue in 'uCEFValue.pas', - uCEFDictionaryValue in 'uCEFDictionaryValue.pas', - uCEFDownloadImageCallBack in 'uCEFDownloadImageCallBack.pas', - uCEFFrame in 'uCEFFrame.pas', - uCEFPDFPrintCallback in 'uCEFPDFPrintCallback.pas', - uCEFRunFileDialogCallback in 'uCEFRunFileDialogCallback.pas', - uCEFRequestContext in 'uCEFRequestContext.pas', - uCEFNavigationEntryVisitor in 'uCEFNavigationEntryVisitor.pas', - uCEFStringVisitor in 'uCEFStringVisitor.pas', - uCEFv8Context in 'uCEFv8Context.pas', - uCEFDomVisitor in 'uCEFDomVisitor.pas', - uCEFNavigationEntry in 'uCEFNavigationEntry.pas', - uCEFCookieManager in 'uCEFCookieManager.pas', - uCEFCompletionCallback in 'uCEFCompletionCallback.pas', - uCEFRequestContextHandler in 'uCEFRequestContextHandler.pas', - uCEFWebPluginInfo in 'uCEFWebPluginInfo.pas', - uCEFDomDocument in 'uCEFDomDocument.pas', - uCEFDomNode in 'uCEFDomNode.pas', - uCEFv8Value in 'uCEFv8Value.pas', - uCEFv8Accessor in 'uCEFv8Accessor.pas', - uCEFLoadHandler in 'uCEFLoadHandler.pas', - uCEFFocusHandler in 'uCEFFocusHandler.pas', - uCEFContextMenuHandler in 'uCEFContextMenuHandler.pas', - uCEFDialogHandler in 'uCEFDialogHandler.pas', - uCEFKeyboardHandler in 'uCEFKeyboardHandler.pas', - uCEFDisplayHandler in 'uCEFDisplayHandler.pas', - uCEFDownloadHandler in 'uCEFDownloadHandler.pas', - uCEFGeolocationHandler in 'uCEFGeolocationHandler.pas', - uCEFJsDialogHandler in 'uCEFJsDialogHandler.pas', - uCEFLifeSpanHandler in 'uCEFLifeSpanHandler.pas', - uCEFRequestHandler in 'uCEFRequestHandler.pas', - uCEFRenderHandler in 'uCEFRenderHandler.pas', - uCEFDragHandler in 'uCEFDragHandler.pas', - uCEFPostData in 'uCEFPostData.pas', - uCEFPostDataElement in 'uCEFPostDataElement.pas', - uCEFRequest in 'uCEFRequest.pas', - uCEFStreamReader in 'uCEFStreamReader.pas', - uCEFWriteHandler in 'uCEFWriteHandler.pas', - uCEFStreamWriter in 'uCEFStreamWriter.pas', - uCEFv8StackFrame in 'uCEFv8StackFrame.pas', - uCEFv8StackTrace in 'uCEFv8StackTrace.pas', - uCEFv8Handler in 'uCEFv8Handler.pas', - uCEFRequestCallback in 'uCEFRequestCallback.pas', - uCEFCustomStreamReader in 'uCEFCustomStreamReader.pas', - uCEFCallback in 'uCEFCallback.pas', - uCEFResourceHandler in 'uCEFResourceHandler.pas', - uCEFSchemeHandlerFactory in 'uCEFSchemeHandlerFactory.pas', - uCEFTask in 'uCEFTask.pas', - uCEFTaskRunner in 'uCEFTaskRunner.pas', - uCEFStringMap in 'uCEFStringMap.pas', - uCEFStringMultimap in 'uCEFStringMultimap.pas', - uCEFXmlReader in 'uCEFXmlReader.pas', - uCEFZipReader in 'uCEFZipReader.pas', - uCEFResponse in 'uCEFResponse.pas', - uCEFCookieVisitor in 'uCEFCookieVisitor.pas', - uCEFV8Exception in 'uCEFV8Exception.pas', - uCEFResourceBundleHandler in 'uCEFResourceBundleHandler.pas', - uCEFSetCookieCallback in 'uCEFSetCookieCallback.pas', - uCEFDeleteCookiesCallback in 'uCEFDeleteCookiesCallback.pas', - uCEFDownLoadItem in 'uCEFDownLoadItem.pas', - uCEFBeforeDownloadCallback in 'uCEFBeforeDownloadCallback.pas', - uCEFDownloadItemCallback in 'uCEFDownloadItemCallback.pas', - uCEFAuthCallback in 'uCEFAuthCallback.pas', - uCEFJsDialogCallback in 'uCEFJsDialogCallback.pas', - uCEFGeolocationCallback in 'uCEFGeolocationCallback.pas', - uCEFContextMenuParams in 'uCEFContextMenuParams.pas', - uCEFMenuModel in 'uCEFMenuModel.pas', - uCEFBrowserProcessHandler in 'uCEFBrowserProcessHandler.pas', - uCEFRenderProcessHandler in 'uCEFRenderProcessHandler.pas', - uCEFUrlrequestClient in 'uCEFUrlrequestClient.pas', - uCEFUrlRequest in 'uCEFUrlRequest.pas', - uCEFWebPluginInfoVisitor in 'uCEFWebPluginInfoVisitor.pas', - uCEFWebPluginUnstableCallback in 'uCEFWebPluginUnstableCallback.pas', - uCEFEndTracingCallback in 'uCEFEndTracingCallback.pas', - uCEFGetGeolocationCallback in 'uCEFGetGeolocationCallback.pas', - uCEFFileDialogCallback in 'uCEFFileDialogCallback.pas', - uCEFDragData in 'uCEFDragData.pas', - uCEFResolveCallback in 'uCEFResolveCallback.pas', - uCEFPrintSettings in 'uCEFPrintSettings.pas', - uCEFSslInfo in 'uCEFSslInfo.pas', - uCEFRunContextMenuCallback in 'uCEFRunContextMenuCallback.pas', - uCEFResourceBundle in 'uCEFResourceBundle.pas', - uCEFResponseFilter in 'uCEFResponseFilter.pas', - uCEFImage in 'uCEFImage.pas', - uCEFMenuModelDelegate in 'uCEFMenuModelDelegate.pas', - uCEFv8Types in 'uCEFv8Types.pas', - uCEFWindowParent in 'uCEFWindowParent.pas', - uCEFChromium in 'uCEFChromium.pas', - uCEFChromiumEvents in 'uCEFChromiumEvents.pas', - uCEFChromiumOptions in 'uCEFChromiumOptions.pas', - uCEFChromiumFontOptions in 'uCEFChromiumFontOptions.pas', - uCEFPDFPrintOptions in 'uCEFPDFPrintOptions.pas', - uCEFRegisterCDMCallback in 'uCEFRegisterCDMCallback.pas', - uCEFThread in 'uCEFThread.pas', - uCEFv8Interceptor in 'uCEFv8Interceptor.pas', - uCEFWaitableEvent in 'uCEFWaitableEvent.pas', - uCEFX509CertPrincipal in 'uCEFX509CertPrincipal.pas', - uCEFX509Certificate in 'uCEFX509Certificate.pas', - uCEFSSLStatus in 'uCEFSSLStatus.pas', - uCEFSelectClientCertificateCallback in 'uCEFSelectClientCertificateCallback.pas', - uCEFChromiumWindow in 'uCEFChromiumWindow.pas'; - -end. +package CEF4Delphi; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'CEF4Delphi'} +{$IMPLICITBUILD OFF} + +requires + rtl, + vcl; + +contains + uCEFRegisterComponents in 'uCEFRegisterComponents.pas', + uCEFFindHandler in 'uCEFFindHandler.pas', + uCEFConstants in 'uCEFConstants.pas', + uCEFTypes in 'uCEFTypes.pas', + uCEFInterfaces in 'uCEFInterfaces.pas', + uCEFMiscFunctions in 'uCEFMiscFunctions.pas', + uCEFLibFunctions in 'uCEFLibFunctions.pas', + uCEFApplication in 'uCEFApplication.pas', + uCEFBase in 'uCEFBase.pas', + uCEFSchemeRegistrar in 'uCEFSchemeRegistrar.pas', + uCEFCommandLine in 'uCEFCommandLine.pas', + uCEFClient in 'uCEFClient.pas', + uCEFProcessMessage in 'uCEFProcessMessage.pas', + uCEFBrowser in 'uCEFBrowser.pas', + uCEFListValue in 'uCEFListValue.pas', + uCEFBinaryValue in 'uCEFBinaryValue.pas', + uCEFValue in 'uCEFValue.pas', + uCEFDictionaryValue in 'uCEFDictionaryValue.pas', + uCEFDownloadImageCallBack in 'uCEFDownloadImageCallBack.pas', + uCEFFrame in 'uCEFFrame.pas', + uCEFPDFPrintCallback in 'uCEFPDFPrintCallback.pas', + uCEFRunFileDialogCallback in 'uCEFRunFileDialogCallback.pas', + uCEFRequestContext in 'uCEFRequestContext.pas', + uCEFNavigationEntryVisitor in 'uCEFNavigationEntryVisitor.pas', + uCEFStringVisitor in 'uCEFStringVisitor.pas', + uCEFv8Context in 'uCEFv8Context.pas', + uCEFDomVisitor in 'uCEFDomVisitor.pas', + uCEFNavigationEntry in 'uCEFNavigationEntry.pas', + uCEFCookieManager in 'uCEFCookieManager.pas', + uCEFCompletionCallback in 'uCEFCompletionCallback.pas', + uCEFRequestContextHandler in 'uCEFRequestContextHandler.pas', + uCEFWebPluginInfo in 'uCEFWebPluginInfo.pas', + uCEFDomDocument in 'uCEFDomDocument.pas', + uCEFDomNode in 'uCEFDomNode.pas', + uCEFv8Value in 'uCEFv8Value.pas', + uCEFv8Accessor in 'uCEFv8Accessor.pas', + uCEFLoadHandler in 'uCEFLoadHandler.pas', + uCEFFocusHandler in 'uCEFFocusHandler.pas', + uCEFContextMenuHandler in 'uCEFContextMenuHandler.pas', + uCEFDialogHandler in 'uCEFDialogHandler.pas', + uCEFKeyboardHandler in 'uCEFKeyboardHandler.pas', + uCEFDisplayHandler in 'uCEFDisplayHandler.pas', + uCEFDownloadHandler in 'uCEFDownloadHandler.pas', + uCEFGeolocationHandler in 'uCEFGeolocationHandler.pas', + uCEFJsDialogHandler in 'uCEFJsDialogHandler.pas', + uCEFLifeSpanHandler in 'uCEFLifeSpanHandler.pas', + uCEFRequestHandler in 'uCEFRequestHandler.pas', + uCEFRenderHandler in 'uCEFRenderHandler.pas', + uCEFDragHandler in 'uCEFDragHandler.pas', + uCEFPostData in 'uCEFPostData.pas', + uCEFPostDataElement in 'uCEFPostDataElement.pas', + uCEFRequest in 'uCEFRequest.pas', + uCEFStreamReader in 'uCEFStreamReader.pas', + uCEFWriteHandler in 'uCEFWriteHandler.pas', + uCEFStreamWriter in 'uCEFStreamWriter.pas', + uCEFv8StackFrame in 'uCEFv8StackFrame.pas', + uCEFv8StackTrace in 'uCEFv8StackTrace.pas', + uCEFv8Handler in 'uCEFv8Handler.pas', + uCEFRequestCallback in 'uCEFRequestCallback.pas', + uCEFCustomStreamReader in 'uCEFCustomStreamReader.pas', + uCEFCallback in 'uCEFCallback.pas', + uCEFResourceHandler in 'uCEFResourceHandler.pas', + uCEFSchemeHandlerFactory in 'uCEFSchemeHandlerFactory.pas', + uCEFTask in 'uCEFTask.pas', + uCEFTaskRunner in 'uCEFTaskRunner.pas', + uCEFStringMap in 'uCEFStringMap.pas', + uCEFStringMultimap in 'uCEFStringMultimap.pas', + uCEFXmlReader in 'uCEFXmlReader.pas', + uCEFZipReader in 'uCEFZipReader.pas', + uCEFResponse in 'uCEFResponse.pas', + uCEFCookieVisitor in 'uCEFCookieVisitor.pas', + uCEFV8Exception in 'uCEFV8Exception.pas', + uCEFResourceBundleHandler in 'uCEFResourceBundleHandler.pas', + uCEFSetCookieCallback in 'uCEFSetCookieCallback.pas', + uCEFDeleteCookiesCallback in 'uCEFDeleteCookiesCallback.pas', + uCEFDownLoadItem in 'uCEFDownLoadItem.pas', + uCEFBeforeDownloadCallback in 'uCEFBeforeDownloadCallback.pas', + uCEFDownloadItemCallback in 'uCEFDownloadItemCallback.pas', + uCEFAuthCallback in 'uCEFAuthCallback.pas', + uCEFJsDialogCallback in 'uCEFJsDialogCallback.pas', + uCEFGeolocationCallback in 'uCEFGeolocationCallback.pas', + uCEFContextMenuParams in 'uCEFContextMenuParams.pas', + uCEFMenuModel in 'uCEFMenuModel.pas', + uCEFBrowserProcessHandler in 'uCEFBrowserProcessHandler.pas', + uCEFRenderProcessHandler in 'uCEFRenderProcessHandler.pas', + uCEFUrlrequestClient in 'uCEFUrlrequestClient.pas', + uCEFUrlRequest in 'uCEFUrlRequest.pas', + uCEFWebPluginInfoVisitor in 'uCEFWebPluginInfoVisitor.pas', + uCEFWebPluginUnstableCallback in 'uCEFWebPluginUnstableCallback.pas', + uCEFEndTracingCallback in 'uCEFEndTracingCallback.pas', + uCEFGetGeolocationCallback in 'uCEFGetGeolocationCallback.pas', + uCEFFileDialogCallback in 'uCEFFileDialogCallback.pas', + uCEFDragData in 'uCEFDragData.pas', + uCEFResolveCallback in 'uCEFResolveCallback.pas', + uCEFPrintSettings in 'uCEFPrintSettings.pas', + uCEFSslInfo in 'uCEFSslInfo.pas', + uCEFRunContextMenuCallback in 'uCEFRunContextMenuCallback.pas', + uCEFResourceBundle in 'uCEFResourceBundle.pas', + uCEFResponseFilter in 'uCEFResponseFilter.pas', + uCEFImage in 'uCEFImage.pas', + uCEFMenuModelDelegate in 'uCEFMenuModelDelegate.pas', + uCEFv8Types in 'uCEFv8Types.pas', + uCEFWindowParent in 'uCEFWindowParent.pas', + uCEFChromium in 'uCEFChromium.pas', + uCEFChromiumEvents in 'uCEFChromiumEvents.pas', + uCEFChromiumOptions in 'uCEFChromiumOptions.pas', + uCEFChromiumFontOptions in 'uCEFChromiumFontOptions.pas', + uCEFPDFPrintOptions in 'uCEFPDFPrintOptions.pas', + uCEFRegisterCDMCallback in 'uCEFRegisterCDMCallback.pas', + uCEFThread in 'uCEFThread.pas', + uCEFv8Interceptor in 'uCEFv8Interceptor.pas', + uCEFWaitableEvent in 'uCEFWaitableEvent.pas', + uCEFX509CertPrincipal in 'uCEFX509CertPrincipal.pas', + uCEFX509Certificate in 'uCEFX509Certificate.pas', + uCEFSSLStatus in 'uCEFSSLStatus.pas', + uCEFSelectClientCertificateCallback in 'uCEFSelectClientCertificateCallback.pas', + uCEFChromiumWindow in 'uCEFChromiumWindow.pas'; + +end. diff --git a/CEF4Delphi.dproj b/source/CEF4Delphi.dproj similarity index 98% rename from CEF4Delphi.dproj rename to source/CEF4Delphi.dproj index 8a4bd6b7..44041d1a 100644 --- a/CEF4Delphi.dproj +++ b/source/CEF4Delphi.dproj @@ -1,600 +1,600 @@ - - - {2F51F1BD-0529-4B4A-BFD2-86FE96910A62} - CEF4Delphi.dpk - 18.0 - VCL - True - Release - Win32 - 1 - Package - - - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Cfg_1 - true - true - - - true - Base - true - - - All - true - System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) - CEF4Delphi - true - true - .\$(Platform)\$(Config) - .\$(Platform)\$(Config) - false - false - false - false - false - - - rtl;vcl;$(DCC_UsePackage) - 1033 - Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= - true - - - rtl;vcl;$(DCC_UsePackage) - - - DEBUG;$(DCC_Define) - true - false - true - true - true - - - CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=CEF4Delphi;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=CEF4Delphi;ProductVersion=1.0.0.0;Comments= - CEF4Delphi - 1033 - true - false - - - false - RELEASE;$(DCC_Define) - 0 - 0 - - - - MainSource - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - - - - Delphi.Personality.12 - Package - - - - CEF4Delphi.dpk - - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - - - - - - true - - - - - true - - - - - true - - - - - CEF4Delphi.bpl - true - - - - - - Contents\Resources - 1 - - - - - classes - 1 - - - - - Contents\MacOS - 0 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - 0 - - - 1 - - - 1 - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 1 - - - - - 0 - - - 1 - .framework - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - library\lib\armeabi - 1 - - - - - 0 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-normal - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - res\drawable-hdpi - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - - - 1 - - - 1 - - - 1 - - - - - res\values - 1 - - - - - res\drawable-small - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - - - res\drawable - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-ldpi - 1 - - - - - 0 - .dll;.bpl - - - 1 - .dylib - - - - - - - - - - - - True - False - - - 12 - - - - - + + + {2F51F1BD-0529-4B4A-BFD2-86FE96910A62} + CEF4Delphi.dpk + 18.0 + VCL + True + Release + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + All + true + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + CEF4Delphi + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + rtl;vcl;$(DCC_UsePackage) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + true + + + rtl;vcl;$(DCC_UsePackage) + + + DEBUG;$(DCC_Define) + true + false + true + true + true + + + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=CEF4Delphi;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=CEF4Delphi;ProductVersion=1.0.0.0;Comments= + CEF4Delphi + 1033 + true + false + + + false + RELEASE;$(DCC_Define) + 0 + 0 + + + + MainSource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + Package + + + + CEF4Delphi.dpk + + + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + + + true + + + + + true + + + + + true + + + + + CEF4Delphi.bpl + true + + + + + + Contents\Resources + 1 + + + + + classes + 1 + + + + + Contents\MacOS + 0 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + library\lib\mips + 1 + + + + + 0 + + + 1 + + + 1 + + + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + library\lib\x86 + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-large + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + res\drawable-hdpi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + 0 + .dll;.bpl + + + 1 + .dylib + + + + + + + + + + + + True + False + + + 12 + + + + + diff --git a/CEF4Delphi.dproj.local b/source/CEF4Delphi.dproj.local similarity index 99% rename from CEF4Delphi.dproj.local rename to source/CEF4Delphi.dproj.local index 0d64b562..22263a76 100644 --- a/CEF4Delphi.dproj.local +++ b/source/CEF4Delphi.dproj.local @@ -1,277 +1,277 @@ - - - - 2016/11/03 13:34:24.000.622,=rtl.dcp - 2016/11/03 13:36:50.000.899,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Package1.dproj=C:\Program Files\Embarcadero\Studio\17.0\cef3\cef3.dproj - 2016/11/03 13:37:44.000.301,=C:\Program Files\Embarcadero\Studio\17.0\cef3\ceferr.pas - 2016/11/03 13:37:45.000.074,=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefgui.pas - 2016/11/03 13:37:45.000.219,=C:\Program Files\Embarcadero\Studio\17.0\cef3\ceflib.pas - 2016/11/03 13:37:45.000.236,=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefreg.pas - 2016/11/03 13:37:47.000.876,=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefvcl.pas - 2016/11/03 13:42:03.000.211,=vcl.dcp - 2016/11/03 14:22:14.000.293,C:\Program Files\Embarcadero\Studio\17.0\cef3\ceferr.pas= - 2016/11/03 14:22:31.000.065,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/03 14:23:07.000.607,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFConstants.pas - 2016/11/03 16:02:18.000.380,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/03 16:02:54.000.678,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLibrary.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/03 19:41:00.000.323,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFTypes.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLibrary.pas - 2016/11/03 19:41:47.000.437,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/03 19:42:09.000.623,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFInterfaces.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/03 19:47:24.000.150,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/03 19:47:36.000.023,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFMiscFunctions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 09:38:54.000.499,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 09:39:27.000.208,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLibFunctions.pas - 2016/11/04 10:17:03.000.353,C:\Program Files\Embarcadero\Studio\17.0\cef3\cefgui.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFHandlers.pas - 2016/11/04 10:19:09.000.192,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 10:19:19.000.721,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFApplication.pas - 2016/11/04 10:28:32.000.523,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 10:28:45.000.314,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBase.pas - 2016/11/04 10:53:47.000.492,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 10:54:04.000.082,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSchemeRegistrar.pas - 2016/11/04 10:57:19.000.058,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 10:57:35.000.208,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCommandLine.pas - 2016/11/04 11:12:13.000.709,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:12:22.000.981,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFClient.pas - 2016/11/04 11:18:45.000.858,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:19:23.000.685,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFProcessMessage.pas - 2016/11/04 11:22:59.000.325,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:23:09.000.748,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBrowser.pas - 2016/11/04 11:30:13.000.870,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:30:22.000.479,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFListValue.pas - 2016/11/04 11:33:29.000.686,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:33:40.000.124,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBinaryValue.pas - 2016/11/04 11:36:10.000.379,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:36:37.000.046,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFValue.pas - 2016/11/04 11:40:42.000.080,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 11:41:02.000.855,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDictionaryValue.pas - 2016/11/04 12:04:55.000.807,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:05:21.000.299,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImageCallback.pas - 2016/11/04 12:05:37.000.607,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImageCallback.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImage.pas - 2016/11/04 12:10:01.000.351,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImage.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadImage.pas - 2016/11/04 12:10:25.000.976,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadImage.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadImageCallBack.pas - 2016/11/04 12:12:39.000.648,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:12:49.000.133,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFrame.pas - 2016/11/04 12:16:41.000.794,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:16:57.000.667,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPDFPrintCallback.pas - 2016/11/04 12:21:00.000.581,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:21:15.000.075,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRunFileDialogCallback.pas - 2016/11/04 12:25:08.000.825,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:25:24.000.237,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestContext.pas - 2016/11/04 12:31:41.000.426,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:31:57.000.575,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFNavigationEntryVisitor.pas - 2016/11/04 12:37:26.000.233,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:37:41.000.439,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStringVisitor.pas - 2016/11/04 12:41:15.000.143,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:41:29.000.653,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Context.pas - 2016/11/04 12:44:15.000.121,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:44:21.000.835,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDomVisitor.pas - 2016/11/04 12:47:43.000.602,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:47:55.000.980,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFNavigationEntry.pas - 2016/11/04 12:54:00.000.201,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:54:11.000.315,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieManager.pas - 2016/11/04 12:57:30.000.891,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 12:57:42.000.499,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCompletionCallback.pas - 2016/11/04 13:01:09.000.833,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 13:01:23.000.562,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestContextHandler.pas - 2016/11/04 13:57:45.000.846,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 13:57:59.000.369,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWebPluginInfo.pas - 2016/11/04 14:31:30.000.550,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 14:31:41.000.938,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDomDocument.pas - 2016/11/04 14:34:17.000.090,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 14:34:28.000.129,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDomNode.pas - 2016/11/04 14:37:55.000.209,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 14:38:03.000.057,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Value.pas - 2016/11/04 14:41:40.000.277,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 14:41:59.000.136,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFV8Accessor.pas - 2016/11/04 14:42:16.000.591,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFV8Accessor.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastv8Accessor.pas - 2016/11/04 14:42:25.000.676,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastv8Accessor.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Accessor.pas - 2016/11/04 15:22:35.000.321,C:\Program Files\Embarcadero\Studio\17.0\cef3\cefvcl.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium.pas - 2016/11/04 15:35:00.000.300,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 15:35:10.000.181,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLoadHandler.pas - 2016/11/04 15:41:55.000.278,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 15:42:06.000.032,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFocusHandler.pas - 2016/11/04 15:45:35.000.950,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 15:45:45.000.999,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFContextMenuHandler.pas - 2016/11/04 15:50:29.000.265,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 15:50:38.000.989,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDialogHandler.pas - 2016/11/04 15:56:26.000.967,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 15:56:35.000.859,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFKeyboardHandler.pas - 2016/11/04 15:59:45.000.629,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 15:59:55.000.903,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDisplayHandler.pas - 2016/11/04 16:02:33.000.750,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:02:43.000.771,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadHandler.pas - 2016/11/04 16:05:14.000.727,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:05:25.000.707,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFGeolocationHandler.pas - 2016/11/04 16:07:34.000.747,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:07:48.000.604,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFJsDialogHandler.pas - 2016/11/04 16:10:46.000.310,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:10:57.000.068,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLifeSpanHandler.pas - 2016/11/04 16:14:08.000.188,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:14:20.000.442,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestHandler.pas - 2016/11/04 16:18:01.000.623,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:18:07.000.730,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRenderHandler.pas - 2016/11/04 16:21:06.000.326,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:21:15.000.423,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDragHandler.pas - 2016/11/04 16:27:29.000.133,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFHandlers.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFindHandler.pas - 2016/11/04 16:29:59.000.889,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:30:12.000.364,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPostData.pas - 2016/11/04 16:32:14.000.814,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:32:25.000.911,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPostDataElement.pas - 2016/11/04 16:33:41.000.767,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:33:51.000.107,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequest.pas - 2016/11/04 16:35:36.000.010,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:35:50.000.837,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStreamReader.pas - 2016/11/04 16:37:53.000.753,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:38:01.000.643,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWriteHandler.pas - 2016/11/04 16:39:57.000.905,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:40:04.000.132,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStreamWriter.pas - 2016/11/04 16:41:56.000.888,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:42:13.000.418,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8StackFrame.pas - 2016/11/04 16:43:23.000.259,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:43:31.000.890,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8StackTrace.pas - 2016/11/04 16:45:02.000.388,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:45:15.000.769,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Handler.pas - 2016/11/04 16:47:31.000.384,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:47:43.000.976,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestCallback.pas - 2016/11/04 16:48:49.000.916,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:49:13.000.169,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCustomStreamReader.pas - 2016/11/04 16:52:24.000.501,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:54:53.000.505,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCallback.pas - 2016/11/04 16:57:17.000.239,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 16:57:26.000.077,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResourceHandler.pas - 2016/11/04 17:00:50.000.674,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:00:59.000.259,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSchemeHandlerFactory.pas - 2016/11/04 17:03:15.000.546,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:05:49.000.016,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFTask.pas - 2016/11/04 17:10:43.000.387,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:10:57.000.795,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFTaskRunner.pas - 2016/11/04 17:11:52.000.079,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:11:59.000.503,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStringMap.pas - 2016/11/04 17:13:03.000.928,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:13:12.000.687,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStringMultimap.pas - 2016/11/04 17:15:01.000.582,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:15:12.000.909,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFXmlReader.pas - 2016/11/04 17:16:26.000.528,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:16:34.000.014,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFZipReader.pas - 2016/11/04 17:17:43.000.074,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:17:51.000.944,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResponse.pas - 2016/11/04 17:29:30.000.463,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:29:40.000.733,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieVisitor.pas - 2016/11/04 17:32:01.000.224,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:32:07.000.583,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFV8Exception.pas - 2016/11/04 17:34:32.000.893,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:34:39.000.833,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResourceBundleHandler.pas - 2016/11/04 17:38:58.000.648,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:39:04.000.466,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSetCookieCallback.pas - 2016/11/04 17:40:44.000.949,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:40:57.000.165,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDeleteCookiesCallback.pas - 2016/11/04 17:43:27.000.412,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:43:42.000.253,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownLoadItem.pas - 2016/11/04 17:45:13.000.508,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:45:19.000.703,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBeforeDownloadCallback.pas - 2016/11/04 17:46:27.000.140,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:46:38.000.480,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadItemCallback.pas - 2016/11/04 17:49:03.000.980,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:49:13.000.577,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFAuthCallback.pas - 2016/11/04 17:50:22.000.655,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:50:32.000.879,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFJsDialogCallback.pas - 2016/11/04 17:51:12.000.076,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:51:18.000.891,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFGeolocationCallback.pas - 2016/11/04 17:52:26.000.379,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:52:38.000.008,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFContextMenuParams.pas - 2016/11/04 17:53:51.000.704,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:53:59.000.469,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFMenuModel.pas - 2016/11/04 17:55:42.000.326,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:55:54.000.047,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBrowserProcessHandler.pas - 2016/11/04 17:57:33.000.807,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 17:57:44.000.320,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRenderProcessHandler.pas - 2016/11/04 18:01:03.000.908,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:01:16.000.502,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFUrlrequestClient.pas - 2016/11/04 18:03:22.000.002,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:03:36.000.694,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFUrlRequest.pas - 2016/11/04 18:04:54.000.070,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:05:01.000.724,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWebPluginInfoVisitor.pas - 2016/11/04 18:08:01.000.312,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:08:10.000.190,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWebPluginUnstableCallback.pas - 2016/11/04 18:09:22.000.047,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:09:32.000.833,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFEndTracingCallback.pas - 2016/11/04 18:10:56.000.167,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:11:03.000.863,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFGetGeolocationCallback.pas - 2016/11/04 18:11:49.000.619,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:11:58.000.315,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFileDialogCallback.pas - 2016/11/04 18:13:17.000.596,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:13:28.000.975,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDragData.pas - 2016/11/04 18:14:46.000.315,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:14:55.000.027,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResolveCallback.pas - 2016/11/04 18:17:10.000.544,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:17:23.000.918,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPrintSettings.pas - 2016/11/04 18:18:17.000.655,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:18:25.000.031,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSslCertPrincipal.pas - 2016/11/04 18:19:36.000.246,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:19:49.000.081,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSslInfo.pas - 2016/11/04 18:21:23.000.319,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:21:29.000.499,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRunContextMenuCallback.pas - 2016/11/04 18:22:54.000.779,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:23:07.000.660,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResourceBundle.pas - 2016/11/04 18:24:23.000.928,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:24:31.000.808,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResponseFilter.pas - 2016/11/04 18:25:31.000.691,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:25:41.000.021,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFImage.pas - 2016/11/04 18:26:54.000.263,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/04 18:27:04.000.226,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFMenuModelDelegate.pas - 2016/11/04 18:28:19.000.494,C:\Program Files\Embarcadero\Studio\17.0\cef3\ceflib.pas= - 2016/11/04 18:31:57.000.277,C:\Program Files\Embarcadero\Studio\17.0\cef3\uRegister.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefreg.pas - 2016/11/05 09:18:32.000.021,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/05 09:18:43.000.557,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Types.pas - 2016/11/05 09:41:11.000.609,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRegisterComponents.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uRegister.pas - 2016/11/06 17:42:31.000.412,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/06 17:42:57.000.570,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieDeleterTask.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/06 17:57:18.000.164,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieDeleterTask.pas= - 2016/11/13 17:16:54.000.597,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/13 17:17:19.000.616,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/13 18:46:07.000.526,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/13 18:52:50.000.372,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumDevTools.pas - 2016/11/14 14:57:55.000.572,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas= - 2016/11/25 09:35:30.000.156,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas - 2016/11/25 09:39:41.000.590,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas= - 2016/11/29 09:52:14.000.850,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas - 2016/11/29 10:05:42.000.033,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:06:49.000.745,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumEvents.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:08:16.000.524,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:10:28.000.078,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOptions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:11:26.000.030,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:12:11.000.187,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumFontOptions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:14:39.000.549,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 10:15:46.000.466,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPDFPrintOptions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 11:35:06.000.964,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumBase.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas - 2016/11/29 11:35:58.000.919,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium.pas= - 2016/11/29 11:36:22.000.935,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumBase.pas - 2016/11/29 11:41:17.000.365,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWindowParent.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumDevTools.pas - 2016/11/29 14:26:03.000.580,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/11/29 14:38:08.000.147,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\TCEFChromiumWindow.pas - 2016/11/29 14:41:18.000.620,C:\Program Files\Embarcadero\Studio\17.0\cef3\TCEFChromiumWindow.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumWindow.pas - 2016/11/29 15:48:26.000.475,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium2.pas - 2016/11/29 16:29:04.000.712,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium2.pas= - 2016/12/14 09:31:37.000.825,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/14 09:43:37.000.496,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCefRegisterCDMCallback.pas - 2016/12/15 11:52:46.000.153,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/15 15:23:08.000.388,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/15 15:27:53.000.729,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFThread.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/15 16:33:21.000.646,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/15 16:33:59.000.530,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Interceptor.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/15 18:08:50.000.736,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/15 18:10:25.000.832,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWaitableEvent.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/16 09:51:23.000.585,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/16 09:53:31.000.858,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFX509CertPrincipal.pas - 2016/12/16 10:34:36.000.246,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/16 10:39:48.000.349,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFX509Certificate.pas - 2016/12/16 11:11:31.000.335,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSslCertPrincipal.pas= - 2016/12/16 12:46:25.000.699,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/16 12:51:53.000.173,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSSLStatus.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/16 13:03:29.000.911,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2016/12/16 13:15:23.000.921,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSelectClientCertificateCallback.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas - 2017/01/05 09:46:44.000.222,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumWindow.pas= - 2017/01/05 10:34:46.000.529,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumWindow.pas - 2017/01/22 10:37:38.000.090,C:\Program Files\Embarcadero\Studio\17.0\cef3\CEF4Delphi.dproj=C:\Program Files\Embarcadero\Studio\17.0\cef3\cef3.dproj - - + + + + 2016/11/03 13:34:24.000.622,=rtl.dcp + 2016/11/03 13:36:50.000.899,C:\Users\usuario\Documents\Embarcadero\Studio\Projects\Package1.dproj=C:\Program Files\Embarcadero\Studio\17.0\cef3\cef3.dproj + 2016/11/03 13:37:44.000.301,=C:\Program Files\Embarcadero\Studio\17.0\cef3\ceferr.pas + 2016/11/03 13:37:45.000.074,=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefgui.pas + 2016/11/03 13:37:45.000.219,=C:\Program Files\Embarcadero\Studio\17.0\cef3\ceflib.pas + 2016/11/03 13:37:45.000.236,=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefreg.pas + 2016/11/03 13:37:47.000.876,=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefvcl.pas + 2016/11/03 13:42:03.000.211,=vcl.dcp + 2016/11/03 14:22:14.000.293,C:\Program Files\Embarcadero\Studio\17.0\cef3\ceferr.pas= + 2016/11/03 14:22:31.000.065,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/03 14:23:07.000.607,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFConstants.pas + 2016/11/03 16:02:18.000.380,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/03 16:02:54.000.678,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLibrary.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/03 19:41:00.000.323,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFTypes.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLibrary.pas + 2016/11/03 19:41:47.000.437,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/03 19:42:09.000.623,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFInterfaces.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/03 19:47:24.000.150,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/03 19:47:36.000.023,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFMiscFunctions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 09:38:54.000.499,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 09:39:27.000.208,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLibFunctions.pas + 2016/11/04 10:17:03.000.353,C:\Program Files\Embarcadero\Studio\17.0\cef3\cefgui.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFHandlers.pas + 2016/11/04 10:19:09.000.192,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 10:19:19.000.721,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFApplication.pas + 2016/11/04 10:28:32.000.523,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 10:28:45.000.314,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBase.pas + 2016/11/04 10:53:47.000.492,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 10:54:04.000.082,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSchemeRegistrar.pas + 2016/11/04 10:57:19.000.058,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 10:57:35.000.208,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCommandLine.pas + 2016/11/04 11:12:13.000.709,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:12:22.000.981,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFClient.pas + 2016/11/04 11:18:45.000.858,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:19:23.000.685,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFProcessMessage.pas + 2016/11/04 11:22:59.000.325,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:23:09.000.748,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBrowser.pas + 2016/11/04 11:30:13.000.870,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:30:22.000.479,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFListValue.pas + 2016/11/04 11:33:29.000.686,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:33:40.000.124,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBinaryValue.pas + 2016/11/04 11:36:10.000.379,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:36:37.000.046,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFValue.pas + 2016/11/04 11:40:42.000.080,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 11:41:02.000.855,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDictionaryValue.pas + 2016/11/04 12:04:55.000.807,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:05:21.000.299,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImageCallback.pas + 2016/11/04 12:05:37.000.607,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImageCallback.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImage.pas + 2016/11/04 12:10:01.000.351,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastDownloadImage.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadImage.pas + 2016/11/04 12:10:25.000.976,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadImage.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadImageCallBack.pas + 2016/11/04 12:12:39.000.648,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:12:49.000.133,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFrame.pas + 2016/11/04 12:16:41.000.794,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:16:57.000.667,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPDFPrintCallback.pas + 2016/11/04 12:21:00.000.581,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:21:15.000.075,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRunFileDialogCallback.pas + 2016/11/04 12:25:08.000.825,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:25:24.000.237,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestContext.pas + 2016/11/04 12:31:41.000.426,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:31:57.000.575,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFNavigationEntryVisitor.pas + 2016/11/04 12:37:26.000.233,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:37:41.000.439,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStringVisitor.pas + 2016/11/04 12:41:15.000.143,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:41:29.000.653,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Context.pas + 2016/11/04 12:44:15.000.121,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:44:21.000.835,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDomVisitor.pas + 2016/11/04 12:47:43.000.602,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:47:55.000.980,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFNavigationEntry.pas + 2016/11/04 12:54:00.000.201,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:54:11.000.315,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieManager.pas + 2016/11/04 12:57:30.000.891,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 12:57:42.000.499,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCompletionCallback.pas + 2016/11/04 13:01:09.000.833,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 13:01:23.000.562,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestContextHandler.pas + 2016/11/04 13:57:45.000.846,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 13:57:59.000.369,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWebPluginInfo.pas + 2016/11/04 14:31:30.000.550,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 14:31:41.000.938,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDomDocument.pas + 2016/11/04 14:34:17.000.090,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 14:34:28.000.129,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDomNode.pas + 2016/11/04 14:37:55.000.209,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 14:38:03.000.057,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Value.pas + 2016/11/04 14:41:40.000.277,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 14:41:59.000.136,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFV8Accessor.pas + 2016/11/04 14:42:16.000.591,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFV8Accessor.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastv8Accessor.pas + 2016/11/04 14:42:25.000.676,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFastv8Accessor.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Accessor.pas + 2016/11/04 15:22:35.000.321,C:\Program Files\Embarcadero\Studio\17.0\cef3\cefvcl.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium.pas + 2016/11/04 15:35:00.000.300,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 15:35:10.000.181,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLoadHandler.pas + 2016/11/04 15:41:55.000.278,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 15:42:06.000.032,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFocusHandler.pas + 2016/11/04 15:45:35.000.950,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 15:45:45.000.999,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFContextMenuHandler.pas + 2016/11/04 15:50:29.000.265,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 15:50:38.000.989,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDialogHandler.pas + 2016/11/04 15:56:26.000.967,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 15:56:35.000.859,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFKeyboardHandler.pas + 2016/11/04 15:59:45.000.629,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 15:59:55.000.903,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDisplayHandler.pas + 2016/11/04 16:02:33.000.750,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:02:43.000.771,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadHandler.pas + 2016/11/04 16:05:14.000.727,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:05:25.000.707,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFGeolocationHandler.pas + 2016/11/04 16:07:34.000.747,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:07:48.000.604,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFJsDialogHandler.pas + 2016/11/04 16:10:46.000.310,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:10:57.000.068,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFLifeSpanHandler.pas + 2016/11/04 16:14:08.000.188,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:14:20.000.442,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestHandler.pas + 2016/11/04 16:18:01.000.623,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:18:07.000.730,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRenderHandler.pas + 2016/11/04 16:21:06.000.326,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:21:15.000.423,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDragHandler.pas + 2016/11/04 16:27:29.000.133,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFHandlers.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFindHandler.pas + 2016/11/04 16:29:59.000.889,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:30:12.000.364,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPostData.pas + 2016/11/04 16:32:14.000.814,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:32:25.000.911,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPostDataElement.pas + 2016/11/04 16:33:41.000.767,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:33:51.000.107,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequest.pas + 2016/11/04 16:35:36.000.010,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:35:50.000.837,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStreamReader.pas + 2016/11/04 16:37:53.000.753,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:38:01.000.643,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWriteHandler.pas + 2016/11/04 16:39:57.000.905,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:40:04.000.132,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStreamWriter.pas + 2016/11/04 16:41:56.000.888,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:42:13.000.418,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8StackFrame.pas + 2016/11/04 16:43:23.000.259,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:43:31.000.890,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8StackTrace.pas + 2016/11/04 16:45:02.000.388,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:45:15.000.769,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Handler.pas + 2016/11/04 16:47:31.000.384,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:47:43.000.976,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRequestCallback.pas + 2016/11/04 16:48:49.000.916,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:49:13.000.169,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCustomStreamReader.pas + 2016/11/04 16:52:24.000.501,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:54:53.000.505,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCallback.pas + 2016/11/04 16:57:17.000.239,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 16:57:26.000.077,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResourceHandler.pas + 2016/11/04 17:00:50.000.674,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:00:59.000.259,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSchemeHandlerFactory.pas + 2016/11/04 17:03:15.000.546,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:05:49.000.016,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFTask.pas + 2016/11/04 17:10:43.000.387,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:10:57.000.795,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFTaskRunner.pas + 2016/11/04 17:11:52.000.079,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:11:59.000.503,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStringMap.pas + 2016/11/04 17:13:03.000.928,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:13:12.000.687,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFStringMultimap.pas + 2016/11/04 17:15:01.000.582,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:15:12.000.909,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFXmlReader.pas + 2016/11/04 17:16:26.000.528,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:16:34.000.014,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFZipReader.pas + 2016/11/04 17:17:43.000.074,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:17:51.000.944,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResponse.pas + 2016/11/04 17:29:30.000.463,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:29:40.000.733,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieVisitor.pas + 2016/11/04 17:32:01.000.224,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:32:07.000.583,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFV8Exception.pas + 2016/11/04 17:34:32.000.893,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:34:39.000.833,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResourceBundleHandler.pas + 2016/11/04 17:38:58.000.648,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:39:04.000.466,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSetCookieCallback.pas + 2016/11/04 17:40:44.000.949,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:40:57.000.165,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDeleteCookiesCallback.pas + 2016/11/04 17:43:27.000.412,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:43:42.000.253,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownLoadItem.pas + 2016/11/04 17:45:13.000.508,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:45:19.000.703,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBeforeDownloadCallback.pas + 2016/11/04 17:46:27.000.140,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:46:38.000.480,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDownloadItemCallback.pas + 2016/11/04 17:49:03.000.980,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:49:13.000.577,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFAuthCallback.pas + 2016/11/04 17:50:22.000.655,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:50:32.000.879,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFJsDialogCallback.pas + 2016/11/04 17:51:12.000.076,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:51:18.000.891,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFGeolocationCallback.pas + 2016/11/04 17:52:26.000.379,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:52:38.000.008,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFContextMenuParams.pas + 2016/11/04 17:53:51.000.704,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:53:59.000.469,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFMenuModel.pas + 2016/11/04 17:55:42.000.326,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:55:54.000.047,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFBrowserProcessHandler.pas + 2016/11/04 17:57:33.000.807,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 17:57:44.000.320,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRenderProcessHandler.pas + 2016/11/04 18:01:03.000.908,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:01:16.000.502,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFUrlrequestClient.pas + 2016/11/04 18:03:22.000.002,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:03:36.000.694,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFUrlRequest.pas + 2016/11/04 18:04:54.000.070,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:05:01.000.724,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWebPluginInfoVisitor.pas + 2016/11/04 18:08:01.000.312,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:08:10.000.190,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWebPluginUnstableCallback.pas + 2016/11/04 18:09:22.000.047,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:09:32.000.833,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFEndTracingCallback.pas + 2016/11/04 18:10:56.000.167,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:11:03.000.863,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFGetGeolocationCallback.pas + 2016/11/04 18:11:49.000.619,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:11:58.000.315,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFFileDialogCallback.pas + 2016/11/04 18:13:17.000.596,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:13:28.000.975,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFDragData.pas + 2016/11/04 18:14:46.000.315,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:14:55.000.027,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResolveCallback.pas + 2016/11/04 18:17:10.000.544,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:17:23.000.918,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPrintSettings.pas + 2016/11/04 18:18:17.000.655,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:18:25.000.031,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSslCertPrincipal.pas + 2016/11/04 18:19:36.000.246,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:19:49.000.081,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSslInfo.pas + 2016/11/04 18:21:23.000.319,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:21:29.000.499,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRunContextMenuCallback.pas + 2016/11/04 18:22:54.000.779,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:23:07.000.660,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResourceBundle.pas + 2016/11/04 18:24:23.000.928,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:24:31.000.808,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFResponseFilter.pas + 2016/11/04 18:25:31.000.691,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:25:41.000.021,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFImage.pas + 2016/11/04 18:26:54.000.263,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/04 18:27:04.000.226,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFMenuModelDelegate.pas + 2016/11/04 18:28:19.000.494,C:\Program Files\Embarcadero\Studio\17.0\cef3\ceflib.pas= + 2016/11/04 18:31:57.000.277,C:\Program Files\Embarcadero\Studio\17.0\cef3\uRegister.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\cefreg.pas + 2016/11/05 09:18:32.000.021,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/05 09:18:43.000.557,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Types.pas + 2016/11/05 09:41:11.000.609,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFRegisterComponents.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uRegister.pas + 2016/11/06 17:42:31.000.412,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/06 17:42:57.000.570,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieDeleterTask.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/06 17:57:18.000.164,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFCookieDeleterTask.pas= + 2016/11/13 17:16:54.000.597,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/13 17:17:19.000.616,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/13 18:46:07.000.526,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/13 18:52:50.000.372,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumDevTools.pas + 2016/11/14 14:57:55.000.572,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas= + 2016/11/25 09:35:30.000.156,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas + 2016/11/25 09:39:41.000.590,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas= + 2016/11/29 09:52:14.000.850,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas + 2016/11/29 10:05:42.000.033,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:06:49.000.745,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumEvents.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:08:16.000.524,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:10:28.000.078,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOptions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:11:26.000.030,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:12:11.000.187,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumFontOptions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:14:39.000.549,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 10:15:46.000.466,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFPDFPrintOptions.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 11:35:06.000.964,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumBase.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumOSR.pas + 2016/11/29 11:35:58.000.919,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium.pas= + 2016/11/29 11:36:22.000.935,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumBase.pas + 2016/11/29 11:41:17.000.365,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWindowParent.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumDevTools.pas + 2016/11/29 14:26:03.000.580,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/11/29 14:38:08.000.147,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\TCEFChromiumWindow.pas + 2016/11/29 14:41:18.000.620,C:\Program Files\Embarcadero\Studio\17.0\cef3\TCEFChromiumWindow.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumWindow.pas + 2016/11/29 15:48:26.000.475,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium2.pas + 2016/11/29 16:29:04.000.712,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromium2.pas= + 2016/12/14 09:31:37.000.825,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/14 09:43:37.000.496,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCefRegisterCDMCallback.pas + 2016/12/15 11:52:46.000.153,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/15 15:23:08.000.388,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/15 15:27:53.000.729,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFThread.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/15 16:33:21.000.646,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/15 16:33:59.000.530,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFv8Interceptor.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/15 18:08:50.000.736,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/15 18:10:25.000.832,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFWaitableEvent.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/16 09:51:23.000.585,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/16 09:53:31.000.858,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFX509CertPrincipal.pas + 2016/12/16 10:34:36.000.246,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/16 10:39:48.000.349,C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFX509Certificate.pas + 2016/12/16 11:11:31.000.335,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSslCertPrincipal.pas= + 2016/12/16 12:46:25.000.699,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/16 12:51:53.000.173,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSSLStatus.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/16 13:03:29.000.911,=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2016/12/16 13:15:23.000.921,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFSelectClientCertificateCallback.pas=C:\Program Files\Embarcadero\Studio\17.0\cef3\Unit1.pas + 2017/01/05 09:46:44.000.222,C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumWindow.pas= + 2017/01/05 10:34:46.000.529,=C:\Program Files\Embarcadero\Studio\17.0\cef3\uCEFChromiumWindow.pas + 2017/01/22 10:37:38.000.090,C:\Program Files\Embarcadero\Studio\17.0\cef3\CEF4Delphi.dproj=C:\Program Files\Embarcadero\Studio\17.0\cef3\cef3.dproj + + diff --git a/CEF4Delphi.dsk b/source/CEF4Delphi.dsk similarity index 93% rename from CEF4Delphi.dsk rename to source/CEF4Delphi.dsk index f5697849..d76fab89 100644 --- a/CEF4Delphi.dsk +++ b/source/CEF4Delphi.dsk @@ -1,730 +1,730 @@ -[Closed Files] -File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,1,55,38,0,0,, -File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,1196,49,1224,0,0,, -File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,14,1625,142,1661,0,0,, -File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRequestContext.pas',0,1,144,88,166,0,0,, -File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas',0,1,1386,96,1411,0,0,, -File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRequestContextHandler.pas',0,1,76,76,104,0,0,, -File_6=TSourceModule,'V:\2883_2\include\capi\cef_request_context_handler_capi.h',0,1,1,1,1,0,0,, -File_7=TSourceModule,'V:\2883\include\capi\cef_request_context_handler_capi.h',0,1,1,1,1,0,0,, -File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFSetCookieCallback.pas',0,1,46,1,1,0,0,, -File_9=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes_UI\uMouseHook.pas',0,1,112,20,141,0,0,, - -[Modules] -Module0=default.htm -Count=1 -EditWindowCount=1 - -[default.htm] -ModuleType=TURLModule - -[EditWindow0] -ViewCount=1 -CurrentView=0 -View0=0 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=10000 -Height=9428 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=10000 -ClientHeight=9428 -DockedToMainForm=1 -BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 -TopPanelSize=0 -LeftPanelSize=0 -RightPanelSize=2000 -RightPanelClients=DockSite2,DockSite4 -RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF -BottomPanelSize=0 -BottomPanelClients=DockSite1,MessageView -BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF -BottomMiddlePanelSize=0 -BottomMiddlePanelClients=DockSite0,GraphDrawingModel -BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF -TabDockLeftClients=PropertyInspector=0,DockSite3=1 - -[View0] -CustomEditViewType=TWelcomePageView -WelcomePageURL=bds:/default.htm - -[Watches] -Count=0 - -[WatchWindow] -WatchColumnWidth=120 -WatchShowColumnHeaders=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=13602 -Dockable=1 -StayOnTop=0 - -[Breakpoints] -Count=0 - -[EmbarcaderoWin32Debugger_AddressBreakpoints] -Count=0 - -[EmbarcaderoWin64Debugger_AddressBreakpoints] -Count=0 - -[Main Window] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=0 -State=2 -Left=148 -Top=269 -Width=8930 -Height=8520 -MaxLeft=-8 -MaxTop=-11 -MaxWidth=8930 -MaxHeight=8520 -ClientWidth=10000 -ClientHeight=9753 -BottomPanelSize=9121 -BottomPanelClients=EditWindow0 -BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF - -[ProjectManager] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4226 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4226 -TBDockHeight=5897 -LRDockWidth=2352 -Dockable=1 -StayOnTop=0 - -[MessageView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2773 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2773 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=2773 -Dockable=1 -StayOnTop=0 - -[ToolForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7152 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 - -[ClipboardHistory] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1906 -Height=4989 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1781 -ClientHeight=4563 -TBDockHeight=4989 -LRDockWidth=1906 -Dockable=1 -StayOnTop=0 - -[ProjectStatistics] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=2062 -Height=5740 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1938 -ClientHeight=5314 -TBDockHeight=5740 -LRDockWidth=2062 -Dockable=1 -StayOnTop=0 - -[ClassBrowserTool] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-148 -Top=-137 -Width=1844 -Height=3139 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1844 -ClientHeight=3139 -TBDockHeight=3139 -LRDockWidth=1844 -Dockable=1 -StayOnTop=0 - -[MetricsView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[QAView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=4832 -LRDockWidth=3562 -Dockable=1 -StayOnTop=0 - -[PropertyInspector] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=362 -Width=1898 -Height=5370 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1898 -ClientHeight=5370 -TBDockHeight=7164 -LRDockWidth=1898 -Dockable=1 -StayOnTop=0 -SplitPos=111 - -[frmDesignPreview] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=5964 -LRDockWidth=2508 -Dockable=1 -StayOnTop=0 - -[TFileExplorerForm] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-898 -Top=-137 -Width=2844 -Height=6200 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2844 -ClientHeight=6200 -TBDockHeight=6200 -LRDockWidth=2844 -Dockable=1 -StayOnTop=0 - -[TemplateView] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=-1026 -Top=-137 -Width=273 -Height=359 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=273 -ClientHeight=359 -TBDockHeight=359 -LRDockWidth=273 -Dockable=1 -StayOnTop=0 -Name=120 -Description=334 -filter=1 - -[DebugLogView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=415 -LRDockWidth=4953 -Dockable=1 -StayOnTop=0 - -[ThreadStatusWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=213 -LRDockWidth=7406 -Dockable=1 -StayOnTop=0 -Column0Width=145 -Column1Width=100 -Column2Width=115 -Column3Width=250 - -[LocalVarsWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1536 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[CallStackWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=2063 -LRDockWidth=3484 -Dockable=1 -StayOnTop=0 - -[FindReferencsForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=2321 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[RefactoringForm] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=3206 -LRDockWidth=2820 -Dockable=1 -StayOnTop=0 - -[ToDo List] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1177 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1177 -TBDockHeight=1155 -LRDockWidth=3680 -Dockable=1 -StayOnTop=0 -Column0Width=314 -Column1Width=30 -Column2Width=150 -Column3Width=172 -Column4Width=129 -SortOrder=4 -ShowHints=1 -ShowChecked=1 - -[DataExplorerContainer] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=7148 -Dockable=1 -StayOnTop=0 - -[GraphDrawingModel] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2859 -Height=3206 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2859 -ClientHeight=3206 -TBDockHeight=3206 -LRDockWidth=2859 -Dockable=1 -StayOnTop=0 - -[BreakpointWindow] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1121 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1121 -TBDockHeight=1547 -LRDockWidth=8742 -Dockable=1 -StayOnTop=0 -Column0Width=200 -Column1Width=75 -Column2Width=200 -Column3Width=200 -Column4Width=200 -Column5Width=75 -Column6Width=75 - -[StructureView] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=1898 -Height=9170 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1898 -ClientHeight=9170 -TBDockHeight=3677 -LRDockWidth=1898 -Dockable=1 -StayOnTop=0 - -[ModelViewTool] -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2000 -Height=6861 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=6861 -TBDockHeight=4888 -LRDockWidth=5305 -Dockable=1 -StayOnTop=0 - -[BorlandEditorCodeExplorer@EditWindow0] -PercentageSizes=1 -Create=1 -Visible=0 -Docked=0 -State=0 -Left=0 -Top=0 -Width=1828 -Height=6177 -MaxLeft=-8 -MaxTop=-11 -ClientWidth=1703 -ClientHeight=5751 -TBDockHeight=6177 -LRDockWidth=1828 -Dockable=1 -StayOnTop=0 - -[DockHosts] -DockHostCount=5 - -[DockSite0] -HostDockSite=DockBottomCenterPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=2336 -Height=1480 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2336 -ClientHeight=1480 -TBDockHeight=1480 -LRDockWidth=2336 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=RefactoringForm -TabDockClients=RefactoringForm,FindReferencsForm,ToDo List,MetricsView,QAView - -[DockSite1] -HostDockSite=DockBottomPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=0 -Width=3820 -Height=1424 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=3820 -ClientHeight=1424 -TBDockHeight=1424 -LRDockWidth=3820 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=DebugLogView -TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow - -[DockSite2] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=23 -Width=2000 -Height=4529 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4529 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ProjectManager -TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm - -[DockSite3] -HostDockSite=LeftDockTabSet -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=0 -Docked=1 -State=0 -Left=0 -Top=23 -Width=1898 -Height=9170 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=1898 -ClientHeight=9170 -TBDockHeight=7164 -LRDockWidth=1898 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=StructureView -TabDockClients=StructureView,ClassBrowserTool - -[DockSite4] -HostDockSite=DockRightPanel -DockSiteType=1 -PercentageSizes=1 -Create=1 -Visible=1 -Docked=1 -State=0 -Left=0 -Top=454 -Width=2000 -Height=4339 -MaxLeft=-1 -MaxTop=-1 -ClientWidth=2000 -ClientHeight=4339 -TBDockHeight=7164 -LRDockWidth=2000 -Dockable=1 -StayOnTop=0 -TabPosition=1 -ActiveTabID=ToolForm -TabDockClients=ToolForm,TemplateView - +[Closed Files] +File_0=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFApplication.pas',0,1,1,55,38,0,0,, +File_1=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFChromium.pas',0,1,1196,49,1224,0,0,, +File_2=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFTypes.pas',0,14,1625,142,1661,0,0,, +File_3=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRequestContext.pas',0,1,144,88,166,0,0,, +File_4=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFInterfaces.pas',0,1,1386,96,1411,0,0,, +File_5=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFRequestContextHandler.pas',0,1,76,76,104,0,0,, +File_6=TSourceModule,'V:\2883_2\include\capi\cef_request_context_handler_capi.h',0,1,1,1,1,0,0,, +File_7=TSourceModule,'V:\2883\include\capi\cef_request_context_handler_capi.h',0,1,1,1,1,0,0,, +File_8=TSourceModule,'C:\Users\usuario\Documents\Embarcadero\Studio\Projects\CEF4Delphi\source\uCEFSetCookieCallback.pas',0,1,46,1,1,0,0,, +File_9=TSourceModule,'C:\Program Files\Embarcadero\Studio\17.0\Componentes_UI\uMouseHook.pas',0,1,112,20,141,0,0,, + +[Modules] +Module0=default.htm +Count=1 +EditWindowCount=1 + +[default.htm] +ModuleType=TURLModule + +[EditWindow0] +ViewCount=1 +CurrentView=0 +View0=0 +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=10000 +Height=9428 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=10000 +ClientHeight=9428 +DockedToMainForm=1 +BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0 +TopPanelSize=0 +LeftPanelSize=0 +RightPanelSize=2000 +RightPanelClients=DockSite2,DockSite4 +RightPanelData=00000800010100000000AA1900000000000001D00700000000000001000000004312000009000000446F636B53697465320100000000A123000009000000446F636B5369746534FFFFFFFF +BottomPanelSize=0 +BottomPanelClients=DockSite1,MessageView +BottomPanelData=0000080001020200000009000000446F636B53697465310F0000004D65737361676556696577466F726D1234000000000000022506000000000000FFFFFFFF +BottomMiddlePanelSize=0 +BottomMiddlePanelClients=DockSite0,GraphDrawingModel +BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779D1D00000000000002F306000000000000FFFFFFFF +TabDockLeftClients=PropertyInspector=0,DockSite3=1 + +[View0] +CustomEditViewType=TWelcomePageView +WelcomePageURL=bds:/default.htm + +[Watches] +Count=0 + +[WatchWindow] +WatchColumnWidth=120 +WatchShowColumnHeaders=1 +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1121 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1121 +TBDockHeight=213 +LRDockWidth=13602 +Dockable=1 +StayOnTop=0 + +[Breakpoints] +Count=0 + +[EmbarcaderoWin32Debugger_AddressBreakpoints] +Count=0 + +[EmbarcaderoWin64Debugger_AddressBreakpoints] +Count=0 + +[Main Window] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=0 +State=2 +Left=148 +Top=269 +Width=8930 +Height=8520 +MaxLeft=-8 +MaxTop=-11 +MaxWidth=8930 +MaxHeight=8520 +ClientWidth=10000 +ClientHeight=9753 +BottomPanelSize=9121 +BottomPanelClients=EditWindow0 +BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF + +[ProjectManager] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2000 +Height=4226 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=4226 +TBDockHeight=5897 +LRDockWidth=2352 +Dockable=1 +StayOnTop=0 + +[MessageView] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2773 +Height=1424 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2773 +ClientHeight=1424 +TBDockHeight=1424 +LRDockWidth=2773 +Dockable=1 +StayOnTop=0 + +[ToolForm] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2000 +Height=4339 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=4339 +TBDockHeight=7152 +LRDockWidth=2000 +Dockable=1 +StayOnTop=0 + +[ClipboardHistory] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=0 +State=0 +Left=0 +Top=0 +Width=1906 +Height=4989 +MaxLeft=-8 +MaxTop=-11 +ClientWidth=1781 +ClientHeight=4563 +TBDockHeight=4989 +LRDockWidth=1906 +Dockable=1 +StayOnTop=0 + +[ProjectStatistics] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=0 +State=0 +Left=0 +Top=0 +Width=2062 +Height=5740 +MaxLeft=-8 +MaxTop=-11 +ClientWidth=1938 +ClientHeight=5314 +TBDockHeight=5740 +LRDockWidth=2062 +Dockable=1 +StayOnTop=0 + +[ClassBrowserTool] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=-148 +Top=-137 +Width=1844 +Height=3139 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=1844 +ClientHeight=3139 +TBDockHeight=3139 +LRDockWidth=1844 +Dockable=1 +StayOnTop=0 + +[MetricsView] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2336 +Height=1177 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2336 +ClientHeight=1177 +TBDockHeight=4832 +LRDockWidth=3562 +Dockable=1 +StayOnTop=0 + +[QAView] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2336 +Height=1177 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2336 +ClientHeight=1177 +TBDockHeight=4832 +LRDockWidth=3562 +Dockable=1 +StayOnTop=0 + +[PropertyInspector] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=0 +Top=362 +Width=1898 +Height=5370 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=1898 +ClientHeight=5370 +TBDockHeight=7164 +LRDockWidth=1898 +Dockable=1 +StayOnTop=0 +SplitPos=111 + +[frmDesignPreview] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2000 +Height=6861 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=6861 +TBDockHeight=5964 +LRDockWidth=2508 +Dockable=1 +StayOnTop=0 + +[TFileExplorerForm] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=-898 +Top=-137 +Width=2844 +Height=6200 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2844 +ClientHeight=6200 +TBDockHeight=6200 +LRDockWidth=2844 +Dockable=1 +StayOnTop=0 + +[TemplateView] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=-1026 +Top=-137 +Width=273 +Height=359 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=273 +ClientHeight=359 +TBDockHeight=359 +LRDockWidth=273 +Dockable=1 +StayOnTop=0 +Name=120 +Description=334 +filter=1 + +[DebugLogView] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1121 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1121 +TBDockHeight=415 +LRDockWidth=4953 +Dockable=1 +StayOnTop=0 + +[ThreadStatusWindow] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1121 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1121 +TBDockHeight=213 +LRDockWidth=7406 +Dockable=1 +StayOnTop=0 +Column0Width=145 +Column1Width=100 +Column2Width=115 +Column3Width=250 + +[LocalVarsWindow] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1121 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1121 +TBDockHeight=1536 +LRDockWidth=3484 +Dockable=1 +StayOnTop=0 + +[CallStackWindow] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1121 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1121 +TBDockHeight=2063 +LRDockWidth=3484 +Dockable=1 +StayOnTop=0 + +[FindReferencsForm] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2336 +Height=1177 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2336 +ClientHeight=1177 +TBDockHeight=2321 +LRDockWidth=2820 +Dockable=1 +StayOnTop=0 + +[RefactoringForm] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2336 +Height=1177 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2336 +ClientHeight=1177 +TBDockHeight=3206 +LRDockWidth=2820 +Dockable=1 +StayOnTop=0 + +[ToDo List] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2336 +Height=1177 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2336 +ClientHeight=1177 +TBDockHeight=1155 +LRDockWidth=3680 +Dockable=1 +StayOnTop=0 +Column0Width=314 +Column1Width=30 +Column2Width=150 +Column3Width=172 +Column4Width=129 +SortOrder=4 +ShowHints=1 +ShowChecked=1 + +[DataExplorerContainer] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2000 +Height=6861 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=6861 +TBDockHeight=4888 +LRDockWidth=7148 +Dockable=1 +StayOnTop=0 + +[GraphDrawingModel] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2859 +Height=3206 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2859 +ClientHeight=3206 +TBDockHeight=3206 +LRDockWidth=2859 +Dockable=1 +StayOnTop=0 + +[BreakpointWindow] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1121 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1121 +TBDockHeight=1547 +LRDockWidth=8742 +Dockable=1 +StayOnTop=0 +Column0Width=200 +Column1Width=75 +Column2Width=200 +Column3Width=200 +Column4Width=200 +Column5Width=75 +Column6Width=75 + +[StructureView] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=1898 +Height=9170 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=1898 +ClientHeight=9170 +TBDockHeight=3677 +LRDockWidth=1898 +Dockable=1 +StayOnTop=0 + +[ModelViewTool] +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2000 +Height=6861 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=6861 +TBDockHeight=4888 +LRDockWidth=5305 +Dockable=1 +StayOnTop=0 + +[BorlandEditorCodeExplorer@EditWindow0] +PercentageSizes=1 +Create=1 +Visible=0 +Docked=0 +State=0 +Left=0 +Top=0 +Width=1828 +Height=6177 +MaxLeft=-8 +MaxTop=-11 +ClientWidth=1703 +ClientHeight=5751 +TBDockHeight=6177 +LRDockWidth=1828 +Dockable=1 +StayOnTop=0 + +[DockHosts] +DockHostCount=5 + +[DockSite0] +HostDockSite=DockBottomCenterPanel +DockSiteType=1 +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=0 +Top=0 +Width=2336 +Height=1480 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2336 +ClientHeight=1480 +TBDockHeight=1480 +LRDockWidth=2336 +Dockable=1 +StayOnTop=0 +TabPosition=1 +ActiveTabID=RefactoringForm +TabDockClients=RefactoringForm,FindReferencsForm,ToDo List,MetricsView,QAView + +[DockSite1] +HostDockSite=DockBottomPanel +DockSiteType=1 +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=0 +Top=0 +Width=3820 +Height=1424 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=3820 +ClientHeight=1424 +TBDockHeight=1424 +LRDockWidth=3820 +Dockable=1 +StayOnTop=0 +TabPosition=1 +ActiveTabID=DebugLogView +TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow + +[DockSite2] +HostDockSite=DockRightPanel +DockSiteType=1 +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=23 +Width=2000 +Height=4529 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=4529 +TBDockHeight=7164 +LRDockWidth=2000 +Dockable=1 +StayOnTop=0 +TabPosition=1 +ActiveTabID=ProjectManager +TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm + +[DockSite3] +HostDockSite=LeftDockTabSet +DockSiteType=1 +PercentageSizes=1 +Create=1 +Visible=0 +Docked=1 +State=0 +Left=0 +Top=23 +Width=1898 +Height=9170 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=1898 +ClientHeight=9170 +TBDockHeight=7164 +LRDockWidth=1898 +Dockable=1 +StayOnTop=0 +TabPosition=1 +ActiveTabID=StructureView +TabDockClients=StructureView,ClassBrowserTool + +[DockSite4] +HostDockSite=DockRightPanel +DockSiteType=1 +PercentageSizes=1 +Create=1 +Visible=1 +Docked=1 +State=0 +Left=0 +Top=454 +Width=2000 +Height=4339 +MaxLeft=-1 +MaxTop=-1 +ClientWidth=2000 +ClientHeight=4339 +TBDockHeight=7164 +LRDockWidth=2000 +Dockable=1 +StayOnTop=0 +TabPosition=1 +ActiveTabID=ToolForm +TabDockClients=ToolForm,TemplateView + diff --git a/CEF4Delphi.identcache b/source/CEF4Delphi.identcache similarity index 100% rename from CEF4Delphi.identcache rename to source/CEF4Delphi.identcache diff --git a/CEF4Delphi.res b/source/CEF4Delphi.res similarity index 100% rename from CEF4Delphi.res rename to source/CEF4Delphi.res diff --git a/CEF4Delphi.stat b/source/CEF4Delphi.stat similarity index 94% rename from CEF4Delphi.stat rename to source/CEF4Delphi.stat index 99cafae3..52ff6d61 100644 --- a/CEF4Delphi.stat +++ b/source/CEF4Delphi.stat @@ -1,10 +1,10 @@ -[Stats] -EditorSecs=3164 -DesignerSecs=1 -InspectorSecs=5 -CompileSecs=110010 -OtherSecs=842 -StartTime=22/01/2017 10:49:52 -RealKeys=0 -EffectiveKeys=0 -DebugSecs=1 +[Stats] +EditorSecs=3164 +DesignerSecs=1 +InspectorSecs=5 +CompileSecs=110010 +OtherSecs=842 +StartTime=22/01/2017 10:49:52 +RealKeys=0 +EffectiveKeys=0 +DebugSecs=1 diff --git a/chromium.bmp b/source/chromium.bmp similarity index 100% rename from chromium.bmp rename to source/chromium.bmp diff --git a/chromium.dcr b/source/chromium.dcr similarity index 100% rename from chromium.dcr rename to source/chromium.dcr diff --git a/chromium.rc b/source/chromium.rc similarity index 98% rename from chromium.rc rename to source/chromium.rc index 51f074a1..135b2d41 100644 --- a/chromium.rc +++ b/source/chromium.rc @@ -1,2 +1,2 @@ -TChromium BITMAP "chromium.bmp" +TChromium BITMAP "chromium.bmp" TChromiumWindow BITMAP "chromium.bmp" \ No newline at end of file diff --git a/uCEFApplication.pas b/source/uCEFApplication.pas similarity index 97% rename from uCEFApplication.pas rename to source/uCEFApplication.pas index 7e277fdb..fc41e625 100644 --- a/uCEFApplication.pas +++ b/source/uCEFApplication.pas @@ -1,513 +1,513 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFApplication; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - WinApi.Windows, - uCEFTypes, uCEFInterfaces, uCEFBase; - -type - TInternalApp = class; - - TCefApplication = class - protected - FLoaded : boolean; - FMustShutDown : boolean; - FCache : ustring; - FCookies : ustring; - FUserDataPath : ustring; - FUserAgent : ustring; - FProductVersion : ustring; - FLocale : ustring; - FLogFile : ustring; - FBrowserSubprocessPath : ustring; - FLogSeverity : TCefLogSeverity; - FJavaScriptFlags : ustring; - FResourcesDirPath : ustring; - FLocalesDirPath : ustring; - FSingleProcess : Boolean; - FNoSandbox : Boolean; - FCommandLineArgsDisabled : Boolean; - FPackLoadingDisabled : Boolean; - FRemoteDebuggingPort : Integer; - FUncaughtExceptionStackSize : Integer; - FContextSafetyImplementation : Integer; - FPersistSessionCookies : Boolean; - FPersistUserPreferences : boolean; - FIgnoreCertificateErrors : Boolean; - FEnableNetSecurityExpiration : boolean; - FBackgroundColor : TCefColor; - FAcceptLanguageList : ustring; - FWindowsSandboxInfo : Pointer; - FWindowlessRenderingEnabled : Boolean; - FMultiThreadedMessageLoop : boolean; - FExternalMessagePump : boolean; - FDeleteCache : boolean; - FDeleteCookies : boolean; - FApp : TInternalApp; - FAppIntf : ICefApp; - FCustomCommandLine : ustring; - FFlashEnabled : boolean; - - procedure ShutDown; - function ExecuteProcess : integer; - procedure InitializeSettings(var aSettings : TCefSettings); - function InitializeLibrary : boolean; - function CreateInternalApp : boolean; - function MultiExeProcessing : boolean; - function SingleExeProcessing : boolean; - - procedure App_OnBeforeCommandLineProc(const processType: ustring; const commandLine: ICefCommandLine); - - public - constructor Create; - destructor Destroy; override; - function StartMainProcess : boolean; - function StartSubProcess : boolean; - - property Cache : ustring read FCache write FCache; - property Cookies : ustring read FCookies write FCookies; - property UserDataPath : ustring read FUserDataPath write FUserDataPath; - property UserAgent : ustring read FUserAgent write FUserAgent; - property ProductVersion : ustring read FProductVersion write FProductVersion; - property Locale : ustring read FLocale write FLocale; - property LogFile : ustring read FLogFile write FLogFile; - property BrowserSubprocessPath : ustring read FBrowserSubprocessPath write FBrowserSubprocessPath; - property LogSeverity : TCefLogSeverity read FLogSeverity write FLogSeverity; - property JavaScriptFlags : ustring read FJavaScriptFlags write FJavaScriptFlags; - property ResourcesDirPath : ustring read FResourcesDirPath write FResourcesDirPath; - property LocalesDirPath : ustring read FLocalesDirPath write FLocalesDirPath; - property SingleProcess : Boolean read FSingleProcess write FSingleProcess; - property NoSandbox : Boolean read FNoSandbox write FNoSandbox; - property CommandLineArgsDisabled : Boolean read FCommandLineArgsDisabled write FCommandLineArgsDisabled; - property PackLoadingDisabled : Boolean read FPackLoadingDisabled write FPackLoadingDisabled; - property RemoteDebuggingPort : Integer read FRemoteDebuggingPort write FRemoteDebuggingPort; - property UncaughtExceptionStackSize : Integer read FUncaughtExceptionStackSize write FUncaughtExceptionStackSize; - property ContextSafetyImplementation : Integer read FContextSafetyImplementation write FContextSafetyImplementation; - property PersistSessionCookies : Boolean read FPersistSessionCookies write FPersistSessionCookies; - property PersistUserPreferences : Boolean read FPersistUserPreferences write FPersistUserPreferences; - property IgnoreCertificateErrors : Boolean read FIgnoreCertificateErrors write FIgnoreCertificateErrors; - property EnableNetSecurityExpiration : boolean read FEnableNetSecurityExpiration write FEnableNetSecurityExpiration; - property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor; - property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList; - property WindowsSandboxInfo : Pointer read FWindowsSandboxInfo write FWindowsSandboxInfo; - property WindowlessRenderingEnabled : Boolean read FWindowlessRenderingEnabled write FWindowlessRenderingEnabled; - property MultiThreadedMessageLoop : boolean read FMultiThreadedMessageLoop write FMultiThreadedMessageLoop; - property ExternalMessagePump : boolean read FExternalMessagePump write FExternalMessagePump; - property DeleteCache : boolean read FDeleteCache write FDeleteCache; - property DeleteCookies : boolean read FDeleteCookies write FDeleteCookies; - property CustomCommandLine : ustring read FCustomCommandLine write FCustomCommandLine; - property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled; - end; - - TCefAppOwn = class(TCefBaseOwn, ICefApp) - protected - procedure OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine); virtual; abstract; - procedure OnRegisterCustomSchemes(const registrar: ICefSchemeRegistrar); virtual; abstract; - function GetResourceBundleHandler: ICefResourceBundleHandler; virtual; abstract; - function GetBrowserProcessHandler: ICefBrowserProcessHandler; virtual; abstract; - function GetRenderProcessHandler: ICefRenderProcessHandler; virtual; abstract; - - public - constructor Create; virtual; - end; - - TInternalApp = class(TCefAppOwn) - protected - FResourceBundleHandler : ICefResourceBundleHandler; - FBrowserProcessHandler : ICefBrowserProcessHandler; - FRenderProcessHandler : ICefRenderProcessHandler; - FOnBeforeCommandLineProcessing : TOnBeforeCommandLineProcessing; - FOnRegisterCustomSchemes : TOnRegisterCustomSchemes; - - procedure OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine); override; - procedure OnRegisterCustomSchemes(const registrar: ICefSchemeRegistrar); override; - function GetResourceBundleHandler: ICefResourceBundleHandler; override; - function GetBrowserProcessHandler: ICefBrowserProcessHandler; override; - function GetRenderProcessHandler: ICefRenderProcessHandler; override; - - public - constructor Create; override; - - property ResourceBundleHandler : ICefResourceBundleHandler read FResourceBundleHandler write FResourceBundleHandler; - property BrowserProcessHandler : ICefBrowserProcessHandler read FBrowserProcessHandler write FBrowserProcessHandler; - property RenderProcessHandler : ICefRenderProcessHandler read FRenderProcessHandler write FRenderProcessHandler; - property OnBeforeCommandLineProc : TOnBeforeCommandLineProcessing read FOnBeforeCommandLineProcessing write FOnBeforeCommandLineProcessing; - property OnRegCustomSchemes : TOnRegisterCustomSchemes read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes; - end; - -var - GlobalCEFApp : TCefApplication; - -implementation - -uses - System.Math, System.IOUtils, System.SysUtils, - uCEFLibFunctions, uCEFMiscFunctions, uCEFSchemeRegistrar, uCEFCommandLine; - -constructor TCefApplication.Create; -begin - inherited Create; - - FLoaded := False; - FMustShutDown := False; - FCache := ''; - FCookies := ''; - FUserDataPath := ''; - FUserAgent := ''; - FProductVersion := ''; - FLocale := ''; - FLogFile := ''; - FBrowserSubprocessPath := ''; - FLogSeverity := LOGSEVERITY_DISABLE; - FJavaScriptFlags := ''; - FResourcesDirPath := ''; - FLocalesDirPath := ''; - FSingleProcess := False; - FNoSandbox := False; - FCommandLineArgsDisabled := False; - FPackLoadingDisabled := False; - FRemoteDebuggingPort := 0; - FUncaughtExceptionStackSize := 0; - FContextSafetyImplementation := 0; - FPersistSessionCookies := False; - FPersistUserPreferences := False; - FIgnoreCertificateErrors := False; - FEnableNetSecurityExpiration := False; - FBackgroundColor := 0; - FAcceptLanguageList := ''; - FWindowsSandboxInfo := nil; - FWindowlessRenderingEnabled := False; - FMultiThreadedMessageLoop := True; - FExternalMessagePump := False; - FDeleteCache := False; - FDeleteCookies := False; - FApp := nil; - FAppIntf := nil; - FFlashEnabled := True; - FCustomCommandLine := ''; - - IsMultiThread := True; - - SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]); -end; - -destructor TCefApplication.Destroy; -begin - if FLoaded then ShutDown; - - FAppIntf := nil; - FApp := nil; - - inherited Destroy; -end; - -function TCefApplication.CreateInternalApp : boolean; -begin - Result := False; - - try - if (FApp = nil) then - begin - FApp := TInternalApp.Create; - FApp.OnBeforeCommandLineProc := App_OnBeforeCommandLineProc; - FAppIntf := FApp as ICefApp; - Result := (FAppIntf <> nil); - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TCefApplication.CreateInternalApp error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TCefApplication.MultiExeProcessing : boolean; -begin - Result := False; - - try - FLoaded := True; - FMustShutDown := True; - Result := CreateInternalApp and InitializeLibrary; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TCefApplication.MultiExeProcessing error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TCefApplication.SingleExeProcessing : boolean; -begin - Result := False; - - try - FLoaded := True; - - if CreateInternalApp and (ExecuteProcess < 0) then - begin - FMustShutDown := True; - Result := InitializeLibrary; - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TCefApplication.SingleExeProcessing error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TCefApplication.StartMainProcess : boolean; -begin - if not(FSingleProcess) and (length(FBrowserSubprocessPath) > 0) then - Result := MultiExeProcessing - else - Result := SingleExeProcessing; -end; - -function TCefApplication.StartSubProcess : boolean; -begin - Result := False; - - try - if not(FSingleProcess) then - begin - FLoaded := True; - Result := CreateInternalApp and (ExecuteProcess >= 0); - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TCefApplication.StartSubProcess error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TCefApplication.ShutDown; -begin - try - if FMustShutDown then cef_shutdown; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TCefApplication.ShutDown error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TCefApplication.ExecuteProcess : integer; -var - TempArgs : TCefMainArgs; -begin - TempArgs.instance := HINSTANCE; - Result := cef_execute_process(@TempArgs, CefGetData(FAppIntf), FWindowsSandboxInfo); -end; - -procedure TCefApplication.InitializeSettings(var aSettings : TCefSettings); -begin - aSettings.size := SizeOf(TCefSettings); - aSettings.single_process := Ord(FSingleProcess); - aSettings.no_sandbox := Ord(FNoSandbox); - aSettings.multi_threaded_message_loop := Ord(FMultiThreadedMessageLoop); - aSettings.external_message_pump := Ord(FExternalMessagePump); - aSettings.windowless_rendering_enabled := Ord(FWindowlessRenderingEnabled); - aSettings.cache_path := CefString(FCache); - aSettings.user_data_path := CefString(FUserDataPath); - aSettings.persist_session_cookies := Ord(FPersistSessionCookies); - aSettings.persist_user_preferences := Ord(FPersistUserPreferences); - aSettings.browser_subprocess_path := CefString(FBrowserSubprocessPath); - aSettings.command_line_args_disabled := Ord(FCommandLineArgsDisabled); - aSettings.user_agent := CefString(FUserAgent); - aSettings.product_version := CefString(FProductVersion); - aSettings.locale := CefString(FLocale); - aSettings.log_file := CefString(FLogFile); - aSettings.log_severity := FLogSeverity; - aSettings.javascript_flags := CefString(FJavaScriptFlags); - aSettings.resources_dir_path := CefString(FResourcesDirPath); - aSettings.locales_dir_path := CefString(FLocalesDirPath); - aSettings.pack_loading_disabled := Ord(FPackLoadingDisabled); - aSettings.remote_debugging_port := FRemoteDebuggingPort; - aSettings.uncaught_exception_stack_size := FUncaughtExceptionStackSize; - aSettings.context_safety_implementation := FContextSafetyImplementation; - aSettings.ignore_certificate_errors := Ord(FIgnoreCertificateErrors); - aSettings.enable_net_security_expiration := Ord(FEnableNetSecurityExpiration); - aSettings.background_color := FBackgroundColor; - aSettings.accept_language_list := CefString(FAcceptLanguageList); -end; - -function TCefApplication.InitializeLibrary : boolean; -var - TempSettings : TCefSettings; -begin - Result := False; - - try - if FDeleteCache and (length(FCache) > 0) then TDirectory.Delete(FCache, True); - if FDeleteCookies and (length(FCookies) > 0) then TDirectory.Delete(FCookies, True); - - InitializeSettings(TempSettings); - Result := (cef_initialize(@HInstance, @TempSettings, CefGetData(FAppIntf), FWindowsSandboxInfo) <> 0); - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TCefApplication.InitializeLibrary error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TCefApplication.App_OnBeforeCommandLineProc(const processType : ustring; - const commandLine : ICefCommandLine); -begin - if (commandLine <> nil) then - begin - if FFlashEnabled then - begin - commandLine.AppendSwitch('--enable-gpu-plugin'); - commandLine.AppendSwitch('--enable-accelerated-plugins'); - commandLine.AppendSwitch('--enable-system-flash'); - end; - - if (length(FCustomCommandLine) > 0) then commandLine.AppendSwitch(FCustomCommandLine); - end; -end; - -// TCefAppOwn - -procedure cef_app_on_before_command_line_processing(self: PCefApp; - const process_type: PCefString; command_line: PCefCommandLine); stdcall; -begin - with TCefAppOwn(CefGetObject(self)) do - OnBeforeCommandLineProcessing(CefString(process_type), TCefCommandLineRef.UnWrap(command_line)); -end; - -procedure cef_app_on_register_custom_schemes(self: PCefApp; registrar: PCefSchemeRegistrar); stdcall; -begin - with TCefAppOwn(CefGetObject(self)) do - OnRegisterCustomSchemes(TCefSchemeRegistrarRef.UnWrap(registrar)); -end; - -function cef_app_get_resource_bundle_handler(self: PCefApp): PCefResourceBundleHandler; stdcall; -begin - Result := CefGetData(TCefAppOwn(CefGetObject(self)).GetResourceBundleHandler()); -end; - -function cef_app_get_browser_process_handler(self: PCefApp): PCefBrowserProcessHandler; stdcall; -begin - Result := CefGetData(TCefAppOwn(CefGetObject(self)).GetBrowserProcessHandler()); -end; - -function cef_app_get_render_process_handler(self: PCefApp): PCefRenderProcessHandler; stdcall; -begin - Result := CefGetData(TCefAppOwn(CefGetObject(self)).GetRenderProcessHandler()); -end; - - -constructor TCefAppOwn.Create; -begin - inherited CreateData(SizeOf(TCefApp)); - - with PCefApp(FData)^ do - begin - on_before_command_line_processing := cef_app_on_before_command_line_processing; - on_register_custom_schemes := cef_app_on_register_custom_schemes; - get_resource_bundle_handler := cef_app_get_resource_bundle_handler; - get_browser_process_handler := cef_app_get_browser_process_handler; - get_render_process_handler := cef_app_get_render_process_handler; - end; -end; - -// TInternalApp - -procedure TInternalApp.OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine); -begin - if Assigned(FOnBeforeCommandLineProcessing) then FOnBeforeCommandLineProcessing(processType, commandLine); -end; - -procedure TInternalApp.OnRegisterCustomSchemes(const registrar: ICefSchemeRegistrar); -begin - - if Assigned(FOnRegisterCustomSchemes) then FOnRegisterCustomSchemes(registrar); -end; - -function TInternalApp.GetResourceBundleHandler: ICefResourceBundleHandler; -begin - Result := FResourceBundleHandler; -end; - -function TInternalApp.GetBrowserProcessHandler: ICefBrowserProcessHandler; -begin - Result := FBrowserProcessHandler; -end; - -function TInternalApp.GetRenderProcessHandler: ICefRenderProcessHandler; -begin - Result := FRenderProcessHandler; -end; - -constructor TInternalApp.Create; -begin - inherited Create; - - FResourceBundleHandler := nil; - FBrowserProcessHandler := nil; - FRenderProcessHandler := nil; - FOnBeforeCommandLineProcessing := nil; - FOnRegisterCustomSchemes := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFApplication; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + WinApi.Windows, + uCEFTypes, uCEFInterfaces, uCEFBase; + +type + TInternalApp = class; + + TCefApplication = class + protected + FLoaded : boolean; + FMustShutDown : boolean; + FCache : ustring; + FCookies : ustring; + FUserDataPath : ustring; + FUserAgent : ustring; + FProductVersion : ustring; + FLocale : ustring; + FLogFile : ustring; + FBrowserSubprocessPath : ustring; + FLogSeverity : TCefLogSeverity; + FJavaScriptFlags : ustring; + FResourcesDirPath : ustring; + FLocalesDirPath : ustring; + FSingleProcess : Boolean; + FNoSandbox : Boolean; + FCommandLineArgsDisabled : Boolean; + FPackLoadingDisabled : Boolean; + FRemoteDebuggingPort : Integer; + FUncaughtExceptionStackSize : Integer; + FContextSafetyImplementation : Integer; + FPersistSessionCookies : Boolean; + FPersistUserPreferences : boolean; + FIgnoreCertificateErrors : Boolean; + FEnableNetSecurityExpiration : boolean; + FBackgroundColor : TCefColor; + FAcceptLanguageList : ustring; + FWindowsSandboxInfo : Pointer; + FWindowlessRenderingEnabled : Boolean; + FMultiThreadedMessageLoop : boolean; + FExternalMessagePump : boolean; + FDeleteCache : boolean; + FDeleteCookies : boolean; + FApp : TInternalApp; + FAppIntf : ICefApp; + FCustomCommandLine : ustring; + FFlashEnabled : boolean; + + procedure ShutDown; + function ExecuteProcess : integer; + procedure InitializeSettings(var aSettings : TCefSettings); + function InitializeLibrary : boolean; + function CreateInternalApp : boolean; + function MultiExeProcessing : boolean; + function SingleExeProcessing : boolean; + + procedure App_OnBeforeCommandLineProc(const processType: ustring; const commandLine: ICefCommandLine); + + public + constructor Create; + destructor Destroy; override; + function StartMainProcess : boolean; + function StartSubProcess : boolean; + + property Cache : ustring read FCache write FCache; + property Cookies : ustring read FCookies write FCookies; + property UserDataPath : ustring read FUserDataPath write FUserDataPath; + property UserAgent : ustring read FUserAgent write FUserAgent; + property ProductVersion : ustring read FProductVersion write FProductVersion; + property Locale : ustring read FLocale write FLocale; + property LogFile : ustring read FLogFile write FLogFile; + property BrowserSubprocessPath : ustring read FBrowserSubprocessPath write FBrowserSubprocessPath; + property LogSeverity : TCefLogSeverity read FLogSeverity write FLogSeverity; + property JavaScriptFlags : ustring read FJavaScriptFlags write FJavaScriptFlags; + property ResourcesDirPath : ustring read FResourcesDirPath write FResourcesDirPath; + property LocalesDirPath : ustring read FLocalesDirPath write FLocalesDirPath; + property SingleProcess : Boolean read FSingleProcess write FSingleProcess; + property NoSandbox : Boolean read FNoSandbox write FNoSandbox; + property CommandLineArgsDisabled : Boolean read FCommandLineArgsDisabled write FCommandLineArgsDisabled; + property PackLoadingDisabled : Boolean read FPackLoadingDisabled write FPackLoadingDisabled; + property RemoteDebuggingPort : Integer read FRemoteDebuggingPort write FRemoteDebuggingPort; + property UncaughtExceptionStackSize : Integer read FUncaughtExceptionStackSize write FUncaughtExceptionStackSize; + property ContextSafetyImplementation : Integer read FContextSafetyImplementation write FContextSafetyImplementation; + property PersistSessionCookies : Boolean read FPersistSessionCookies write FPersistSessionCookies; + property PersistUserPreferences : Boolean read FPersistUserPreferences write FPersistUserPreferences; + property IgnoreCertificateErrors : Boolean read FIgnoreCertificateErrors write FIgnoreCertificateErrors; + property EnableNetSecurityExpiration : boolean read FEnableNetSecurityExpiration write FEnableNetSecurityExpiration; + property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor; + property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList; + property WindowsSandboxInfo : Pointer read FWindowsSandboxInfo write FWindowsSandboxInfo; + property WindowlessRenderingEnabled : Boolean read FWindowlessRenderingEnabled write FWindowlessRenderingEnabled; + property MultiThreadedMessageLoop : boolean read FMultiThreadedMessageLoop write FMultiThreadedMessageLoop; + property ExternalMessagePump : boolean read FExternalMessagePump write FExternalMessagePump; + property DeleteCache : boolean read FDeleteCache write FDeleteCache; + property DeleteCookies : boolean read FDeleteCookies write FDeleteCookies; + property CustomCommandLine : ustring read FCustomCommandLine write FCustomCommandLine; + property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled; + end; + + TCefAppOwn = class(TCefBaseOwn, ICefApp) + protected + procedure OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine); virtual; abstract; + procedure OnRegisterCustomSchemes(const registrar: ICefSchemeRegistrar); virtual; abstract; + function GetResourceBundleHandler: ICefResourceBundleHandler; virtual; abstract; + function GetBrowserProcessHandler: ICefBrowserProcessHandler; virtual; abstract; + function GetRenderProcessHandler: ICefRenderProcessHandler; virtual; abstract; + + public + constructor Create; virtual; + end; + + TInternalApp = class(TCefAppOwn) + protected + FResourceBundleHandler : ICefResourceBundleHandler; + FBrowserProcessHandler : ICefBrowserProcessHandler; + FRenderProcessHandler : ICefRenderProcessHandler; + FOnBeforeCommandLineProcessing : TOnBeforeCommandLineProcessing; + FOnRegisterCustomSchemes : TOnRegisterCustomSchemes; + + procedure OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine); override; + procedure OnRegisterCustomSchemes(const registrar: ICefSchemeRegistrar); override; + function GetResourceBundleHandler: ICefResourceBundleHandler; override; + function GetBrowserProcessHandler: ICefBrowserProcessHandler; override; + function GetRenderProcessHandler: ICefRenderProcessHandler; override; + + public + constructor Create; override; + + property ResourceBundleHandler : ICefResourceBundleHandler read FResourceBundleHandler write FResourceBundleHandler; + property BrowserProcessHandler : ICefBrowserProcessHandler read FBrowserProcessHandler write FBrowserProcessHandler; + property RenderProcessHandler : ICefRenderProcessHandler read FRenderProcessHandler write FRenderProcessHandler; + property OnBeforeCommandLineProc : TOnBeforeCommandLineProcessing read FOnBeforeCommandLineProcessing write FOnBeforeCommandLineProcessing; + property OnRegCustomSchemes : TOnRegisterCustomSchemes read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes; + end; + +var + GlobalCEFApp : TCefApplication; + +implementation + +uses + System.Math, System.IOUtils, System.SysUtils, + uCEFLibFunctions, uCEFMiscFunctions, uCEFSchemeRegistrar, uCEFCommandLine; + +constructor TCefApplication.Create; +begin + inherited Create; + + FLoaded := False; + FMustShutDown := False; + FCache := ''; + FCookies := ''; + FUserDataPath := ''; + FUserAgent := ''; + FProductVersion := ''; + FLocale := ''; + FLogFile := ''; + FBrowserSubprocessPath := ''; + FLogSeverity := LOGSEVERITY_DISABLE; + FJavaScriptFlags := ''; + FResourcesDirPath := ''; + FLocalesDirPath := ''; + FSingleProcess := False; + FNoSandbox := False; + FCommandLineArgsDisabled := False; + FPackLoadingDisabled := False; + FRemoteDebuggingPort := 0; + FUncaughtExceptionStackSize := 0; + FContextSafetyImplementation := 0; + FPersistSessionCookies := False; + FPersistUserPreferences := False; + FIgnoreCertificateErrors := False; + FEnableNetSecurityExpiration := False; + FBackgroundColor := 0; + FAcceptLanguageList := ''; + FWindowsSandboxInfo := nil; + FWindowlessRenderingEnabled := False; + FMultiThreadedMessageLoop := True; + FExternalMessagePump := False; + FDeleteCache := False; + FDeleteCookies := False; + FApp := nil; + FAppIntf := nil; + FFlashEnabled := True; + FCustomCommandLine := ''; + + IsMultiThread := True; + + SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]); +end; + +destructor TCefApplication.Destroy; +begin + if FLoaded then ShutDown; + + FAppIntf := nil; + FApp := nil; + + inherited Destroy; +end; + +function TCefApplication.CreateInternalApp : boolean; +begin + Result := False; + + try + if (FApp = nil) then + begin + FApp := TInternalApp.Create; + FApp.OnBeforeCommandLineProc := App_OnBeforeCommandLineProc; + FAppIntf := FApp as ICefApp; + Result := (FAppIntf <> nil); + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TCefApplication.CreateInternalApp error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TCefApplication.MultiExeProcessing : boolean; +begin + Result := False; + + try + FLoaded := True; + FMustShutDown := True; + Result := CreateInternalApp and InitializeLibrary; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TCefApplication.MultiExeProcessing error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TCefApplication.SingleExeProcessing : boolean; +begin + Result := False; + + try + FLoaded := True; + + if CreateInternalApp and (ExecuteProcess < 0) then + begin + FMustShutDown := True; + Result := InitializeLibrary; + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TCefApplication.SingleExeProcessing error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TCefApplication.StartMainProcess : boolean; +begin + if not(FSingleProcess) and (length(FBrowserSubprocessPath) > 0) then + Result := MultiExeProcessing + else + Result := SingleExeProcessing; +end; + +function TCefApplication.StartSubProcess : boolean; +begin + Result := False; + + try + if not(FSingleProcess) then + begin + FLoaded := True; + Result := CreateInternalApp and (ExecuteProcess >= 0); + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TCefApplication.StartSubProcess error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TCefApplication.ShutDown; +begin + try + if FMustShutDown then cef_shutdown; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TCefApplication.ShutDown error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TCefApplication.ExecuteProcess : integer; +var + TempArgs : TCefMainArgs; +begin + TempArgs.instance := HINSTANCE; + Result := cef_execute_process(@TempArgs, CefGetData(FAppIntf), FWindowsSandboxInfo); +end; + +procedure TCefApplication.InitializeSettings(var aSettings : TCefSettings); +begin + aSettings.size := SizeOf(TCefSettings); + aSettings.single_process := Ord(FSingleProcess); + aSettings.no_sandbox := Ord(FNoSandbox); + aSettings.multi_threaded_message_loop := Ord(FMultiThreadedMessageLoop); + aSettings.external_message_pump := Ord(FExternalMessagePump); + aSettings.windowless_rendering_enabled := Ord(FWindowlessRenderingEnabled); + aSettings.cache_path := CefString(FCache); + aSettings.user_data_path := CefString(FUserDataPath); + aSettings.persist_session_cookies := Ord(FPersistSessionCookies); + aSettings.persist_user_preferences := Ord(FPersistUserPreferences); + aSettings.browser_subprocess_path := CefString(FBrowserSubprocessPath); + aSettings.command_line_args_disabled := Ord(FCommandLineArgsDisabled); + aSettings.user_agent := CefString(FUserAgent); + aSettings.product_version := CefString(FProductVersion); + aSettings.locale := CefString(FLocale); + aSettings.log_file := CefString(FLogFile); + aSettings.log_severity := FLogSeverity; + aSettings.javascript_flags := CefString(FJavaScriptFlags); + aSettings.resources_dir_path := CefString(FResourcesDirPath); + aSettings.locales_dir_path := CefString(FLocalesDirPath); + aSettings.pack_loading_disabled := Ord(FPackLoadingDisabled); + aSettings.remote_debugging_port := FRemoteDebuggingPort; + aSettings.uncaught_exception_stack_size := FUncaughtExceptionStackSize; + aSettings.context_safety_implementation := FContextSafetyImplementation; + aSettings.ignore_certificate_errors := Ord(FIgnoreCertificateErrors); + aSettings.enable_net_security_expiration := Ord(FEnableNetSecurityExpiration); + aSettings.background_color := FBackgroundColor; + aSettings.accept_language_list := CefString(FAcceptLanguageList); +end; + +function TCefApplication.InitializeLibrary : boolean; +var + TempSettings : TCefSettings; +begin + Result := False; + + try + if FDeleteCache and (length(FCache) > 0) then TDirectory.Delete(FCache, True); + if FDeleteCookies and (length(FCookies) > 0) then TDirectory.Delete(FCookies, True); + + InitializeSettings(TempSettings); + Result := (cef_initialize(@HInstance, @TempSettings, CefGetData(FAppIntf), FWindowsSandboxInfo) <> 0); + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TCefApplication.InitializeLibrary error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TCefApplication.App_OnBeforeCommandLineProc(const processType : ustring; + const commandLine : ICefCommandLine); +begin + if (commandLine <> nil) then + begin + if FFlashEnabled then + begin + commandLine.AppendSwitch('--enable-gpu-plugin'); + commandLine.AppendSwitch('--enable-accelerated-plugins'); + commandLine.AppendSwitch('--enable-system-flash'); + end; + + if (length(FCustomCommandLine) > 0) then commandLine.AppendSwitch(FCustomCommandLine); + end; +end; + +// TCefAppOwn + +procedure cef_app_on_before_command_line_processing(self: PCefApp; + const process_type: PCefString; command_line: PCefCommandLine); stdcall; +begin + with TCefAppOwn(CefGetObject(self)) do + OnBeforeCommandLineProcessing(CefString(process_type), TCefCommandLineRef.UnWrap(command_line)); +end; + +procedure cef_app_on_register_custom_schemes(self: PCefApp; registrar: PCefSchemeRegistrar); stdcall; +begin + with TCefAppOwn(CefGetObject(self)) do + OnRegisterCustomSchemes(TCefSchemeRegistrarRef.UnWrap(registrar)); +end; + +function cef_app_get_resource_bundle_handler(self: PCefApp): PCefResourceBundleHandler; stdcall; +begin + Result := CefGetData(TCefAppOwn(CefGetObject(self)).GetResourceBundleHandler()); +end; + +function cef_app_get_browser_process_handler(self: PCefApp): PCefBrowserProcessHandler; stdcall; +begin + Result := CefGetData(TCefAppOwn(CefGetObject(self)).GetBrowserProcessHandler()); +end; + +function cef_app_get_render_process_handler(self: PCefApp): PCefRenderProcessHandler; stdcall; +begin + Result := CefGetData(TCefAppOwn(CefGetObject(self)).GetRenderProcessHandler()); +end; + + +constructor TCefAppOwn.Create; +begin + inherited CreateData(SizeOf(TCefApp)); + + with PCefApp(FData)^ do + begin + on_before_command_line_processing := cef_app_on_before_command_line_processing; + on_register_custom_schemes := cef_app_on_register_custom_schemes; + get_resource_bundle_handler := cef_app_get_resource_bundle_handler; + get_browser_process_handler := cef_app_get_browser_process_handler; + get_render_process_handler := cef_app_get_render_process_handler; + end; +end; + +// TInternalApp + +procedure TInternalApp.OnBeforeCommandLineProcessing(const processType: ustring; const commandLine: ICefCommandLine); +begin + if Assigned(FOnBeforeCommandLineProcessing) then FOnBeforeCommandLineProcessing(processType, commandLine); +end; + +procedure TInternalApp.OnRegisterCustomSchemes(const registrar: ICefSchemeRegistrar); +begin + + if Assigned(FOnRegisterCustomSchemes) then FOnRegisterCustomSchemes(registrar); +end; + +function TInternalApp.GetResourceBundleHandler: ICefResourceBundleHandler; +begin + Result := FResourceBundleHandler; +end; + +function TInternalApp.GetBrowserProcessHandler: ICefBrowserProcessHandler; +begin + Result := FBrowserProcessHandler; +end; + +function TInternalApp.GetRenderProcessHandler: ICefRenderProcessHandler; +begin + Result := FRenderProcessHandler; +end; + +constructor TInternalApp.Create; +begin + inherited Create; + + FResourceBundleHandler := nil; + FBrowserProcessHandler := nil; + FRenderProcessHandler := nil; + FOnBeforeCommandLineProcessing := nil; + FOnRegisterCustomSchemes := nil; +end; + +end. diff --git a/uCEFAuthCallback.pas b/source/uCEFAuthCallback.pas similarity index 96% rename from uCEFAuthCallback.pas rename to source/uCEFAuthCallback.pas index 3d8cf268..fdc058ce 100644 --- a/uCEFAuthCallback.pas +++ b/source/uCEFAuthCallback.pas @@ -1,86 +1,86 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFAuthCallback; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefAuthCallbackRef = class(TCefBaseRef, ICefAuthCallback) - protected - procedure Cont(const username, password: ustring); - procedure Cancel; - - public - class function UnWrap(data: Pointer): ICefAuthCallback; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -procedure TCefAuthCallbackRef.Cancel; -begin - PCefAuthCallback(FData).cancel(PCefAuthCallback(FData)); -end; - -procedure TCefAuthCallbackRef.Cont(const username, password: ustring); -var - u, p: TCefString; -begin - u := CefString(username); - p := CefString(password); - PCefAuthCallback(FData).cont(PCefAuthCallback(FData), @u, @p); -end; - -class function TCefAuthCallbackRef.UnWrap(data: Pointer): ICefAuthCallback; -begin - if data <> nil then - Result := Create(data) as ICefAuthCallback else - Result := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFAuthCallback; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefAuthCallbackRef = class(TCefBaseRef, ICefAuthCallback) + protected + procedure Cont(const username, password: ustring); + procedure Cancel; + + public + class function UnWrap(data: Pointer): ICefAuthCallback; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + +procedure TCefAuthCallbackRef.Cancel; +begin + PCefAuthCallback(FData).cancel(PCefAuthCallback(FData)); +end; + +procedure TCefAuthCallbackRef.Cont(const username, password: ustring); +var + u, p: TCefString; +begin + u := CefString(username); + p := CefString(password); + PCefAuthCallback(FData).cont(PCefAuthCallback(FData), @u, @p); +end; + +class function TCefAuthCallbackRef.UnWrap(data: Pointer): ICefAuthCallback; +begin + if data <> nil then + Result := Create(data) as ICefAuthCallback else + Result := nil; +end; + +end. diff --git a/uCEFBase.pas b/source/uCEFBase.pas similarity index 96% rename from uCEFBase.pas rename to source/uCEFBase.pas index ae56e4b3..e40810df 100644 --- a/uCEFBase.pas +++ b/source/uCEFBase.pas @@ -1,172 +1,172 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFBase; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFInterfaces; - -type - TCefBaseOwn = class(TInterfacedObject, ICefBase) - protected - FData: Pointer; - - public - constructor CreateData(size: Cardinal; owned: Boolean = False); virtual; - destructor Destroy; override; - function Wrap: Pointer; - end; - - TCefBaseRef = class(TInterfacedObject, ICefBase) - protected - FData: Pointer; - - public - constructor Create(data: Pointer); virtual; - destructor Destroy; override; - function Wrap: Pointer; - class function UnWrap(data: Pointer): ICefBase; - end; - -implementation - -uses - uCEFTypes, uCEFMiscFunctions; - -procedure cef_base_add_ref(self: PCefBase); stdcall; -begin - TCefBaseOwn(CefGetObject(self))._AddRef; -end; - -function cef_base_release(self: PCefBase): Integer; stdcall; -begin - Result := TCefBaseOwn(CefGetObject(self))._Release; -end; - -function cef_base_has_one_ref(self: PCefBase): Integer; stdcall; -begin - Result := Ord(TCefBaseOwn(CefGetObject(self)).FRefCount = 1); -end; - -procedure cef_base_add_ref_owned(self: PCefBase); stdcall; -begin - // -end; - -function cef_base_release_owned(self: PCefBase): Integer; stdcall; -begin - Result := 1; -end; - -function cef_base_has_one_ref_owned(self: PCefBase): Integer; stdcall; -begin - Result := 1; -end; - -constructor TCefBaseOwn.CreateData(size: Cardinal; owned: Boolean); -begin - GetMem(FData, size + SizeOf(Pointer)); - PPointer(FData)^ := Self; - Inc(PByte(FData), SizeOf(Pointer)); - FillChar(FData^, size, 0); - PCefBase(FData)^.size := size; - - if owned then - begin - PCefBase(FData)^.add_ref := cef_base_add_ref_owned; - PCefBase(FData)^.release := cef_base_release_owned; - PCefBase(FData)^.has_one_ref := cef_base_has_one_ref_owned; - end - else - begin - PCefBase(FData)^.add_ref := cef_base_add_ref; - PCefBase(FData)^.release := cef_base_release; - PCefBase(FData)^.has_one_ref := cef_base_has_one_ref; - end; -end; - -destructor TCefBaseOwn.Destroy; -begin - Dec(PByte(FData), SizeOf(Pointer)); - FreeMem(FData); - inherited; -end; - -function TCefBaseOwn.Wrap: Pointer; -begin - Result := FData; - if Assigned(PCefBase(FData)^.add_ref) then - PCefBase(FData)^.add_ref(PCefBase(FData)); -end; - -// TCefBaseRef - -constructor TCefBaseRef.Create(data: Pointer); -begin - Assert(data <> nil); - FData := data; -end; - -destructor TCefBaseRef.Destroy; -begin - if (FData <> nil) and Assigned(PCefBase(FData)^.release) then PCefBase(FData)^.release(PCefBase(FData)); - - inherited Destroy; -end; - -class function TCefBaseRef.UnWrap(data: Pointer): ICefBase; -begin - if data <> nil then - Result := Create(data) as ICefBase else - Result := nil; -end; - -function TCefBaseRef.Wrap: Pointer; -begin - Result := FData; - if Assigned(PCefBase(FData)^.add_ref) then - PCefBase(FData)^.add_ref(PCefBase(FData)); -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFBase; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFInterfaces; + +type + TCefBaseOwn = class(TInterfacedObject, ICefBase) + protected + FData: Pointer; + + public + constructor CreateData(size: Cardinal; owned: Boolean = False); virtual; + destructor Destroy; override; + function Wrap: Pointer; + end; + + TCefBaseRef = class(TInterfacedObject, ICefBase) + protected + FData: Pointer; + + public + constructor Create(data: Pointer); virtual; + destructor Destroy; override; + function Wrap: Pointer; + class function UnWrap(data: Pointer): ICefBase; + end; + +implementation + +uses + uCEFTypes, uCEFMiscFunctions; + +procedure cef_base_add_ref(self: PCefBase); stdcall; +begin + TCefBaseOwn(CefGetObject(self))._AddRef; +end; + +function cef_base_release(self: PCefBase): Integer; stdcall; +begin + Result := TCefBaseOwn(CefGetObject(self))._Release; +end; + +function cef_base_has_one_ref(self: PCefBase): Integer; stdcall; +begin + Result := Ord(TCefBaseOwn(CefGetObject(self)).FRefCount = 1); +end; + +procedure cef_base_add_ref_owned(self: PCefBase); stdcall; +begin + // +end; + +function cef_base_release_owned(self: PCefBase): Integer; stdcall; +begin + Result := 1; +end; + +function cef_base_has_one_ref_owned(self: PCefBase): Integer; stdcall; +begin + Result := 1; +end; + +constructor TCefBaseOwn.CreateData(size: Cardinal; owned: Boolean); +begin + GetMem(FData, size + SizeOf(Pointer)); + PPointer(FData)^ := Self; + Inc(PByte(FData), SizeOf(Pointer)); + FillChar(FData^, size, 0); + PCefBase(FData)^.size := size; + + if owned then + begin + PCefBase(FData)^.add_ref := cef_base_add_ref_owned; + PCefBase(FData)^.release := cef_base_release_owned; + PCefBase(FData)^.has_one_ref := cef_base_has_one_ref_owned; + end + else + begin + PCefBase(FData)^.add_ref := cef_base_add_ref; + PCefBase(FData)^.release := cef_base_release; + PCefBase(FData)^.has_one_ref := cef_base_has_one_ref; + end; +end; + +destructor TCefBaseOwn.Destroy; +begin + Dec(PByte(FData), SizeOf(Pointer)); + FreeMem(FData); + inherited; +end; + +function TCefBaseOwn.Wrap: Pointer; +begin + Result := FData; + if Assigned(PCefBase(FData)^.add_ref) then + PCefBase(FData)^.add_ref(PCefBase(FData)); +end; + +// TCefBaseRef + +constructor TCefBaseRef.Create(data: Pointer); +begin + Assert(data <> nil); + FData := data; +end; + +destructor TCefBaseRef.Destroy; +begin + if (FData <> nil) and Assigned(PCefBase(FData)^.release) then PCefBase(FData)^.release(PCefBase(FData)); + + inherited Destroy; +end; + +class function TCefBaseRef.UnWrap(data: Pointer): ICefBase; +begin + if data <> nil then + Result := Create(data) as ICefBase else + Result := nil; +end; + +function TCefBaseRef.Wrap: Pointer; +begin + Result := FData; + if Assigned(PCefBase(FData)^.add_ref) then + PCefBase(FData)^.add_ref(PCefBase(FData)); +end; + +end. diff --git a/uCEFBeforeDownloadCallback.pas b/source/uCEFBeforeDownloadCallback.pas similarity index 96% rename from uCEFBeforeDownloadCallback.pas rename to source/uCEFBeforeDownloadCallback.pas index 83b85814..c8af7e1b 100644 --- a/uCEFBeforeDownloadCallback.pas +++ b/source/uCEFBeforeDownloadCallback.pas @@ -1,81 +1,81 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFBeforeDownloadCallback; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefBeforeDownloadCallbackRef = class(TCefBaseRef, ICefBeforeDownloadCallback) - protected - procedure Cont(const downloadPath: ustring; showDialog: Boolean); - - public - class function UnWrap(data: Pointer): ICefBeforeDownloadCallback; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -procedure TCefBeforeDownloadCallbackRef.Cont(const downloadPath: ustring; - showDialog: Boolean); -var - dp: TCefString; -begin - dp := CefString(downloadPath); - PCefBeforeDownloadCallback(FData).cont(PCefBeforeDownloadCallback(FData), @dp, Ord(showDialog)); -end; - -class function TCefBeforeDownloadCallbackRef.UnWrap( - data: Pointer): ICefBeforeDownloadCallback; -begin - if data <> nil then - Result := Create(data) as ICefBeforeDownloadCallback else - Result := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFBeforeDownloadCallback; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefBeforeDownloadCallbackRef = class(TCefBaseRef, ICefBeforeDownloadCallback) + protected + procedure Cont(const downloadPath: ustring; showDialog: Boolean); + + public + class function UnWrap(data: Pointer): ICefBeforeDownloadCallback; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + +procedure TCefBeforeDownloadCallbackRef.Cont(const downloadPath: ustring; + showDialog: Boolean); +var + dp: TCefString; +begin + dp := CefString(downloadPath); + PCefBeforeDownloadCallback(FData).cont(PCefBeforeDownloadCallback(FData), @dp, Ord(showDialog)); +end; + +class function TCefBeforeDownloadCallbackRef.UnWrap( + data: Pointer): ICefBeforeDownloadCallback; +begin + if data <> nil then + Result := Create(data) as ICefBeforeDownloadCallback else + Result := nil; +end; + +end. diff --git a/uCEFBinaryValue.pas b/source/uCEFBinaryValue.pas similarity index 97% rename from uCEFBinaryValue.pas rename to source/uCEFBinaryValue.pas index 6e23eeda..ba53d094 100644 --- a/uCEFBinaryValue.pas +++ b/source/uCEFBinaryValue.pas @@ -1,119 +1,119 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFBinaryValue; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces; - -type - TCefBinaryValueRef = class(TCefBaseRef, ICefBinaryValue) - protected - function IsValid: Boolean; - function IsOwned: Boolean; - function IsSame(const that: ICefBinaryValue): Boolean; - function IsEqual(const that: ICefBinaryValue): Boolean; - function Copy: ICefBinaryValue; - function GetSize: NativeUInt; - function GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt; - - public - class function UnWrap(data: Pointer): ICefBinaryValue; - class function New(const data: Pointer; dataSize: NativeUInt): ICefBinaryValue; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFTypes; - -function TCefBinaryValueRef.Copy: ICefBinaryValue; -begin - Result := UnWrap(PCefBinaryValue(FData).copy(PCefBinaryValue(FData))); -end; - -function TCefBinaryValueRef.GetData(buffer: Pointer; bufferSize, - dataOffset: NativeUInt): NativeUInt; -begin - Result := PCefBinaryValue(FData).get_data(PCefBinaryValue(FData), buffer, bufferSize, dataOffset); -end; - -function TCefBinaryValueRef.GetSize: NativeUInt; -begin - Result := PCefBinaryValue(FData).get_size(PCefBinaryValue(FData)); -end; - -function TCefBinaryValueRef.IsEqual(const that: ICefBinaryValue): Boolean; -begin - Result := PCefBinaryValue(FData).is_equal(PCefBinaryValue(FData), CefGetData(that)) <> 0; -end; - -function TCefBinaryValueRef.IsOwned: Boolean; -begin - Result := PCefBinaryValue(FData).is_owned(PCefBinaryValue(FData)) <> 0; -end; - -function TCefBinaryValueRef.IsSame(const that: ICefBinaryValue): Boolean; -begin - Result := PCefBinaryValue(FData).is_same(PCefBinaryValue(FData), CefGetData(that)) <> 0; -end; - -function TCefBinaryValueRef.IsValid: Boolean; -begin - Result := PCefBinaryValue(FData).is_valid(PCefBinaryValue(FData)) <> 0; -end; - -class function TCefBinaryValueRef.New(const data: Pointer; dataSize: NativeUInt): ICefBinaryValue; -begin - Result := UnWrap(cef_binary_value_create(data, dataSize)); -end; - -class function TCefBinaryValueRef.UnWrap(data: Pointer): ICefBinaryValue; -begin - if data <> nil then - Result := Create(data) as ICefBinaryValue else - Result := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFBinaryValue; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces; + +type + TCefBinaryValueRef = class(TCefBaseRef, ICefBinaryValue) + protected + function IsValid: Boolean; + function IsOwned: Boolean; + function IsSame(const that: ICefBinaryValue): Boolean; + function IsEqual(const that: ICefBinaryValue): Boolean; + function Copy: ICefBinaryValue; + function GetSize: NativeUInt; + function GetData(buffer: Pointer; bufferSize, dataOffset: NativeUInt): NativeUInt; + + public + class function UnWrap(data: Pointer): ICefBinaryValue; + class function New(const data: Pointer; dataSize: NativeUInt): ICefBinaryValue; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions, uCEFTypes; + +function TCefBinaryValueRef.Copy: ICefBinaryValue; +begin + Result := UnWrap(PCefBinaryValue(FData).copy(PCefBinaryValue(FData))); +end; + +function TCefBinaryValueRef.GetData(buffer: Pointer; bufferSize, + dataOffset: NativeUInt): NativeUInt; +begin + Result := PCefBinaryValue(FData).get_data(PCefBinaryValue(FData), buffer, bufferSize, dataOffset); +end; + +function TCefBinaryValueRef.GetSize: NativeUInt; +begin + Result := PCefBinaryValue(FData).get_size(PCefBinaryValue(FData)); +end; + +function TCefBinaryValueRef.IsEqual(const that: ICefBinaryValue): Boolean; +begin + Result := PCefBinaryValue(FData).is_equal(PCefBinaryValue(FData), CefGetData(that)) <> 0; +end; + +function TCefBinaryValueRef.IsOwned: Boolean; +begin + Result := PCefBinaryValue(FData).is_owned(PCefBinaryValue(FData)) <> 0; +end; + +function TCefBinaryValueRef.IsSame(const that: ICefBinaryValue): Boolean; +begin + Result := PCefBinaryValue(FData).is_same(PCefBinaryValue(FData), CefGetData(that)) <> 0; +end; + +function TCefBinaryValueRef.IsValid: Boolean; +begin + Result := PCefBinaryValue(FData).is_valid(PCefBinaryValue(FData)) <> 0; +end; + +class function TCefBinaryValueRef.New(const data: Pointer; dataSize: NativeUInt): ICefBinaryValue; +begin + Result := UnWrap(cef_binary_value_create(data, dataSize)); +end; + +class function TCefBinaryValueRef.UnWrap(data: Pointer): ICefBinaryValue; +begin + if data <> nil then + Result := Create(data) as ICefBinaryValue else + Result := nil; +end; + +end. diff --git a/uCEFBrowser.pas b/source/uCEFBrowser.pas similarity index 97% rename from uCEFBrowser.pas rename to source/uCEFBrowser.pas index 891b046e..baf9ef46 100644 --- a/uCEFBrowser.pas +++ b/source/uCEFBrowser.pas @@ -1,626 +1,626 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFBrowser; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefBrowserRef = class(TCefBaseRef, ICefBrowser) - protected - function GetHost: ICefBrowserHost; - function CanGoBack: Boolean; - procedure GoBack; - function CanGoForward: Boolean; - procedure GoForward; - function IsLoading: Boolean; - procedure Reload; - procedure ReloadIgnoreCache; - procedure StopLoad; - function GetIdentifier: Integer; - function IsSame(const that: ICefBrowser): Boolean; - function IsPopup: Boolean; - function HasDocument: Boolean; - function GetMainFrame: ICefFrame; - function GetFocusedFrame: ICefFrame; - function GetFrameByident(identifier: Int64): ICefFrame; - function GetFrame(const name: ustring): ICefFrame; - function GetFrameCount: NativeUInt; - procedure GetFrameIdentifiers(count: PNativeUInt; identifiers: PInt64); - procedure GetFrameNames(names: TStrings); - function SendProcessMessage(targetProcess: TCefProcessId; message: ICefProcessMessage): Boolean; - - public - class function UnWrap(data: Pointer): ICefBrowser; - end; - - TCefBrowserHostRef = class(TCefBaseRef, ICefBrowserHost) - protected - function GetBrowser: ICefBrowser; - procedure CloseBrowser(forceClose: Boolean); - function TryCloseBrowser: Boolean; - procedure SetFocus(focus: Boolean); - function GetWindowHandle: TCefWindowHandle; - function GetOpenerWindowHandle: TCefWindowHandle; - function HasView: Boolean; - function GetRequestContext: ICefRequestContext; - function GetZoomLevel: Double; - procedure SetZoomLevel(zoomLevel: Double); - procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefRunFileDialogCallback); - procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: TCefRunFileDialogCallbackProc); - procedure StartDownload(const url: ustring); - procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback); - procedure DownloadImageProc(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: TOnDownloadImageFinishedProc); - procedure Print; - procedure PrintToPdf(const path: ustring; settings: PCefPdfPrintSettings; const callback: ICefPdfPrintCallback); - procedure PrintToPdfProc(const path: ustring; settings: PCefPdfPrintSettings; const callback: TOnPdfPrintFinishedProc); - procedure Find(identifier: Integer; const searchText: ustring; forward, matchCase, findNext: Boolean); - procedure StopFinding(clearSelection: Boolean); - procedure ShowDevTools(const windowInfo: PCefWindowInfo; const client: ICefClient; const settings: PCefBrowserSettings; inspectElementAt: PCefPoint); - procedure CloseDevTools; - function HasDevTools: Boolean; - procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); - procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); - procedure SetMouseCursorChangeDisabled(disabled: Boolean); - function IsMouseCursorChangeDisabled: Boolean; - procedure ReplaceMisspelling(const word: ustring); - procedure AddWordToDictionary(const word: ustring); - function IsWindowRenderingDisabled: Boolean; - procedure WasResized; - procedure NotifyScreenInfoChanged; - procedure WasHidden(hidden: Boolean); - procedure Invalidate(kind: TCefPaintElementType); - procedure SendKeyEvent(const event: PCefKeyEvent); - procedure SendMouseClickEvent(const event: PCefMouseEvent; kind: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); - procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); - procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); - procedure SendFocusEvent(setFocus: Boolean); - procedure SendCaptureLostEvent; - procedure NotifyMoveOrResizeStarted; - function GetWindowlessFrameRate(): Integer; - procedure SetWindowlessFrameRate(frameRate: Integer); - procedure IMESetComposition(const text: ustring; underlinesCount : NativeUInt; const underlines : PCefCompositionUnderline; const replacement_range, selection_range : PCefRange); - procedure IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); - procedure IMEFinishComposingText(keep_selection : boolean); - procedure IMECancelComposition; - procedure DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations); - procedure DragTargetDragOver(const event: PCefMouseEvent; allowedOps: TCefDragOperations); - procedure DragTargetDragLeave; - procedure DragTargetDrop(event: PCefMouseEvent); - procedure DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); - procedure DragSourceSystemDragEnded; - function GetVisibleNavigationEntry : ICefNavigationEntry; - - public - class function UnWrap(data: Pointer): ICefBrowserHost; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFDownloadImageCallBack, uCEFFrame, uCEFPDFPrintCallback, - uCEFRunFileDialogCallback, uCEFRequestContext, uCEFNavigationEntryVisitor, uCEFNavigationEntry; - -function TCefBrowserRef.GetHost: ICefBrowserHost; -begin - Result := TCefBrowserHostRef.UnWrap(PCefBrowser(FData)^.get_host(PCefBrowser(FData))); -end; - -function TCefBrowserRef.CanGoBack: Boolean; -begin - Result := PCefBrowser(FData)^.can_go_back(PCefBrowser(FData)) <> 0; -end; - -function TCefBrowserRef.CanGoForward: Boolean; -begin - Result := PCefBrowser(FData)^.can_go_forward(PCefBrowser(FData)) <> 0; -end; - -function TCefBrowserRef.GetFocusedFrame: ICefFrame; -begin - Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_focused_frame(PCefBrowser(FData))); -end; - -function TCefBrowserRef.GetFrameByident(identifier: Int64): ICefFrame; -begin - Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_frame_byident(PCefBrowser(FData), identifier)); -end; - -function TCefBrowserRef.GetFrame(const name: ustring): ICefFrame; -var - n: TCefString; -begin - n := CefString(name); - Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_frame(PCefBrowser(FData), @n)); -end; - -function TCefBrowserRef.GetFrameCount: NativeUInt; -begin - Result := PCefBrowser(FData)^.get_frame_count(PCefBrowser(FData)); -end; - -procedure TCefBrowserRef.GetFrameIdentifiers(count: PNativeUInt; identifiers: PInt64); -begin - PCefBrowser(FData)^.get_frame_identifiers(PCefBrowser(FData), count, identifiers); -end; - -procedure TCefBrowserRef.GetFrameNames(names: TStrings); -var - list: TCefStringList; - i: Integer; - str: TCefString; -begin - list := cef_string_list_alloc; - try - PCefBrowser(FData)^.get_frame_names(PCefBrowser(FData), list); - FillChar(str, SizeOf(str), 0); - for i := 0 to cef_string_list_size(list) - 1 do - begin - FillChar(str, SizeOf(str), 0); - cef_string_list_value(list, i, @str); - names.Add(CefStringClearAndGet(str)); - end; - finally - cef_string_list_free(list); - end; -end; - -function TCefBrowserRef.SendProcessMessage(targetProcess: TCefProcessId; - message: ICefProcessMessage): Boolean; -begin - Result := PCefBrowser(FData)^.send_process_message(PCefBrowser(FData), targetProcess, CefGetData(message)) <> 0; -end; - -function TCefBrowserRef.GetMainFrame: ICefFrame; -begin - Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_main_frame(PCefBrowser(FData))) -end; - -procedure TCefBrowserRef.GoBack; -begin - PCefBrowser(FData)^.go_back(PCefBrowser(FData)); -end; - -procedure TCefBrowserRef.GoForward; -begin - PCefBrowser(FData)^.go_forward(PCefBrowser(FData)); -end; - -function TCefBrowserRef.IsLoading: Boolean; -begin - Result := PCefBrowser(FData)^.is_loading(PCefBrowser(FData)) <> 0; -end; - -function TCefBrowserRef.HasDocument: Boolean; -begin - Result := PCefBrowser(FData)^.has_document(PCefBrowser(FData)) <> 0; -end; - -function TCefBrowserRef.IsPopup: Boolean; -begin - Result := PCefBrowser(FData)^.is_popup(PCefBrowser(FData)) <> 0; -end; - -function TCefBrowserRef.IsSame(const that: ICefBrowser): Boolean; -begin - Result := PCefBrowser(FData)^.is_same(PCefBrowser(FData), CefGetData(that)) <> 0; -end; - -procedure TCefBrowserRef.Reload; -begin - PCefBrowser(FData)^.reload(PCefBrowser(FData)); -end; - -procedure TCefBrowserRef.ReloadIgnoreCache; -begin - PCefBrowser(FData)^.reload_ignore_cache(PCefBrowser(FData)); -end; - -procedure TCefBrowserRef.StopLoad; -begin - PCefBrowser(FData)^.stop_load(PCefBrowser(FData)); -end; - -function TCefBrowserRef.GetIdentifier: Integer; -begin - Result := PCefBrowser(FData)^.get_identifier(PCefBrowser(FData)); -end; - -class function TCefBrowserRef.UnWrap(data: Pointer): ICefBrowser; -begin - if (data <> nil) then - Result := Create(data) as ICefBrowser - else - Result := nil; -end; - -// TCefBrowserHostRef - -procedure TCefBrowserHostRef.CloseDevTools; -begin - PCefBrowserHost(FData).close_dev_tools(FData); -end; - -procedure TCefBrowserHostRef.DownloadImage(const imageUrl: ustring; - isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; - const callback: ICefDownloadImageCallback); -var - url: TCefString; -begin - url := CefString(imageUrl); - PCefBrowserHost(FData).download_image(FData, @url, Ord(isFavicon), maxImageSize, - Ord(bypassCache), CefGetData(callback)); -end; - -procedure TCefBrowserHostRef.DownloadImageProc(const imageUrl: ustring; - isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; - const callback: TOnDownloadImageFinishedProc); -begin - DownloadImage(imageUrl, isFavicon, maxImageSize, bypassCache, - TCefFastDownloadImageCallback.Create(callback)); -end; - -procedure TCefBrowserHostRef.DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); -begin - PCefBrowserHost(FData).drag_source_ended_at(FData, x, y, op); -end; - -procedure TCefBrowserHostRef.DragSourceSystemDragEnded; -begin - PCefBrowserHost(FData).drag_source_system_drag_ended(FData); -end; - -function TCefBrowserHostRef.GetVisibleNavigationEntry : ICefNavigationEntry; -begin - Result := TCefNavigationEntryRef.UnWrap(PCefBrowserHost(FData).get_visible_navigation_entry(PCefBrowserHost(FData))); -end; - -procedure TCefBrowserHostRef.DragTargetDragEnter(const dragData: ICefDragData; - const event: PCefMouseEvent; allowedOps: TCefDragOperations); -begin - PCefBrowserHost(FData).drag_target_drag_enter(FData, CefGetData(dragData), event, allowedOps); -end; - -procedure TCefBrowserHostRef.DragTargetDragLeave; -begin - PCefBrowserHost(FData).drag_target_drag_leave(FData); -end; - -procedure TCefBrowserHostRef.DragTargetDragOver(const event: PCefMouseEvent; - allowedOps: TCefDragOperations); -begin - PCefBrowserHost(FData).drag_target_drag_over(FData, event, allowedOps); -end; - -procedure TCefBrowserHostRef.DragTargetDrop(event: PCefMouseEvent); -begin - PCefBrowserHost(FData).drag_target_drop(FData, event); -end; - -procedure TCefBrowserHostRef.Find(identifier: Integer; - const searchText: ustring; forward, matchCase, findNext: Boolean); -var - s: TCefString; -begin - s := CefString(searchText); - PCefBrowserHost(FData).find(FData, identifier, @s, Ord(forward), Ord(matchCase), Ord(findNext)); -end; - -function TCefBrowserHostRef.GetBrowser: ICefBrowser; -begin - Result := TCefBrowserRef.UnWrap(PCefBrowserHost(FData).get_browser(PCefBrowserHost(FData))); -end; - -procedure TCefBrowserHostRef.Print; -begin - PCefBrowserHost(FData).print(FData); -end; - -procedure TCefBrowserHostRef.PrintToPdf(const path: ustring; - settings: PCefPdfPrintSettings; const callback: ICefPdfPrintCallback); -var - str: TCefString; -begin - str := CefString(path); - PCefBrowserHost(FData).print_to_pdf(FData, @str, settings, CefGetData(callback)); -end; - -procedure TCefBrowserHostRef.PrintToPdfProc(const path: ustring; - settings: PCefPdfPrintSettings; const callback: TOnPdfPrintFinishedProc); -begin - PrintToPdf(path, settings, TCefFastPdfPrintCallback.Create(callback)); -end; - -procedure TCefBrowserHostRef.ReplaceMisspelling(const word: ustring); -var - str: TCefString; -begin - str := CefString(word); - PCefBrowserHost(FData).replace_misspelling(FData, @str); -end; - -procedure TCefBrowserHostRef.RunFileDialog(mode: TCefFileDialogMode; - const title, defaultFilePath: ustring; acceptFilters: TStrings; - selectedAcceptFilter: Integer; const callback: ICefRunFileDialogCallback); -var - t, f: TCefString; - list: TCefStringList; - item: TCefString; - i: Integer; -begin - t := CefString(title); - f := CefString(defaultFilePath); - list := cef_string_list_alloc(); - try - for i := 0 to acceptFilters.Count - 1 do - begin - item := CefString(acceptFilters[i]); - cef_string_list_append(list, @item); - end; - PCefBrowserHost(FData).run_file_dialog(PCefBrowserHost(FData), mode, @t, @f, - list, selectedAcceptFilter, CefGetData(callback)); - finally - cef_string_list_free(list); - end; -end; - -procedure TCefBrowserHostRef.RunFileDialogProc(mode: TCefFileDialogMode; - const title, defaultFilePath: ustring; acceptFilters: TStrings; - selectedAcceptFilter: Integer; const callback: TCefRunFileDialogCallbackProc); -begin - RunFileDialog(mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, - TCefFastRunFileDialogCallback.Create(callback)); -end; - -procedure TCefBrowserHostRef.AddWordToDictionary(const word: ustring); -var - str: TCefString; -begin - str := CefString(word); - PCefBrowserHost(FData).add_word_to_dictionary(FData, @str); -end; - -procedure TCefBrowserHostRef.CloseBrowser(forceClose: Boolean); -begin - PCefBrowserHost(FData).close_browser(PCefBrowserHost(FData), Ord(forceClose)); -end; - -procedure TCefBrowserHostRef.SendCaptureLostEvent; -begin - PCefBrowserHost(FData).send_capture_lost_event(FData); -end; - -procedure TCefBrowserHostRef.SendFocusEvent(setFocus: Boolean); -begin - PCefBrowserHost(FData).send_focus_event(FData, Ord(setFocus)); -end; - -procedure TCefBrowserHostRef.SendKeyEvent(const event: PCefKeyEvent); -begin - PCefBrowserHost(FData).send_key_event(FData, event); -end; - -procedure TCefBrowserHostRef.SendMouseClickEvent(const event: PCefMouseEvent; - kind: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); -begin - PCefBrowserHost(FData).send_mouse_click_event(FData, event, kind, Ord(mouseUp), clickCount); -end; - -procedure TCefBrowserHostRef.SendMouseMoveEvent(const event: PCefMouseEvent; - mouseLeave: Boolean); -begin - PCefBrowserHost(FData).send_mouse_move_event(FData, event, Ord(mouseLeave)); -end; - -procedure TCefBrowserHostRef.SendMouseWheelEvent(const event: PCefMouseEvent; - deltaX, deltaY: Integer); -begin - PCefBrowserHost(FData).send_mouse_wheel_event(FData, event, deltaX, deltaY); -end; - -procedure TCefBrowserHostRef.SetFocus(focus: Boolean); -begin - PCefBrowserHost(FData).set_focus(PCefBrowserHost(FData), Ord(focus)); -end; - -procedure TCefBrowserHostRef.SetMouseCursorChangeDisabled(disabled: Boolean); -begin - PCefBrowserHost(FData).set_mouse_cursor_change_disabled(PCefBrowserHost(FData), Ord(disabled)); -end; - -procedure TCefBrowserHostRef.SetWindowlessFrameRate(frameRate: Integer); -begin - PCefBrowserHost(FData).set_windowless_frame_rate(PCefBrowserHost(FData), frameRate); -end; - -function TCefBrowserHostRef.GetWindowHandle: TCefWindowHandle; -begin - Result := PCefBrowserHost(FData).get_window_handle(PCefBrowserHost(FData)) -end; - -function TCefBrowserHostRef.GetWindowlessFrameRate: Integer; -begin - Result := PCefBrowserHost(FData).get_windowless_frame_rate(PCefBrowserHost(FData)); -end; - -function TCefBrowserHostRef.GetOpenerWindowHandle: TCefWindowHandle; -begin - Result := PCefBrowserHost(FData).get_opener_window_handle(PCefBrowserHost(FData)); -end; - -function TCefBrowserHostRef.GetRequestContext: ICefRequestContext; -begin - Result := TCefRequestContextRef.UnWrap(PCefBrowserHost(FData).get_request_context(FData)); -end; - -procedure TCefBrowserHostRef.GetNavigationEntries( - const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); -begin - PCefBrowserHost(FData).get_navigation_entries(FData, CefGetData(visitor), Ord(currentOnly)); -end; - -procedure TCefBrowserHostRef.GetNavigationEntriesProc( - const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); -begin - GetNavigationEntries(TCefFastNavigationEntryVisitor.Create(proc), currentOnly); -end; - -function TCefBrowserHostRef.GetZoomLevel: Double; -begin - Result := PCefBrowserHost(FData).get_zoom_level(PCefBrowserHost(FData)); -end; - -procedure TCefBrowserHostRef.IMESetComposition(const text: ustring; underlinesCount : NativeUInt; const underlines : PCefCompositionUnderline; const replacement_range, selection_range : PCefRange); -var - TempString : TCefString; -begin - TempString := CefString(text); - PCefBrowserHost(FData).ime_set_composition(PCefBrowserHost(FData), @TempString, underlinesCount, underlines, replacement_range, selection_range); -end; - -procedure TCefBrowserHostRef.IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); -var - TempString : TCefString; -begin - TempString := CefString(text); - PCefBrowserHost(FData).ime_commit_text(PCefBrowserHost(FData), @TempString, replacement_range, relative_cursor_pos); -end; - -procedure TCefBrowserHostRef.IMEFinishComposingText(keep_selection : boolean); -begin - PCefBrowserHost(FData).ime_finish_composing_text(PCefBrowserHost(FData), ord(keep_selection)); -end; - -procedure TCefBrowserHostRef.IMECancelComposition; -begin - PCefBrowserHost(FData).ime_cancel_composition(PCefBrowserHost(FData)); -end; - -function TCefBrowserHostRef.HasDevTools: Boolean; -begin - Result := PCefBrowserHost(FData).has_dev_tools(FData) <> 0; -end; - -function TCefBrowserHostRef.HasView: Boolean; -begin - Result := PCefBrowserHost(FData).has_view(FData) <> 0; -end; - -procedure TCefBrowserHostRef.Invalidate(kind: TCefPaintElementType); -begin - PCefBrowserHost(FData).invalidate(FData, kind); -end; - -function TCefBrowserHostRef.IsMouseCursorChangeDisabled: Boolean; -begin - Result := PCefBrowserHost(FData).is_mouse_cursor_change_disabled(FData) <> 0 -end; - -function TCefBrowserHostRef.IsWindowRenderingDisabled: Boolean; -begin - Result := PCefBrowserHost(FData).is_window_rendering_disabled(FData) <> 0 -end; - -procedure TCefBrowserHostRef.NotifyMoveOrResizeStarted; -begin - PCefBrowserHost(FData).notify_move_or_resize_started(PCefBrowserHost(FData)); -end; - -procedure TCefBrowserHostRef.NotifyScreenInfoChanged; -begin - PCefBrowserHost(FData).notify_screen_info_changed(PCefBrowserHost(FData)); -end; - -procedure TCefBrowserHostRef.SetZoomLevel(zoomLevel: Double); -begin - PCefBrowserHost(FData).set_zoom_level(PCefBrowserHost(FData), zoomLevel); -end; - -procedure TCefBrowserHostRef.ShowDevTools(const windowInfo: PCefWindowInfo; - const client: ICefClient; const settings: PCefBrowserSettings; - inspectElementAt: PCefPoint); -begin - PCefBrowserHost(FData).show_dev_tools(FData, windowInfo, CefGetData(client), - settings, inspectElementAt); -end; - -procedure TCefBrowserHostRef.StartDownload(const url: ustring); -var - u: TCefString; -begin - u := CefString(url); - PCefBrowserHost(FData).start_download(PCefBrowserHost(FData), @u); -end; - -procedure TCefBrowserHostRef.StopFinding(clearSelection: Boolean); -begin - PCefBrowserHost(FData).stop_finding(FData, Ord(clearSelection)); -end; - -function TCefBrowserHostRef.TryCloseBrowser: Boolean; -begin - Result := PCefBrowserHost(FData).try_close_browser(FData) <> 0; -end; - -class function TCefBrowserHostRef.UnWrap(data: Pointer): ICefBrowserHost; -begin - if data <> nil then - Result := Create(data) as ICefBrowserHost else - Result := nil; -end; - -procedure TCefBrowserHostRef.WasHidden(hidden: Boolean); -begin - PCefBrowserHost(FData).was_hidden(FData, Ord(hidden)); -end; - -procedure TCefBrowserHostRef.WasResized; -begin - PCefBrowserHost(FData).was_resized(FData); -end; - - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFBrowser; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefBrowserRef = class(TCefBaseRef, ICefBrowser) + protected + function GetHost: ICefBrowserHost; + function CanGoBack: Boolean; + procedure GoBack; + function CanGoForward: Boolean; + procedure GoForward; + function IsLoading: Boolean; + procedure Reload; + procedure ReloadIgnoreCache; + procedure StopLoad; + function GetIdentifier: Integer; + function IsSame(const that: ICefBrowser): Boolean; + function IsPopup: Boolean; + function HasDocument: Boolean; + function GetMainFrame: ICefFrame; + function GetFocusedFrame: ICefFrame; + function GetFrameByident(identifier: Int64): ICefFrame; + function GetFrame(const name: ustring): ICefFrame; + function GetFrameCount: NativeUInt; + procedure GetFrameIdentifiers(count: PNativeUInt; identifiers: PInt64); + procedure GetFrameNames(names: TStrings); + function SendProcessMessage(targetProcess: TCefProcessId; message: ICefProcessMessage): Boolean; + + public + class function UnWrap(data: Pointer): ICefBrowser; + end; + + TCefBrowserHostRef = class(TCefBaseRef, ICefBrowserHost) + protected + function GetBrowser: ICefBrowser; + procedure CloseBrowser(forceClose: Boolean); + function TryCloseBrowser: Boolean; + procedure SetFocus(focus: Boolean); + function GetWindowHandle: TCefWindowHandle; + function GetOpenerWindowHandle: TCefWindowHandle; + function HasView: Boolean; + function GetRequestContext: ICefRequestContext; + function GetZoomLevel: Double; + procedure SetZoomLevel(zoomLevel: Double); + procedure RunFileDialog(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefRunFileDialogCallback); + procedure RunFileDialogProc(mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: TCefRunFileDialogCallbackProc); + procedure StartDownload(const url: ustring); + procedure DownloadImage(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: ICefDownloadImageCallback); + procedure DownloadImageProc(const imageUrl: ustring; isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; const callback: TOnDownloadImageFinishedProc); + procedure Print; + procedure PrintToPdf(const path: ustring; settings: PCefPdfPrintSettings; const callback: ICefPdfPrintCallback); + procedure PrintToPdfProc(const path: ustring; settings: PCefPdfPrintSettings; const callback: TOnPdfPrintFinishedProc); + procedure Find(identifier: Integer; const searchText: ustring; forward, matchCase, findNext: Boolean); + procedure StopFinding(clearSelection: Boolean); + procedure ShowDevTools(const windowInfo: PCefWindowInfo; const client: ICefClient; const settings: PCefBrowserSettings; inspectElementAt: PCefPoint); + procedure CloseDevTools; + function HasDevTools: Boolean; + procedure GetNavigationEntries(const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); + procedure GetNavigationEntriesProc(const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); + procedure SetMouseCursorChangeDisabled(disabled: Boolean); + function IsMouseCursorChangeDisabled: Boolean; + procedure ReplaceMisspelling(const word: ustring); + procedure AddWordToDictionary(const word: ustring); + function IsWindowRenderingDisabled: Boolean; + procedure WasResized; + procedure NotifyScreenInfoChanged; + procedure WasHidden(hidden: Boolean); + procedure Invalidate(kind: TCefPaintElementType); + procedure SendKeyEvent(const event: PCefKeyEvent); + procedure SendMouseClickEvent(const event: PCefMouseEvent; kind: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); + procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); + procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); + procedure SendFocusEvent(setFocus: Boolean); + procedure SendCaptureLostEvent; + procedure NotifyMoveOrResizeStarted; + function GetWindowlessFrameRate(): Integer; + procedure SetWindowlessFrameRate(frameRate: Integer); + procedure IMESetComposition(const text: ustring; underlinesCount : NativeUInt; const underlines : PCefCompositionUnderline; const replacement_range, selection_range : PCefRange); + procedure IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); + procedure IMEFinishComposingText(keep_selection : boolean); + procedure IMECancelComposition; + procedure DragTargetDragEnter(const dragData: ICefDragData; const event: PCefMouseEvent; allowedOps: TCefDragOperations); + procedure DragTargetDragOver(const event: PCefMouseEvent; allowedOps: TCefDragOperations); + procedure DragTargetDragLeave; + procedure DragTargetDrop(event: PCefMouseEvent); + procedure DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); + procedure DragSourceSystemDragEnded; + function GetVisibleNavigationEntry : ICefNavigationEntry; + + public + class function UnWrap(data: Pointer): ICefBrowserHost; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions, uCEFDownloadImageCallBack, uCEFFrame, uCEFPDFPrintCallback, + uCEFRunFileDialogCallback, uCEFRequestContext, uCEFNavigationEntryVisitor, uCEFNavigationEntry; + +function TCefBrowserRef.GetHost: ICefBrowserHost; +begin + Result := TCefBrowserHostRef.UnWrap(PCefBrowser(FData)^.get_host(PCefBrowser(FData))); +end; + +function TCefBrowserRef.CanGoBack: Boolean; +begin + Result := PCefBrowser(FData)^.can_go_back(PCefBrowser(FData)) <> 0; +end; + +function TCefBrowserRef.CanGoForward: Boolean; +begin + Result := PCefBrowser(FData)^.can_go_forward(PCefBrowser(FData)) <> 0; +end; + +function TCefBrowserRef.GetFocusedFrame: ICefFrame; +begin + Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_focused_frame(PCefBrowser(FData))); +end; + +function TCefBrowserRef.GetFrameByident(identifier: Int64): ICefFrame; +begin + Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_frame_byident(PCefBrowser(FData), identifier)); +end; + +function TCefBrowserRef.GetFrame(const name: ustring): ICefFrame; +var + n: TCefString; +begin + n := CefString(name); + Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_frame(PCefBrowser(FData), @n)); +end; + +function TCefBrowserRef.GetFrameCount: NativeUInt; +begin + Result := PCefBrowser(FData)^.get_frame_count(PCefBrowser(FData)); +end; + +procedure TCefBrowserRef.GetFrameIdentifiers(count: PNativeUInt; identifiers: PInt64); +begin + PCefBrowser(FData)^.get_frame_identifiers(PCefBrowser(FData), count, identifiers); +end; + +procedure TCefBrowserRef.GetFrameNames(names: TStrings); +var + list: TCefStringList; + i: Integer; + str: TCefString; +begin + list := cef_string_list_alloc; + try + PCefBrowser(FData)^.get_frame_names(PCefBrowser(FData), list); + FillChar(str, SizeOf(str), 0); + for i := 0 to cef_string_list_size(list) - 1 do + begin + FillChar(str, SizeOf(str), 0); + cef_string_list_value(list, i, @str); + names.Add(CefStringClearAndGet(str)); + end; + finally + cef_string_list_free(list); + end; +end; + +function TCefBrowserRef.SendProcessMessage(targetProcess: TCefProcessId; + message: ICefProcessMessage): Boolean; +begin + Result := PCefBrowser(FData)^.send_process_message(PCefBrowser(FData), targetProcess, CefGetData(message)) <> 0; +end; + +function TCefBrowserRef.GetMainFrame: ICefFrame; +begin + Result := TCefFrameRef.UnWrap(PCefBrowser(FData)^.get_main_frame(PCefBrowser(FData))) +end; + +procedure TCefBrowserRef.GoBack; +begin + PCefBrowser(FData)^.go_back(PCefBrowser(FData)); +end; + +procedure TCefBrowserRef.GoForward; +begin + PCefBrowser(FData)^.go_forward(PCefBrowser(FData)); +end; + +function TCefBrowserRef.IsLoading: Boolean; +begin + Result := PCefBrowser(FData)^.is_loading(PCefBrowser(FData)) <> 0; +end; + +function TCefBrowserRef.HasDocument: Boolean; +begin + Result := PCefBrowser(FData)^.has_document(PCefBrowser(FData)) <> 0; +end; + +function TCefBrowserRef.IsPopup: Boolean; +begin + Result := PCefBrowser(FData)^.is_popup(PCefBrowser(FData)) <> 0; +end; + +function TCefBrowserRef.IsSame(const that: ICefBrowser): Boolean; +begin + Result := PCefBrowser(FData)^.is_same(PCefBrowser(FData), CefGetData(that)) <> 0; +end; + +procedure TCefBrowserRef.Reload; +begin + PCefBrowser(FData)^.reload(PCefBrowser(FData)); +end; + +procedure TCefBrowserRef.ReloadIgnoreCache; +begin + PCefBrowser(FData)^.reload_ignore_cache(PCefBrowser(FData)); +end; + +procedure TCefBrowserRef.StopLoad; +begin + PCefBrowser(FData)^.stop_load(PCefBrowser(FData)); +end; + +function TCefBrowserRef.GetIdentifier: Integer; +begin + Result := PCefBrowser(FData)^.get_identifier(PCefBrowser(FData)); +end; + +class function TCefBrowserRef.UnWrap(data: Pointer): ICefBrowser; +begin + if (data <> nil) then + Result := Create(data) as ICefBrowser + else + Result := nil; +end; + +// TCefBrowserHostRef + +procedure TCefBrowserHostRef.CloseDevTools; +begin + PCefBrowserHost(FData).close_dev_tools(FData); +end; + +procedure TCefBrowserHostRef.DownloadImage(const imageUrl: ustring; + isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; + const callback: ICefDownloadImageCallback); +var + url: TCefString; +begin + url := CefString(imageUrl); + PCefBrowserHost(FData).download_image(FData, @url, Ord(isFavicon), maxImageSize, + Ord(bypassCache), CefGetData(callback)); +end; + +procedure TCefBrowserHostRef.DownloadImageProc(const imageUrl: ustring; + isFavicon: Boolean; maxImageSize: Cardinal; bypassCache: Boolean; + const callback: TOnDownloadImageFinishedProc); +begin + DownloadImage(imageUrl, isFavicon, maxImageSize, bypassCache, + TCefFastDownloadImageCallback.Create(callback)); +end; + +procedure TCefBrowserHostRef.DragSourceEndedAt(x, y: Integer; op: TCefDragOperation); +begin + PCefBrowserHost(FData).drag_source_ended_at(FData, x, y, op); +end; + +procedure TCefBrowserHostRef.DragSourceSystemDragEnded; +begin + PCefBrowserHost(FData).drag_source_system_drag_ended(FData); +end; + +function TCefBrowserHostRef.GetVisibleNavigationEntry : ICefNavigationEntry; +begin + Result := TCefNavigationEntryRef.UnWrap(PCefBrowserHost(FData).get_visible_navigation_entry(PCefBrowserHost(FData))); +end; + +procedure TCefBrowserHostRef.DragTargetDragEnter(const dragData: ICefDragData; + const event: PCefMouseEvent; allowedOps: TCefDragOperations); +begin + PCefBrowserHost(FData).drag_target_drag_enter(FData, CefGetData(dragData), event, allowedOps); +end; + +procedure TCefBrowserHostRef.DragTargetDragLeave; +begin + PCefBrowserHost(FData).drag_target_drag_leave(FData); +end; + +procedure TCefBrowserHostRef.DragTargetDragOver(const event: PCefMouseEvent; + allowedOps: TCefDragOperations); +begin + PCefBrowserHost(FData).drag_target_drag_over(FData, event, allowedOps); +end; + +procedure TCefBrowserHostRef.DragTargetDrop(event: PCefMouseEvent); +begin + PCefBrowserHost(FData).drag_target_drop(FData, event); +end; + +procedure TCefBrowserHostRef.Find(identifier: Integer; + const searchText: ustring; forward, matchCase, findNext: Boolean); +var + s: TCefString; +begin + s := CefString(searchText); + PCefBrowserHost(FData).find(FData, identifier, @s, Ord(forward), Ord(matchCase), Ord(findNext)); +end; + +function TCefBrowserHostRef.GetBrowser: ICefBrowser; +begin + Result := TCefBrowserRef.UnWrap(PCefBrowserHost(FData).get_browser(PCefBrowserHost(FData))); +end; + +procedure TCefBrowserHostRef.Print; +begin + PCefBrowserHost(FData).print(FData); +end; + +procedure TCefBrowserHostRef.PrintToPdf(const path: ustring; + settings: PCefPdfPrintSettings; const callback: ICefPdfPrintCallback); +var + str: TCefString; +begin + str := CefString(path); + PCefBrowserHost(FData).print_to_pdf(FData, @str, settings, CefGetData(callback)); +end; + +procedure TCefBrowserHostRef.PrintToPdfProc(const path: ustring; + settings: PCefPdfPrintSettings; const callback: TOnPdfPrintFinishedProc); +begin + PrintToPdf(path, settings, TCefFastPdfPrintCallback.Create(callback)); +end; + +procedure TCefBrowserHostRef.ReplaceMisspelling(const word: ustring); +var + str: TCefString; +begin + str := CefString(word); + PCefBrowserHost(FData).replace_misspelling(FData, @str); +end; + +procedure TCefBrowserHostRef.RunFileDialog(mode: TCefFileDialogMode; + const title, defaultFilePath: ustring; acceptFilters: TStrings; + selectedAcceptFilter: Integer; const callback: ICefRunFileDialogCallback); +var + t, f: TCefString; + list: TCefStringList; + item: TCefString; + i: Integer; +begin + t := CefString(title); + f := CefString(defaultFilePath); + list := cef_string_list_alloc(); + try + for i := 0 to acceptFilters.Count - 1 do + begin + item := CefString(acceptFilters[i]); + cef_string_list_append(list, @item); + end; + PCefBrowserHost(FData).run_file_dialog(PCefBrowserHost(FData), mode, @t, @f, + list, selectedAcceptFilter, CefGetData(callback)); + finally + cef_string_list_free(list); + end; +end; + +procedure TCefBrowserHostRef.RunFileDialogProc(mode: TCefFileDialogMode; + const title, defaultFilePath: ustring; acceptFilters: TStrings; + selectedAcceptFilter: Integer; const callback: TCefRunFileDialogCallbackProc); +begin + RunFileDialog(mode, title, defaultFilePath, acceptFilters, selectedAcceptFilter, + TCefFastRunFileDialogCallback.Create(callback)); +end; + +procedure TCefBrowserHostRef.AddWordToDictionary(const word: ustring); +var + str: TCefString; +begin + str := CefString(word); + PCefBrowserHost(FData).add_word_to_dictionary(FData, @str); +end; + +procedure TCefBrowserHostRef.CloseBrowser(forceClose: Boolean); +begin + PCefBrowserHost(FData).close_browser(PCefBrowserHost(FData), Ord(forceClose)); +end; + +procedure TCefBrowserHostRef.SendCaptureLostEvent; +begin + PCefBrowserHost(FData).send_capture_lost_event(FData); +end; + +procedure TCefBrowserHostRef.SendFocusEvent(setFocus: Boolean); +begin + PCefBrowserHost(FData).send_focus_event(FData, Ord(setFocus)); +end; + +procedure TCefBrowserHostRef.SendKeyEvent(const event: PCefKeyEvent); +begin + PCefBrowserHost(FData).send_key_event(FData, event); +end; + +procedure TCefBrowserHostRef.SendMouseClickEvent(const event: PCefMouseEvent; + kind: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); +begin + PCefBrowserHost(FData).send_mouse_click_event(FData, event, kind, Ord(mouseUp), clickCount); +end; + +procedure TCefBrowserHostRef.SendMouseMoveEvent(const event: PCefMouseEvent; + mouseLeave: Boolean); +begin + PCefBrowserHost(FData).send_mouse_move_event(FData, event, Ord(mouseLeave)); +end; + +procedure TCefBrowserHostRef.SendMouseWheelEvent(const event: PCefMouseEvent; + deltaX, deltaY: Integer); +begin + PCefBrowserHost(FData).send_mouse_wheel_event(FData, event, deltaX, deltaY); +end; + +procedure TCefBrowserHostRef.SetFocus(focus: Boolean); +begin + PCefBrowserHost(FData).set_focus(PCefBrowserHost(FData), Ord(focus)); +end; + +procedure TCefBrowserHostRef.SetMouseCursorChangeDisabled(disabled: Boolean); +begin + PCefBrowserHost(FData).set_mouse_cursor_change_disabled(PCefBrowserHost(FData), Ord(disabled)); +end; + +procedure TCefBrowserHostRef.SetWindowlessFrameRate(frameRate: Integer); +begin + PCefBrowserHost(FData).set_windowless_frame_rate(PCefBrowserHost(FData), frameRate); +end; + +function TCefBrowserHostRef.GetWindowHandle: TCefWindowHandle; +begin + Result := PCefBrowserHost(FData).get_window_handle(PCefBrowserHost(FData)) +end; + +function TCefBrowserHostRef.GetWindowlessFrameRate: Integer; +begin + Result := PCefBrowserHost(FData).get_windowless_frame_rate(PCefBrowserHost(FData)); +end; + +function TCefBrowserHostRef.GetOpenerWindowHandle: TCefWindowHandle; +begin + Result := PCefBrowserHost(FData).get_opener_window_handle(PCefBrowserHost(FData)); +end; + +function TCefBrowserHostRef.GetRequestContext: ICefRequestContext; +begin + Result := TCefRequestContextRef.UnWrap(PCefBrowserHost(FData).get_request_context(FData)); +end; + +procedure TCefBrowserHostRef.GetNavigationEntries( + const visitor: ICefNavigationEntryVisitor; currentOnly: Boolean); +begin + PCefBrowserHost(FData).get_navigation_entries(FData, CefGetData(visitor), Ord(currentOnly)); +end; + +procedure TCefBrowserHostRef.GetNavigationEntriesProc( + const proc: TCefNavigationEntryVisitorProc; currentOnly: Boolean); +begin + GetNavigationEntries(TCefFastNavigationEntryVisitor.Create(proc), currentOnly); +end; + +function TCefBrowserHostRef.GetZoomLevel: Double; +begin + Result := PCefBrowserHost(FData).get_zoom_level(PCefBrowserHost(FData)); +end; + +procedure TCefBrowserHostRef.IMESetComposition(const text: ustring; underlinesCount : NativeUInt; const underlines : PCefCompositionUnderline; const replacement_range, selection_range : PCefRange); +var + TempString : TCefString; +begin + TempString := CefString(text); + PCefBrowserHost(FData).ime_set_composition(PCefBrowserHost(FData), @TempString, underlinesCount, underlines, replacement_range, selection_range); +end; + +procedure TCefBrowserHostRef.IMECommitText(const text: ustring; const replacement_range : PCefRange; relative_cursor_pos : integer); +var + TempString : TCefString; +begin + TempString := CefString(text); + PCefBrowserHost(FData).ime_commit_text(PCefBrowserHost(FData), @TempString, replacement_range, relative_cursor_pos); +end; + +procedure TCefBrowserHostRef.IMEFinishComposingText(keep_selection : boolean); +begin + PCefBrowserHost(FData).ime_finish_composing_text(PCefBrowserHost(FData), ord(keep_selection)); +end; + +procedure TCefBrowserHostRef.IMECancelComposition; +begin + PCefBrowserHost(FData).ime_cancel_composition(PCefBrowserHost(FData)); +end; + +function TCefBrowserHostRef.HasDevTools: Boolean; +begin + Result := PCefBrowserHost(FData).has_dev_tools(FData) <> 0; +end; + +function TCefBrowserHostRef.HasView: Boolean; +begin + Result := PCefBrowserHost(FData).has_view(FData) <> 0; +end; + +procedure TCefBrowserHostRef.Invalidate(kind: TCefPaintElementType); +begin + PCefBrowserHost(FData).invalidate(FData, kind); +end; + +function TCefBrowserHostRef.IsMouseCursorChangeDisabled: Boolean; +begin + Result := PCefBrowserHost(FData).is_mouse_cursor_change_disabled(FData) <> 0 +end; + +function TCefBrowserHostRef.IsWindowRenderingDisabled: Boolean; +begin + Result := PCefBrowserHost(FData).is_window_rendering_disabled(FData) <> 0 +end; + +procedure TCefBrowserHostRef.NotifyMoveOrResizeStarted; +begin + PCefBrowserHost(FData).notify_move_or_resize_started(PCefBrowserHost(FData)); +end; + +procedure TCefBrowserHostRef.NotifyScreenInfoChanged; +begin + PCefBrowserHost(FData).notify_screen_info_changed(PCefBrowserHost(FData)); +end; + +procedure TCefBrowserHostRef.SetZoomLevel(zoomLevel: Double); +begin + PCefBrowserHost(FData).set_zoom_level(PCefBrowserHost(FData), zoomLevel); +end; + +procedure TCefBrowserHostRef.ShowDevTools(const windowInfo: PCefWindowInfo; + const client: ICefClient; const settings: PCefBrowserSettings; + inspectElementAt: PCefPoint); +begin + PCefBrowserHost(FData).show_dev_tools(FData, windowInfo, CefGetData(client), + settings, inspectElementAt); +end; + +procedure TCefBrowserHostRef.StartDownload(const url: ustring); +var + u: TCefString; +begin + u := CefString(url); + PCefBrowserHost(FData).start_download(PCefBrowserHost(FData), @u); +end; + +procedure TCefBrowserHostRef.StopFinding(clearSelection: Boolean); +begin + PCefBrowserHost(FData).stop_finding(FData, Ord(clearSelection)); +end; + +function TCefBrowserHostRef.TryCloseBrowser: Boolean; +begin + Result := PCefBrowserHost(FData).try_close_browser(FData) <> 0; +end; + +class function TCefBrowserHostRef.UnWrap(data: Pointer): ICefBrowserHost; +begin + if data <> nil then + Result := Create(data) as ICefBrowserHost else + Result := nil; +end; + +procedure TCefBrowserHostRef.WasHidden(hidden: Boolean); +begin + PCefBrowserHost(FData).was_hidden(FData, Ord(hidden)); +end; + +procedure TCefBrowserHostRef.WasResized; +begin + PCefBrowserHost(FData).was_resized(FData); +end; + + +end. diff --git a/uCEFBrowserProcessHandler.pas b/source/uCEFBrowserProcessHandler.pas similarity index 97% rename from uCEFBrowserProcessHandler.pas rename to source/uCEFBrowserProcessHandler.pas index 56530cf2..60561bbc 100644 --- a/uCEFBrowserProcessHandler.pas +++ b/source/uCEFBrowserProcessHandler.pas @@ -1,125 +1,125 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFBrowserProcessHandler; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefBrowserProcessHandlerOwn = class(TCefBaseOwn, ICefBrowserProcessHandler) - protected - procedure OnContextInitialized; virtual; - procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); virtual; - procedure OnRenderProcessThreadCreated(const extraInfo: ICefListValue); virtual; - procedure OnScheduleMessagePumpWork(delayMs: Int64); virtual; - public - constructor Create; virtual; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFCommandLine, uCEFListValue; - -procedure cef_browser_process_handler_on_context_initialized(self: PCefBrowserProcessHandler); stdcall; -begin - with TCefBrowserProcessHandlerOwn(CefGetObject(self)) do - OnContextInitialized; -end; - -procedure cef_browser_process_handler_on_before_child_process_launch( - self: PCefBrowserProcessHandler; command_line: PCefCommandLine); stdcall; -begin - with TCefBrowserProcessHandlerOwn(CefGetObject(self)) do - OnBeforeChildProcessLaunch(TCefCommandLineRef.UnWrap(command_line)); -end; - -procedure cef_browser_process_handler_on_render_process_thread_created( - self: PCefBrowserProcessHandler; extra_info: PCefListValue); stdcall; -begin - with TCefBrowserProcessHandlerOwn(CefGetObject(self)) do - OnRenderProcessThreadCreated(TCefListValueRef.UnWrap(extra_info)); -end; - -procedure cef_browser_process_handler_on_schedule_message_pump_work(self: PCefBrowserProcessHandler; delay_ms: Int64); stdcall; +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFBrowserProcessHandler; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefBrowserProcessHandlerOwn = class(TCefBaseOwn, ICefBrowserProcessHandler) + protected + procedure OnContextInitialized; virtual; + procedure OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); virtual; + procedure OnRenderProcessThreadCreated(const extraInfo: ICefListValue); virtual; + procedure OnScheduleMessagePumpWork(delayMs: Int64); virtual; + public + constructor Create; virtual; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions, uCEFCommandLine, uCEFListValue; + +procedure cef_browser_process_handler_on_context_initialized(self: PCefBrowserProcessHandler); stdcall; +begin + with TCefBrowserProcessHandlerOwn(CefGetObject(self)) do + OnContextInitialized; +end; + +procedure cef_browser_process_handler_on_before_child_process_launch( + self: PCefBrowserProcessHandler; command_line: PCefCommandLine); stdcall; +begin + with TCefBrowserProcessHandlerOwn(CefGetObject(self)) do + OnBeforeChildProcessLaunch(TCefCommandLineRef.UnWrap(command_line)); +end; + +procedure cef_browser_process_handler_on_render_process_thread_created( + self: PCefBrowserProcessHandler; extra_info: PCefListValue); stdcall; +begin + with TCefBrowserProcessHandlerOwn(CefGetObject(self)) do + OnRenderProcessThreadCreated(TCefListValueRef.UnWrap(extra_info)); +end; + +procedure cef_browser_process_handler_on_schedule_message_pump_work(self: PCefBrowserProcessHandler; delay_ms: Int64); stdcall; begin TCefBrowserProcessHandlerOwn(CefGetObject(self)).OnScheduleMessagePumpWork(delay_ms); -end; - -constructor TCefBrowserProcessHandlerOwn.Create; -begin - inherited CreateData(SizeOf(TCefBrowserProcessHandler)); - - with PCefBrowserProcessHandler(FData)^ do - begin - on_context_initialized := cef_browser_process_handler_on_context_initialized; - on_before_child_process_launch := cef_browser_process_handler_on_before_child_process_launch; - on_render_process_thread_created := cef_browser_process_handler_on_render_process_thread_created; - get_print_handler := nil; // linux - on_schedule_message_pump_work := cef_browser_process_handler_on_schedule_message_pump_work; - end; -end; - -procedure TCefBrowserProcessHandlerOwn.OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); -begin - -end; - -procedure TCefBrowserProcessHandlerOwn.OnContextInitialized; -begin - -end; - -procedure TCefBrowserProcessHandlerOwn.OnRenderProcessThreadCreated(const extraInfo: ICefListValue); -begin - -end; - -procedure TCefBrowserProcessHandlerOwn.OnScheduleMessagePumpWork(delayMs: Int64); -begin - -end; - -end. +end; + +constructor TCefBrowserProcessHandlerOwn.Create; +begin + inherited CreateData(SizeOf(TCefBrowserProcessHandler)); + + with PCefBrowserProcessHandler(FData)^ do + begin + on_context_initialized := cef_browser_process_handler_on_context_initialized; + on_before_child_process_launch := cef_browser_process_handler_on_before_child_process_launch; + on_render_process_thread_created := cef_browser_process_handler_on_render_process_thread_created; + get_print_handler := nil; // linux + on_schedule_message_pump_work := cef_browser_process_handler_on_schedule_message_pump_work; + end; +end; + +procedure TCefBrowserProcessHandlerOwn.OnBeforeChildProcessLaunch(const commandLine: ICefCommandLine); +begin + +end; + +procedure TCefBrowserProcessHandlerOwn.OnContextInitialized; +begin + +end; + +procedure TCefBrowserProcessHandlerOwn.OnRenderProcessThreadCreated(const extraInfo: ICefListValue); +begin + +end; + +procedure TCefBrowserProcessHandlerOwn.OnScheduleMessagePumpWork(delayMs: Int64); +begin + +end; + +end. diff --git a/uCEFCallback.pas b/source/uCEFCallback.pas similarity index 96% rename from uCEFCallback.pas rename to source/uCEFCallback.pas index 985383b1..6c14ed7a 100644 --- a/uCEFCallback.pas +++ b/source/uCEFCallback.pas @@ -1,82 +1,82 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFCallback; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefCallbackRef = class(TCefBaseRef, ICefCallback) - protected - procedure Cont; - procedure Cancel; - - public - class function UnWrap(data: Pointer): ICefCallback; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -procedure TCefCallbackRef.Cancel; -begin - PCefCallback(FData)^.cancel(PCefCallback(FData)); -end; - -procedure TCefCallbackRef.Cont; -begin - PCefCallback(FData)^.cont(PCefCallback(FData)); -end; - -class function TCefCallbackRef.UnWrap(data: Pointer): ICefCallback; -begin - if data <> nil then - Result := Create(data) as ICefCallback else - Result := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFCallback; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefCallbackRef = class(TCefBaseRef, ICefCallback) + protected + procedure Cont; + procedure Cancel; + + public + class function UnWrap(data: Pointer): ICefCallback; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + +procedure TCefCallbackRef.Cancel; +begin + PCefCallback(FData)^.cancel(PCefCallback(FData)); +end; + +procedure TCefCallbackRef.Cont; +begin + PCefCallback(FData)^.cont(PCefCallback(FData)); +end; + +class function TCefCallbackRef.UnWrap(data: Pointer): ICefCallback; +begin + if data <> nil then + Result := Create(data) as ICefCallback else + Result := nil; +end; + +end. diff --git a/uCEFChromium.pas b/source/uCEFChromium.pas similarity index 97% rename from uCEFChromium.pas rename to source/uCEFChromium.pas index b22df73a..49ca92e6 100644 --- a/uCEFChromium.pas +++ b/source/uCEFChromium.pas @@ -1,2852 +1,2852 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFChromium; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - WinApi.Windows, WinApi.Messages, System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms, - uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFMiscFunctions, uCEFClient, - uCEFPDFPrintCallback, uCEFStringVisitor, uCEFConstants, uCEFTask, - uCEFDeleteCookiesCallback, uCEFDomVisitor, uCEFChromiumEvents, - uCEFChromiumOptions, uCEFChromiumFontOptions, uCEFPDFPrintOptions; - -type - TChromium = class(TComponent, IChromiumEvents) - protected - FCompHandle : HWND; - FVisitor : ICefStringVisitor; - FPDFPrintcb : ICefPdfPrintCallback; - FCookiDeletercb : ICefDeleteCookiesCallback; - FDOMVisitor : ICefDomVisitor; - FClientHandler : TVCLClientHandler; - FHandler : ICefClient; - FBrowser : ICefBrowser; - FBrowserId : Integer; - FDefaultUrl : ustring; - FOptions : TChromiumOptions; - FFontOptions : TChromiumFontOptions; - FPDFPrintOptions : TPDFPrintOptions; - FDefaultEncoding : ustring; - FPrefs : TStringList; - FProxyType : integer; - FProxyServer : string; - FProxyPort : integer; - FProxyUsername : string; - FProxyPassword : string; - FProxyScriptURL : string; - FProxyByPassList : string; - FUpdatePreferences : boolean; - FGetPreferences : boolean; - FCustomHeaderName : string; - FCustomHeaderValue : string; - FAddCustomHeader : boolean; - FDoNotTrack : boolean; - FSendReferrer : boolean; - FHyperlinkAuditing : boolean; - FCookiePrefs : integer; - FImagesPrefs : integer; - FCMStoragePath : ustring; - FZoomStep : byte; - FWindowName : string; - FIsOSR : boolean; - FInitialized : boolean; - FClosing : boolean; - - // ICefClient - FOnProcessMessageReceived : TOnProcessMessageReceived; - - // ICefLoadHandler - FOnLoadStart : TOnLoadStart; - FOnLoadEnd : TOnLoadEnd; - FOnLoadError : TOnLoadError; - FOnLoadingStateChange : TOnLoadingStateChange; - - // ICefFocusHandler - FOnTakeFocus : TOnTakeFocus; - FOnSetFocus : TOnSetFocus; - FOnGotFocus : TOnGotFocus; - - // ICefContextMenuHandler - FOnBeforeContextMenu : TOnBeforeContextMenu; - FOnContextMenuCommand : TOnContextMenuCommand; - FOnContextMenuDismissed : TOnContextMenuDismissed; - - // ICefKeyboardHandler - FOnPreKeyEvent : TOnPreKeyEvent; - FOnKeyEvent : TOnKeyEvent; - - // ICefDisplayHandler - FOnAddressChange : TOnAddressChange; - FOnTitleChange : TOnTitleChange; - FOnFavIconUrlChange : TOnFavIconUrlChange; - FOnFullScreenModeChange : TOnFullScreenModeChange; - FOnTooltip : TOnTooltip; - FOnStatusMessage : TOnStatusMessage; - FOnConsoleMessage : TOnConsoleMessage; - - // ICefDownloadHandler - FOnBeforeDownload : TOnBeforeDownload; - FOnDownloadUpdated : TOnDownloadUpdated; - - // ICefGeolocationHandler - FOnRequestGeolocationPermission : TOnRequestGeolocationPermission; - FOnCancelGeolocationPermission : TOnCancelGeolocationPermission; - - // ICefJsDialogHandler - FOnJsdialog : TOnJsdialog; - FOnBeforeUnloadDialog : TOnBeforeUnloadDialog; - FOnResetDialogState : TOnResetDialogState; - FOnDialogClosed : TOnDialogClosed; - - // ICefLifeSpanHandler - FOnBeforePopup : TOnBeforePopup; - FOnAfterCreated : TOnAfterCreated; - FOnBeforeClose : TOnBeforeClose; - FOnClose : TOnClose; - - // ICefRequestHandler - FOnBeforeBrowse : TOnBeforeBrowse; - FOnOpenUrlFromTab : TOnOpenUrlFromTab; - FOnBeforeResourceLoad : TOnBeforeResourceLoad; - FOnGetResourceHandler : TOnGetResourceHandler; - FOnResourceRedirect : TOnResourceRedirect; - FOnResourceResponse : TOnResourceResponse; - FOnGetResourceResponseFilter : TOnGetResourceResponseFilter; - FOnResourceLoadComplete : TOnResourceLoadComplete; - FOnGetAuthCredentials : TOnGetAuthCredentials; - FOnQuotaRequest : TOnQuotaRequest; - FOnProtocolExecution : TOnProtocolExecution; - FOnCertificateError : TOnCertificateError; - FOnSelectClientCertificate : TOnSelectClientCertificate; - FOnPluginCrashed : TOnPluginCrashed; - FOnRenderViewReady : TOnRenderViewReady; - FOnRenderProcessTerminated : TOnRenderProcessTerminated; - - // ICefDialogHandler - FOnFileDialog : TOnFileDialog; - - // ICefRenderHandler - FOnGetRootScreenRect : TOnGetRootScreenRect; - FOnGetViewRect : TOnGetViewRect; - FOnGetScreenPoint : TOnGetScreenPoint; - FOnGetScreenInfo : TOnGetScreenInfo; - FOnPopupShow : TOnPopupShow; - FOnPopupSize : TOnPopupSize; - FOnPaint : TOnPaint; - FOnCursorChange : TOnCursorChange; - FOnStartDragging : TOnStartDragging; - FOnUpdateDragCursor : TOnUpdateDragCursor; - FOnScrollOffsetChanged : TOnScrollOffsetChanged; - FOnIMECompositionRangeChanged : TOnIMECompositionRangeChanged; - - // ICefDragHandler - FOnDragEnter : TOnDragEnter; - FOnDraggableRegionsChanged : TOnDraggableRegionsChanged; - - // ICefFindHandler - FOnFindResult : TOnFindResult; - - // Custom - FOnTextResultAvailable : TOnTextResultAvailableEvent; - FOnPdfPrintFinished : TOnPdfPrintFinishedEvent; - FOnPrefsAvailable : TOnTextResultAvailableEvent; - FOnCookiesDeleted : TOnCookiesDeletedEvent; - FOnDocumentAvailable : TOnDocumentAvailableEvent; - - function GetIsLoading : boolean; - function GetMultithreadApp : boolean; - function GetHasDocument : boolean; - function GetHasView : boolean; - function GetHasDevTools : boolean; - function GetCanGoBack : boolean; - function GetCanGoForward : boolean; - function GetDocumentURL : string; - function GetZoomLevel : double; - function GetZoomPct : double; - function GetIsPopUp : boolean; - function GetWindowHandle : THandle; - function GetWindowlessFrameRate : integer; - function GetFrameIsFocused : boolean; - function GetInitialized : boolean; - function GetVisibleNavigationEntry : ICefNavigationEntry; - function GetHasValidMainFrame : boolean; - - procedure SetDoNotTrack(aValue : boolean); - procedure SetSendReferrer(aValue : boolean); - procedure SetHyperlinkAuditing(aValue : boolean); - procedure SetCookiePrefs(aValue : integer); - procedure SetImagesPrefs(aValue : integer); - procedure SetProxyType(aValue : integer); - procedure SetProxyServer(const aValue : string); - procedure SetProxyPort(aValue : integer); - procedure SetProxyUsername(const aValue : string); - procedure SetProxyPassword(const aValue : string); - procedure SetProxyScriptURL(const aValue : string); - procedure SetProxyByPassList(const aValue : string); - procedure SetCustomHeaderName(const aValue : string); - procedure SetCustomHeaderValue(const aValue : string); - procedure SetCMStoragePath(const aValue : ustring); - procedure SetZoomLevel(const aValue : double); - procedure SetZoomPct(const aValue : double); - procedure SetZoomStep(aValue : byte); - procedure SetWindowlessFrameRate(aValue : integer); - - - function CreateBrowserHost(aWindowInfo : PCefWindowInfo; const aClient : ICefClient; const aURL : ustring; const aSettings : PCefBrowserSettings; const aContext : ICefRequestContext): Boolean; - function CreateBrowserHostSync(aWindowInfo : PCefWindowInfo; const aClient : ICefClient; const aURL : ustring; const aSettings : PCefBrowserSettings; const aContext : ICefRequestContext): ICefBrowser; - - procedure InitializeEvents; - procedure InitializeSettings(var aSettings : TCefBrowserSettings); - - procedure GetSettings(var aSettings : TCefBrowserSettings); - procedure GetPrintPDFSettings(var aSettings : TCefPdfPrintSettings; const aTitle, aURL : string); - - procedure UpdateAllPreferences; - function UpdateProxyPrefs : boolean; - function UpdatePreference(const aName : string; aValue : boolean) : boolean; overload; - function UpdatePreference(const aName : string; aValue : integer) : boolean; overload; - function UpdatePreference(const aName : string; const aValue : double) : boolean; overload; - function UpdatePreference(const aName, aValue : string) : boolean; overload; - - procedure HandleDictionary(const aDict : ICefDictionaryValue; var aResultSL : TStringList; const aRoot : string); - procedure HandleNull(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleBool(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleInteger(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleDouble(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleString(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleBinary(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleList(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - procedure HandleInvalid(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); - - procedure PrefsAvailableMsg(var aMessage : TMessage); - function GetParentForm : TCustomForm; - procedure ApplyZoomStep; - function GetAllPreferences : boolean; - function SendCompMessage(aMsg : cardinal; wParam : cardinal = 0; lParam : integer = 0) : boolean; - procedure WndProc(var aMessage: TMessage); - - - // ICefClient - function doOnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const aMessage: ICefProcessMessage): Boolean; virtual; - - // ICefLoadHandler - procedure doOnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); virtual; - procedure doOnLoadEnd(const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer); virtual; - procedure doOnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring); virtual; - procedure doOnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); virtual; - - // ICefFocusHandler - procedure doOnTakeFocus(const browser: ICefBrowser; next: Boolean); virtual; - function doOnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean; virtual; - procedure doOnGotFocus(const browser: ICefBrowser); virtual; - - // ICefContextMenuHandler - procedure doOnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); virtual; - function doOnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; virtual; - procedure doOnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); virtual; - - // ICefKeyboardHandler - function doOnPreKeyEvent(const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle; out isKeyboardShortcut: Boolean): Boolean; virtual; - function doOnKeyEvent(const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle): Boolean; virtual; - - // ICefDisplayHandler - procedure doOnAddressChange(const browser: ICefBrowser; const frame: ICefFrame; const url: ustring); virtual; - procedure doOnTitleChange(const browser: ICefBrowser; const title: ustring); virtual; - procedure doOnFaviconUrlChange(const browser: ICefBrowser; iconUrls: TStrings); virtual; - procedure doOnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean); virtual; - function doOnTooltip(const browser: ICefBrowser; var text: ustring): Boolean; virtual; - procedure doOnStatusMessage(const browser: ICefBrowser; const value: ustring); virtual; - function doOnConsoleMessage(const browser: ICefBrowser; const aMessage, source: ustring; line: Integer): Boolean; virtual; - - // ICefDownloadHandler - procedure doOnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback); virtual; - procedure doOnDownloadUpdated(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback); virtual; - - // ICefGeolocationHandler - function doOnRequestGeolocationPermission(const browser: ICefBrowser; const requestingUrl: ustring; requestId: Integer; const callback: ICefGeolocationCallback): Boolean; virtual; - procedure doOnCancelGeolocationPermission(const browser: ICefBrowser; requestId: Integer); virtual; - - // ICefJsDialogHandler - function doOnJsdialog(const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean): Boolean; virtual; - function doOnBeforeUnloadDialog(const browser: ICefBrowser; const messageText: ustring; isReload: Boolean; const callback: ICefJsDialogCallback): Boolean; virtual; - procedure doOnResetDialogState(const browser: ICefBrowser); virtual; - procedure doOnDialogClosed(const browser: ICefBrowser); virtual; - - // ICefLifeSpanHandler - function doOnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; var popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var noJavascriptAccess: Boolean): Boolean; virtual; - procedure doOnAfterCreated(const browser: ICefBrowser); virtual; - procedure doOnBeforeClose(const browser: ICefBrowser); virtual; - function doOnClose(const browser: ICefBrowser): Boolean; virtual; - - // ICefRequestHandler - function doOnBeforeBrowse(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; isRedirect: Boolean): Boolean; virtual; - function doOnOpenUrlFromTab(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean): Boolean; virtual; - function doOnBeforeResourceLoad(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const callback: ICefRequestCallback): TCefReturnValue; - function doOnGetResourceHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest): ICefResourceHandler; virtual; - procedure doOnResourceRedirect(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring); virtual; - function doOnResourceResponse(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse): Boolean; virtual; - function doOnGetResourceResponseFilter(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse): ICefResponseFilter; - procedure doOnResourceLoadComplete(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; status: TCefUrlRequestStatus; receivedContentLength: Int64); virtual; - function doOnGetAuthCredentials(const browser: ICefBrowser; const frame: ICefFrame; isProxy: Boolean; const host: ustring; port: Integer; const realm, scheme: ustring; const callback: ICefAuthCallback): Boolean; virtual; - function doOnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefRequestCallback): Boolean; virtual; - procedure doOnProtocolExecution(const browser: ICefBrowser; const url: ustring; out allowOsExecution: Boolean); virtual; - function doOnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefRequestCallback): Boolean; virtual; - function doOnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; - procedure doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); virtual; - procedure doOnRenderViewReady(const browser: ICefBrowser); virtual; - procedure doOnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); virtual; - - // ICefDialogHandler - function doOnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean; - - // ICefRenderHandler - function doOnGetRootScreenRect(const browser: ICefBrowser; rect: PCefRect): Boolean; - function doOnGetViewRect(const browser: ICefBrowser; rect: PCefRect): Boolean; - function doOnGetScreenPoint(const browser: ICefBrowser; viewX, viewY: Integer; screenX, screenY: PInteger): Boolean; - function doOnGetScreenInfo(const browser: ICefBrowser; screenInfo: PCefScreenInfo): Boolean; - procedure doOnPopupShow(const browser: ICefBrowser; show: Boolean); - procedure doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); - procedure doOnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); - procedure doOnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); - function doOnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; - procedure doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); - procedure doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); - procedure doOnIMECompositionRangeChanged(const browser: ICefBrowser; const selected_range: PCefRange; character_boundsCount: NativeUInt; const character_bounds: PCefRect); - - // ICefDragHandler - function doOnDragEnter(const browser: ICefBrowser; const dragData: ICefDragData; mask: TCefDragOperations): Boolean; - procedure doOnDraggableRegionsChanged(const browser: ICefBrowser; regionsCount: NativeUInt; regions: PCefDraggableRegionArray); - - // ICefFindHandler - procedure doOnFindResult(const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean); - - public - constructor Create(AOwner: TComponent); override; - destructor Destroy; override; - procedure AfterConstruction; override; - function CreateClientHandler(aIsOSR : boolean) : boolean; - function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : string = '') : boolean; - procedure CloseBrowser(aForceClose : boolean); - - procedure DOMVisitorVisit(const document: ICefDomDocument); - procedure CookiesDeleted(numDeleted : integer); - procedure GetHTML; - procedure VisitDOM; - procedure PdfPrintFinished(aResultOK : boolean); - procedure TextResultAvailable(const aText : string); - - procedure LoadURL(const aURL : ustring); - procedure LoadString(const aString : ustring; const aURL : ustring = ''); - procedure GoBack; - procedure GoForward; - procedure Reload; - procedure ReloadIgnoreCache; - procedure StopLoad; - procedure StartDownload(const aURL : ustring); - - procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer); - procedure DeleteCookies; - procedure RetrieveDOMDocument; - procedure RetrieveHTML; - - procedure ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl); - procedure CloseDevTools(const aDevTools : TWinControl = nil); - - procedure Find(aIdentifier : integer; const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean); - procedure StopFinding(aClearSelection : Boolean); - - procedure Print; - procedure PrintToPDF(const aFilePath, aTitle, aURL : ustring); - - procedure ClipboardCopy; - procedure ClipboardPaste; - procedure ClipboardCut; - procedure ClipboardUndo; - procedure ClipboardRedo; - procedure ClipboardDel; - procedure SelectAll; - - procedure IncZoomStep; - procedure DecZoomStep; - procedure ResetZoomStep; - - procedure MoveFormTo(const x, y: Integer); - procedure MoveFormBy(const x, y: Integer); - procedure ResizeFormWidthTo(const x : Integer); - procedure ResizeFormHeightTo(const y : Integer); - procedure SetFormLeftTo(const x : Integer); - procedure SetFormTopTo(const y : Integer); - - procedure WasResized; - procedure WasHidden(hidden: Boolean); - procedure NotifyScreenInfoChanged; - procedure Invalidate(kind: TCefPaintElementType); - procedure SendKeyEvent(const event: PCefKeyEvent); - procedure SendMouseClickEvent(const event: PCefMouseEvent; kind: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); - procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); - procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); - procedure SendFocusEvent(setFocus: Boolean); - procedure SendCaptureLostEvent; - procedure SetFocus(focus: Boolean); - - - property DefaultUrl : ustring read FDefaultUrl write FDefaultUrl; - property Options : TChromiumOptions read FOptions write FOptions; - property FontOptions : TChromiumFontOptions read FFontOptions write FFontOptions; - property PDFPrintOptions : TPDFPrintOptions read FPDFPrintOptions write FPDFPrintOptions; - property DefaultEncoding : ustring read FDefaultEncoding write FDefaultEncoding; - property BrowserId : integer read FBrowserId; - property Browser : ICefBrowser read FBrowser; - property CefClient : ICefClient read FHandler; - property VisibleNavigationEntry : ICefNavigationEntry read GetVisibleNavigationEntry; - property MultithreadApp : boolean read GetMultithreadApp; - property IsLoading : boolean read GetIsLoading; - property HasDocument : boolean read GetHasDocument; - property HasView : boolean read GetHasView; - property HasDevTools : boolean read GetHasDevTools; - property CanGoBack : boolean read GetCanGoBack; - property CanGoForward : boolean read GetCanGoForward; - property IsPopUp : boolean read GetIsPopUp; - property WindowHandle : THandle read GetWindowHandle; - property FrameIsFocused : boolean read GetFrameIsFocused; - property Initialized : boolean read GetInitialized; - property GetPreferences : boolean read FGetPreferences write FGetPreferences; - property CookiePrefs : integer read FCookiePrefs write SetCookiePrefs; - property ImagesPrefs : integer read FImagesPrefs write SetImagesPrefs; - property CMStoragePath : ustring read FCMStoragePath write SetCMStoragePath; - property DocumentURL : string read GetDocumentURL; - property WindowName : string read FWindowName write FWindowName; - property ZoomLevel : double read GetZoomLevel write SetZoomLevel; - property ZoomPct : double read GetZoomPct write SetZoomPct; - property ZoomStep : byte read FZoomStep write SetZoomStep; - property WindowlessFrameRate : integer read GetWindowlessFrameRate write SetWindowlessFrameRate; - property CustomHeaderName : string read FCustomHeaderName write SetCustomHeaderName; - property CustomHeaderValue : string read FCustomHeaderValue write SetCustomHeaderValue; - property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack; - property SendReferrer : boolean read FSendReferrer write SetSendReferrer; - property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing; - property HasValidMainFrame : boolean read GetHasValidMainFrame; - - property ProxyType : integer read FProxyType write SetProxyType; - property ProxyServer : string read FProxyServer write SetProxyServer; - property ProxyPort : integer read FProxyPort write SetProxyPort; - property ProxyUsername : string read FProxyUsername write SetProxyUsername; - property ProxyPassword : string read FProxyPassword write SetProxyPassword; - property ProxyScriptURL : string read FProxyScriptURL write SetProxyScriptURL; - property ProxyByPassList : string read FProxyByPassList write SetProxyByPassList; - - published - property OnTextResultAvailable : TOnTextResultAvailableEvent read FOnTextResultAvailable write FOnTextResultAvailable; - property OnPdfPrintFinished : TOnPdfPrintFinishedEvent read FOnPdfPrintFinished write FOnPdfPrintFinished; - property OnPrefsAvailable : TOnTextResultAvailableEvent read FOnPrefsAvailable write FOnPrefsAvailable; - property OnCookiesDeleted : TOnCookiesDeletedEvent read FOnCookiesDeleted write FOnCookiesDeleted; - property OnDocumentAvailable : TOnDocumentAvailableEvent read FOnDocumentAvailable write FOnDocumentAvailable; - - // ICefClient - property OnProcessMessageReceived : TOnProcessMessageReceived read FOnProcessMessageReceived write FOnProcessMessageReceived; - - // ICefLoadHandler - property OnLoadStart : TOnLoadStart read FOnLoadStart write FOnLoadStart; - property OnLoadEnd : TOnLoadEnd read FOnLoadEnd write FOnLoadEnd; - property OnLoadError : TOnLoadError read FOnLoadError write FOnLoadError; - property OnLoadingStateChange : TOnLoadingStateChange read FOnLoadingStateChange write FOnLoadingStateChange; - - // ICefFocusHandler - property OnTakeFocus : TOnTakeFocus read FOnTakeFocus write FOnTakeFocus; - property OnSetFocus : TOnSetFocus read FOnSetFocus write FOnSetFocus; - property OnGotFocus : TOnGotFocus read FOnGotFocus write FOnGotFocus; - - // ICefContextMenuHandler - property OnBeforeContextMenu : TOnBeforeContextMenu read FOnBeforeContextMenu write FOnBeforeContextMenu; - property OnContextMenuCommand : TOnContextMenuCommand read FOnContextMenuCommand write FOnContextMenuCommand; - property OnContextMenuDismissed : TOnContextMenuDismissed read FOnContextMenuDismissed write FOnContextMenuDismissed; - - // ICefKeyboardHandler - property OnPreKeyEvent : TOnPreKeyEvent read FOnPreKeyEvent write FOnPreKeyEvent; - property OnKeyEvent : TOnKeyEvent read FOnKeyEvent write FOnKeyEvent; - - // ICefDisplayHandler - property OnAddressChange : TOnAddressChange read FOnAddressChange write FOnAddressChange; - property OnTitleChange : TOnTitleChange read FOnTitleChange write FOnTitleChange; - property OnFavIconUrlChange : TOnFavIconUrlChange read FOnFavIconUrlChange write FOnFavIconUrlChange; - property OnFullScreenModeChange : TOnFullScreenModeChange read FOnFullScreenModeChange write FOnFullScreenModeChange; - property OnTooltip : TOnTooltip read FOnTooltip write FOnTooltip; - property OnStatusMessage : TOnStatusMessage read FOnStatusMessage write FOnStatusMessage; - property OnConsoleMessage : TOnConsoleMessage read FOnConsoleMessage write FOnConsoleMessage; - - // ICefDownloadHandler - property OnBeforeDownload : TOnBeforeDownload read FOnBeforeDownload write FOnBeforeDownload; - property OnDownloadUpdated : TOnDownloadUpdated read FOnDownloadUpdated write FOnDownloadUpdated; - - // ICefGeolocationHandler - property OnRequestGeolocationPermission : TOnRequestGeolocationPermission read FOnRequestGeolocationPermission write FOnRequestGeolocationPermission; - property OnCancelGeolocationPermission : TOnCancelGeolocationPermission read FOnCancelGeolocationPermission write FOnCancelGeolocationPermission; - - // ICefJsDialogHandler - property OnJsdialog : TOnJsdialog read FOnJsdialog write FOnJsdialog; - property OnBeforeUnloadDialog : TOnBeforeUnloadDialog read FOnBeforeUnloadDialog write FOnBeforeUnloadDialog; - property OnResetDialogState : TOnResetDialogState read FOnResetDialogState write FOnResetDialogState; - property OnDialogClosed : TOnDialogClosed read FOnDialogClosed write FOnDialogClosed; - - // ICefLifeSpanHandler - property OnBeforePopup : TOnBeforePopup read FOnBeforePopup write FOnBeforePopup; - property OnAfterCreated : TOnAfterCreated read FOnAfterCreated write FOnAfterCreated; - property OnBeforeClose : TOnBeforeClose read FOnBeforeClose write FOnBeforeClose; - property OnClose : TOnClose read FOnClose write FOnClose; - - // ICefRequestHandler - property OnBeforeBrowse : TOnBeforeBrowse read FOnBeforeBrowse write FOnBeforeBrowse; - property OnOpenUrlFromTab : TOnOpenUrlFromTab read FOnOpenUrlFromTab write FOnOpenUrlFromTab; - property OnBeforeResourceLoad : TOnBeforeResourceLoad read FOnBeforeResourceLoad write FOnBeforeResourceLoad; - property OnGetResourceHandler : TOnGetResourceHandler read FOnGetResourceHandler write FOnGetResourceHandler; - property OnResourceRedirect : TOnResourceRedirect read FOnResourceRedirect write FOnResourceRedirect; - property OnResourceResponse : TOnResourceResponse read FOnResourceResponse write FOnResourceResponse; - property OnGetResourceResponseFilter : TOnGetResourceResponseFilter read FOnGetResourceResponseFilter write FOnGetResourceResponseFilter; - property OnResourceLoadComplete : TOnResourceLoadComplete read FOnResourceLoadComplete write FOnResourceLoadComplete; - property OnGetAuthCredentials : TOnGetAuthCredentials read FOnGetAuthCredentials write FOnGetAuthCredentials; - property OnQuotaRequest : TOnQuotaRequest read FOnQuotaRequest write FOnQuotaRequest; - property OnProtocolExecution : TOnProtocolExecution read FOnProtocolExecution write FOnProtocolExecution; - property OnCertificateError : TOnCertificateError read FOnCertificateError write FOnCertificateError; - property OnSelectClientCertificate : TOnSelectClientCertificate read FOnSelectClientCertificate write FOnSelectClientCertificate; - property OnPluginCrashed : TOnPluginCrashed read FOnPluginCrashed write FOnPluginCrashed; - property OnRenderViewReady : TOnRenderViewReady read FOnRenderViewReady write FOnRenderViewReady; - property OnRenderProcessTerminated : TOnRenderProcessTerminated read FOnRenderProcessTerminated write FOnRenderProcessTerminated; - - // ICefDialogHandler - property OnFileDialog : TOnFileDialog read FOnFileDialog write FOnFileDialog; - - // ICefRenderHandler - property OnGetRootScreenRect : TOnGetRootScreenRect read FOnGetRootScreenRect write FOnGetRootScreenRect; - property OnGetViewRect : TOnGetViewRect read FOnGetViewRect write FOnGetViewRect; - property OnGetScreenPoint : TOnGetScreenPoint read FOnGetScreenPoint write FOnGetScreenPoint; - property OnGetScreenInfo : TOnGetScreenInfo read FOnGetScreenInfo write FOnGetScreenInfo; - property OnPopupShow : TOnPopupShow read FOnPopupShow write FOnPopupShow; - property OnPopupSize : TOnPopupSize read FOnPopupSize write FOnPopupSize; - property OnPaint : TOnPaint read FOnPaint write FOnPaint; - property OnCursorChange : TOnCursorChange read FOnCursorChange write FOnCursorChange; - property OnStartDragging : TOnStartDragging read FOnStartDragging write FOnStartDragging; - property OnUpdateDragCursor : TOnUpdateDragCursor read FOnUpdateDragCursor write FOnUpdateDragCursor; - property OnScrollOffsetChanged : TOnScrollOffsetChanged read FOnScrollOffsetChanged write FOnScrollOffsetChanged; - property OnIMECompositionRangeChanged : TOnIMECompositionRangeChanged read FOnIMECompositionRangeChanged write FOnIMECompositionRangeChanged; - - // ICefDragHandler - property OnDragEnter : TOnDragEnter read FOnDragEnter write FOnDragEnter; - property OnDraggableRegionsChanged : TOnDraggableRegionsChanged read FOnDraggableRegionsChanged write FOnDraggableRegionsChanged; - - // ICefFindHandler - property OnFindResult : TOnFindResult read FOnFindResult write FOnFindResult; - - end; - -implementation - -uses - System.SysUtils, System.Math, - uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFCookieManager, uCEFFrame, - uCEFApplication; - -constructor TChromium.Create(AOwner: TComponent); -begin - FBrowser := nil; - FBrowserId := 0; - FCompHandle := 0; - FClosing := False; - FInitialized := False; - FIsOSR := False; - FDefaultUrl := 'about:blank'; - FClientHandler := nil; - FHandler := nil; - FOptions := nil; - FFontOptions := nil; - FDefaultEncoding := ''; - FVisitor := nil; - FPDFPrintcb := nil; - FCookiDeletercb := nil; - FDOMVisitor := nil; - FPDFPrintOptions := nil; - FPrefs := nil; - FUpdatePreferences := False; - FGetPreferences := False; - FCustomHeaderName := ''; - FCustomHeaderValue := ''; - FAddCustomHeader := False; - FDoNotTrack := True; - FSendReferrer := True; - FHyperlinkAuditing := False; - FCookiePrefs := CEF_CONTENT_SETTING_ALLOW; - FImagesPrefs := CEF_CONTENT_SETTING_ALLOW; - FZoomStep := ZOOM_STEP_DEF; - FWindowName := ''; - - FProxyType := CEF_PROXYTYPE_DIRECT; - FProxyServer := ''; - FProxyPort := 80; - FProxyUsername := ''; - FProxyPassword := ''; - FProxyScriptURL := ''; - FProxyByPassList := ''; - - InitializeEvents; - - inherited Create(AOwner); -end; - -destructor TChromium.Destroy; -begin - try - try - FBrowser := nil; - FBrowserId := 0; - - if (FCompHandle <> 0) then - begin - DeallocateHWnd(FCompHandle); - FCompHandle := 0; - end; - - if (FHandler <> nil) then - begin - (FHandler as ICefClientHandler).Disconnect; - FHandler := nil; - end; - - if (FClientHandler <> nil) then - begin - FClientHandler.Disconnect; - FClientHandler.ReleaseOtherInstances; - FClientHandler := nil; - end; - - FVisitor := nil; - FPDFPrintcb := nil; - FCookiDeletercb := nil; - FDOMVisitor := nil; - - if (FFontOptions <> nil) then FreeAndNil(FFontOptions); - if (FOptions <> nil) then FreeAndNil(FOptions); - if (FPDFPrintOptions <> nil) then FreeAndNil(FPDFPrintOptions); - if (FPrefs <> nil) then FreeAndNil(FPrefs); - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.Destroy error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; - finally - inherited Destroy; - end; -end; - -procedure TChromium.AfterConstruction; -begin - inherited AfterConstruction; - - try - if not(csDesigning in ComponentState) then - begin - FCompHandle := AllocateHWnd(WndProc); - FOptions := TChromiumOptions.Create; - FFontOptions := TChromiumFontOptions.Create; - FPDFPrintOptions := TPDFPrintOptions.Create; - FPrefs := TStringList.Create; - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.AfterConstruction error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TChromium.CreateClientHandler(aIsOSR : boolean) : boolean; -begin - Result := False; - - try - if (FHandler = nil) then - begin - FIsOSR := aIsOsr; - FClientHandler := TVCLClientHandler.Create(Self, FIsOSR); - FHandler := FClientHandler as ICefClient; - Result := (FHandler <> nil); - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.CreateClientHandler error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TChromium.InitializeEvents; -begin - // ICefClient - FOnProcessMessageReceived := nil; - - // ICefLoadHandler - FOnLoadStart := nil; - FOnLoadEnd := nil; - FOnLoadError := nil; - FOnLoadingStateChange := nil; - - // ICefFocusHandler - FOnTakeFocus := nil; - FOnSetFocus := nil; - FOnGotFocus := nil; - - // ICefContextMenuHandler - FOnBeforeContextMenu := nil; - FOnContextMenuCommand := nil; - FOnContextMenuDismissed := nil; - - // ICefKeyboardHandler - FOnPreKeyEvent := nil; - FOnKeyEvent := nil; - - // ICefDisplayHandler - FOnAddressChange := nil; - FOnTitleChange := nil; - FOnFavIconUrlChange := nil; - FOnFullScreenModeChange := nil; - FOnTooltip := nil; - FOnStatusMessage := nil; - FOnConsoleMessage := nil; - - // ICefDownloadHandler - FOnBeforeDownload := nil; - FOnDownloadUpdated := nil; - - // ICefGeolocationHandler - FOnRequestGeolocationPermission := nil; - FOnCancelGeolocationPermission := nil; - - // ICefJsDialogHandler - FOnJsdialog := nil; - FOnBeforeUnloadDialog := nil; - FOnResetDialogState := nil; - FOnDialogClosed := nil; - - // ICefLifeSpanHandler - FOnBeforePopup := nil; - FOnAfterCreated := nil; - FOnBeforeClose := nil; - FOnClose := nil; - - // ICefRequestHandler - FOnBeforeBrowse := nil; - FOnOpenUrlFromTab := nil; - FOnBeforeResourceLoad := nil; - FOnGetResourceHandler := nil; - FOnResourceRedirect := nil; - FOnResourceResponse := nil; - FOnGetResourceResponseFilter := nil; - FOnResourceLoadComplete := nil; - FOnGetAuthCredentials := nil; - FOnQuotaRequest := nil; - FOnProtocolExecution := nil; - FOnCertificateError := nil; - FOnSelectClientCertificate := nil; - FOnPluginCrashed := nil; - FOnRenderViewReady := nil; - FOnRenderProcessTerminated := nil; - - // ICefDialogHandler - FOnFileDialog := nil; - - // ICefRenderHandler - FOnGetRootScreenRect := nil; - FOnGetViewRect := nil; - FOnGetScreenPoint := nil; - FOnGetScreenInfo := nil; - FOnPopupShow := nil; - FOnPopupSize := nil; - FOnPaint := nil; - FOnCursorChange := nil; - FOnStartDragging := nil; - FOnUpdateDragCursor := nil; - FOnScrollOffsetChanged := nil; - FOnIMECompositionRangeChanged := nil; - - // ICefDragHandler - FOnDragEnter := nil; - FOnDraggableRegionsChanged := nil; - - // ICefFindHandler - FOnFindResult := nil; - - // Custom - FOnTextResultAvailable := nil; - FOnPdfPrintFinished := nil; - FOnPrefsAvailable := nil; - FOnCookiesDeleted := nil; - FOnDocumentAvailable := nil; -end; - -function TChromium.CreateBrowser(const aBrowserParent : TWinControl; const aWindowName : string) : boolean; -var - TempInfo : TCefWindowInfo; - TempSettings : TCefBrowserSettings; -begin - Result := False; - - try - if not(csDesigning in ComponentState) and - (FBrowser = nil) and - (FBrowserId = 0) and - CreateClientHandler(aBrowserParent = nil) then - begin - GetSettings(TempSettings); - - if FIsOSR then - WindowInfoAsWindowless(TempInfo, FCompHandle, False, aWindowName) - else - WindowInfoAsChild(TempInfo, aBrowserParent.Handle, aBrowserParent.ClientRect, aWindowName); - - - if MultithreadApp then - Result := CreateBrowserHost(@TempInfo, FHandler, FDefaultUrl, @TempSettings, nil) - else - begin - FBrowser := CreateBrowserHostSync(@TempInfo, FHandler, FDefaultUrl, @TempSettings, nil); - - if (FBrowser <> nil) then - begin - FBrowserId := FBrowser.Identifier; - Result := True; - end; - end; - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.CreateBrowser error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TChromium.CloseBrowser(aForceClose : boolean); -begin - if Initialized then FBrowser.Host.CloseBrowser(aForceClose); -end; - -function TChromium.CreateBrowserHost(aWindowInfo : PCefWindowInfo; - const aClient : ICefClient; - const aURL : ustring; - const aSettings : PCefBrowserSettings; - const aContext : ICefRequestContext): Boolean; -var - TempURL : TCefString; -begin - TempURL := CefString(aURL); - Result := cef_browser_host_create_browser(aWindowInfo, CefGetData(aClient), @TempURL, aSettings, CefGetData(aContext)) <> 0; -end; - -function TChromium.CreateBrowserHostSync(aWindowInfo : PCefWindowInfo; - const aClient : ICefClient; - const aURL : ustring; - const aSettings : PCefBrowserSettings; - const aContext : ICefRequestContext): ICefBrowser; -var - TempURL : TCefString; - TempBrowser : PCefBrowser; -begin - TempURL := CefString(aURL); - TempBrowser := cef_browser_host_create_browser_sync(aWindowInfo, CefGetData(aClient), @TempURL, aSettings, CefGetData(aContext)); - Result := TCefBrowserRef.UnWrap(TempBrowser); -end; - -procedure TChromium.Find(aIdentifier : integer; const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean); -begin - if Initialized then FBrowser.Host.Find(aIdentifier, aSearchText, aForward, aMatchCase, aFindNext); -end; - -procedure TChromium.StopFinding(aClearSelection : Boolean); -begin - if Initialized then FBrowser.Host.StopFinding(aClearSelection); -end; - -procedure TChromium.Print; -begin - if Initialized then FBrowser.Host.Print; -end; - -procedure TChromium.PrintToPDF(const aFilePath, aTitle, aURL : ustring); -var - TempSettings : TCefPdfPrintSettings; -begin - if Initialized then - begin - GetPrintPDFSettings(TempSettings, aTitle, aURL); - if (FPDFPrintcb = nil) then FPDFPrintcb := TCefPDFPrintCallBack.Create(self); - FBrowser.Host.PrintToPdf(aFilePath, @TempSettings, FPDFPrintcb); - end; -end; - -procedure TChromium.VisitDOM; -var - TempFrame : ICefFrame; -begin - try - if Initialized then - begin - TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then - begin - if (FDOMVisitor = nil) then FDOMVisitor := TCustomDomVisitor.Create(self); - TempFrame.VisitDom(FDOMVisitor); - end; - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.VisitDOM error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TChromium.ClipboardCopy; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.Copy; - end; -end; - -procedure TChromium.ClipboardPaste; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.Paste; - end; -end; - -procedure TChromium.ClipboardCut; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.Cut; - end; -end; - -procedure TChromium.ClipboardUndo; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.Undo; - end; -end; - -procedure TChromium.ClipboardRedo; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.Redo; - end; -end; - -procedure TChromium.ClipboardDel; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.Del; - end; -end; - -procedure TChromium.SelectAll; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.FocusedFrame; - if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; - - if (TempFrame <> nil) then TempFrame.SelectAll; - end; -end; - -procedure TChromium.GetPrintPDFSettings(var aSettings : TCefPdfPrintSettings; const aTitle, aURL : string); -begin - if (FPDFPrintOptions <> nil) then - begin - aSettings.header_footer_title := CefString(aTitle); - aSettings.header_footer_url := CefString(aURL); - aSettings.page_width := FPDFPrintOptions.page_width; - aSettings.page_height := FPDFPrintOptions.page_height; - aSettings.margin_top := FPDFPrintOptions.margin_top; - aSettings.margin_right := FPDFPrintOptions.margin_right; - aSettings.margin_bottom := FPDFPrintOptions.margin_bottom; - aSettings.margin_left := FPDFPrintOptions.margin_left; - aSettings.margin_type := FPDFPrintOptions.margin_type; - aSettings.header_footer_enabled := FPDFPrintOptions.header_footer_enabled; - aSettings.selection_only := FPDFPrintOptions.selection_only; - aSettings.landscape := FPDFPrintOptions.landscape; - aSettings.backgrounds_enabled := FPDFPrintOptions.backgrounds_enabled; - end; -end; - -procedure TChromium.GetSettings(var aSettings : TCefBrowserSettings); -begin - if (FFontOptions <> nil) and (FOptions <> nil) then - begin - aSettings.size := SizeOf(TCefBrowserSettings); - aSettings.windowless_frame_rate := FOptions.WindowlessFrameRate; - aSettings.standard_font_family := CefString(FFontOptions.StandardFontFamily); - aSettings.fixed_font_family := CefString(FFontOptions.FixedFontFamily); - aSettings.serif_font_family := CefString(FFontOptions.SerifFontFamily); - aSettings.sans_serif_font_family := CefString(FFontOptions.SansSerifFontFamily); - aSettings.cursive_font_family := CefString(FFontOptions.CursiveFontFamily); - aSettings.fantasy_font_family := CefString(FFontOptions.FantasyFontFamily); - aSettings.default_font_size := FFontOptions.DefaultFontSize; - aSettings.default_fixed_font_size := FFontOptions.DefaultFixedFontSize; - aSettings.minimum_font_size := FFontOptions.MinimumFontSize; - aSettings.minimum_logical_font_size := FFontOptions.MinimumLogicalFontSize; - aSettings.remote_fonts := FFontOptions.RemoteFonts; - aSettings.default_encoding := CefString(DefaultEncoding); - aSettings.javascript := FOptions.Javascript; - aSettings.javascript_open_windows := FOptions.JavascriptOpenWindows; - aSettings.javascript_close_windows := FOptions.JavascriptCloseWindows; - aSettings.javascript_access_clipboard := FOptions.JavascriptAccessClipboard; - aSettings.javascript_dom_paste := FOptions.JavascriptDomPaste; - aSettings.caret_browsing := FOptions.CaretBrowsing; - aSettings.plugins := FOptions.Plugins; - aSettings.universal_access_from_file_urls := FOptions.UniversalAccessFromFileUrls; - aSettings.file_access_from_file_urls := FOptions.FileAccessFromFileUrls; - aSettings.web_security := FOptions.WebSecurity; - aSettings.image_loading := FOptions.ImageLoading; - aSettings.image_shrink_standalone_to_fit := FOptions.ImageShrinkStandaloneToFit; - aSettings.text_area_resize := FOptions.TextAreaResize; - aSettings.tab_to_links := FOptions.TabToLinks; - aSettings.local_storage := FOptions.LocalStorage; - aSettings.databases := FOptions.Databases; - aSettings.application_cache := FOptions.ApplicationCache; - aSettings.webgl := FOptions.Webgl; - aSettings.background_color := FOptions.BackgroundColor; - aSettings.accept_language_list := CefString(FOptions.AcceptLanguageList); - end; -end; - -procedure TChromium.InitializeSettings(var aSettings : TCefBrowserSettings); -begin - aSettings.size := SizeOf(TCefBrowserSettings); - aSettings.windowless_frame_rate := 30; - aSettings.standard_font_family := CefString(''); - aSettings.fixed_font_family := CefString(''); - aSettings.serif_font_family := CefString(''); - aSettings.sans_serif_font_family := CefString(''); - aSettings.cursive_font_family := CefString(''); - aSettings.fantasy_font_family := CefString(''); - aSettings.default_font_size := 0; - aSettings.default_fixed_font_size := 0; - aSettings.minimum_font_size := 0; - aSettings.minimum_logical_font_size := 0; - aSettings.remote_fonts := STATE_DEFAULT; - aSettings.default_encoding := CefString(''); - aSettings.javascript := STATE_DEFAULT; - aSettings.javascript_open_windows := STATE_DEFAULT; - aSettings.javascript_close_windows := STATE_DEFAULT; - aSettings.javascript_access_clipboard := STATE_DEFAULT; - aSettings.javascript_dom_paste := STATE_DEFAULT; - aSettings.caret_browsing := STATE_DEFAULT; - aSettings.plugins := STATE_DEFAULT; - aSettings.universal_access_from_file_urls := STATE_DEFAULT; - aSettings.file_access_from_file_urls := STATE_DEFAULT; - aSettings.web_security := STATE_DEFAULT; - aSettings.image_loading := STATE_DEFAULT; - aSettings.image_shrink_standalone_to_fit := STATE_DEFAULT; - aSettings.text_area_resize := STATE_DEFAULT; - aSettings.tab_to_links := STATE_DEFAULT; - aSettings.local_storage := STATE_DEFAULT; - aSettings.databases := STATE_DEFAULT; - aSettings.application_cache := STATE_DEFAULT; - aSettings.webgl := STATE_DEFAULT; - aSettings.background_color := 0; - aSettings.accept_language_list := CefString(''); -end; - -procedure TChromium.LoadURL(const aURL : ustring); -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.MainFrame; - if (TempFrame <> nil) then TempFrame.LoadUrl(aURL); - end; -end; - -procedure TChromium.LoadString(const aString : ustring; const aURL : ustring); -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.MainFrame; - if (TempFrame <> nil) then TempFrame.LoadString(aString, aURL); - end; -end; - -procedure TChromium.GoBack; -begin - if Initialized and CanGoBack then FBrowser.GoBack; -end; - -procedure TChromium.GoForward; -begin - if Initialized and CanGoForward then FBrowser.GoForward; -end; - -procedure TChromium.Reload; -begin - if Initialized then FBrowser.Reload; -end; - -procedure TChromium.ReloadIgnoreCache; -begin - if Initialized then FBrowser.ReloadIgnoreCache; -end; - -procedure TChromium.StopLoad; -begin - if Initialized then FBrowser.StopLoad; -end; - -procedure TChromium.StartDownload(const aURL : ustring); -begin - if Initialized then FBrowser.Host.StartDownload(aURL); -end; - -function TChromium.GetIsLoading : boolean; -begin - Result := Initialized and FBrowser.IsLoading; -end; - -function TChromium.GetMultithreadApp : boolean; -begin - Result := True; - - try - if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.MultiThreadedMessageLoop; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.GetMultithreadApp error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TChromium.GetHasDocument : boolean; -begin - Result := Initialized and FBrowser.HasDocument; -end; - -function TChromium.GetHasView : boolean; -begin - Result := Initialized and FBrowser.Host.HasView; -end; - -function TChromium.GetHasDevTools : boolean; -begin - Result := Initialized and FBrowser.Host.HasDevTools; -end; - -function TChromium.GetWindowHandle : THandle; -begin - if Initialized then - Result := FBrowser.Host.WindowHandle - else - Result := 0; -end; - -function TChromium.GetFrameIsFocused : boolean; -begin - Result := Initialized and (FBrowser.FocusedFrame <> nil); -end; - -function TChromium.GetWindowlessFrameRate : integer; -begin - if Initialized then - Result := FBrowser.Host.GetWindowlessFrameRate - else - Result := 0; -end; - -function TChromium.GetVisibleNavigationEntry : ICefNavigationEntry; -begin - if Initialized then - Result := FBrowser.Host.VisibleNavigationEntry - else - Result := nil; -end; - -function TChromium.GetHasValidMainFrame : boolean; -begin - Result := Initialized and (FBrowser.MainFrame <> nil) and FBrowser.MainFrame.IsValid; -end; - -procedure TChromium.SetWindowlessFrameRate(aValue : integer); -begin - if Initialized then FBrowser.Host.SetWindowlessFrameRate(aValue); -end; - -function TChromium.GetCanGoBack : boolean; -begin - Result := Initialized and FBrowser.CanGoBack; -end; - -function TChromium.GetCanGoForward : boolean; -begin - Result := Initialized and FBrowser.CanGoForward; -end; - -function TChromium.GetIsPopUp : boolean; -begin - Result := Initialized and FBrowser.IsPopUp; -end; - -function TChromium.GetInitialized : boolean; -begin - Result := FInitialized and not(FClosing) and (FBrowser <> nil); -end; - -function TChromium.GetDocumentURL : string; -var - TempFrame : ICefFrame; -begin - Result := ''; - - if Initialized then - begin - TempFrame := FBrowser.MainFrame; - if (TempFrame <> nil) then Result := TempFrame.URL; - end; -end; - -function TChromium.GetZoomLevel : double; -begin - Result := 0; - - if Initialized then Result := FBrowser.Host.ZoomLevel; -end; - -procedure TChromium.SetZoomLevel(const aValue : double); -begin - if Initialized then FBrowser.Host.ZoomLevel := aValue; -end; - -function TChromium.GetZoomPct : double; -begin - Result := power(1.2, ZoomLevel) * 100; -end; - -procedure TChromium.SetZoomPct(const aValue : double); -begin - if Initialized and (aValue > 0) then ZoomLevel := LogN(1.2, aValue / 100); -end; - -procedure TChromium.ApplyZoomStep; -begin - case FZoomStep of - ZOOM_STEP_25 : ZoomPct := 25; - ZOOM_STEP_33 : ZoomPct := 33; - ZOOM_STEP_50 : ZoomPct := 50; - ZOOM_STEP_67 : ZoomPct := 67; - ZOOM_STEP_75 : ZoomPct := 75; - ZOOM_STEP_90 : ZoomPct := 90; - ZOOM_STEP_100 : ZoomPct := 100; - ZOOM_STEP_110 : ZoomPct := 110; - ZOOM_STEP_125 : ZoomPct := 125; - ZOOM_STEP_150 : ZoomPct := 150; - ZOOM_STEP_175 : ZoomPct := 175; - ZOOM_STEP_200 : ZoomPct := 200; - ZOOM_STEP_250 : ZoomPct := 250; - ZOOM_STEP_300 : ZoomPct := 300; - ZOOM_STEP_400 : ZoomPct := 400; - ZOOM_STEP_500 : ZoomPct := 500; - end; -end; - -procedure TChromium.SetZoomStep(aValue : byte); -begin - if Initialized and (aValue in [ZOOM_STEP_MIN..ZOOM_STEP_MAX]) then - begin - FZoomStep := aValue; - ApplyZoomStep; - end; -end; - -procedure TChromium.IncZoomStep; -begin - if Initialized and (FZoomStep < ZOOM_STEP_MAX) then - begin - inc(FZoomStep); - ApplyZoomStep; - end; -end; - -procedure TChromium.DecZoomStep; -begin - if Initialized and (FZoomStep > ZOOM_STEP_MIN) then - begin - dec(FZoomStep); - ApplyZoomStep; - end; -end; - -procedure TChromium.ResetZoomStep; -begin - ZoomStep := ZOOM_STEP_DEF; -end; - -procedure TChromium.SetDoNotTrack(aValue : boolean); -begin - if (FDoNotTrack <> aValue) then - begin - FDoNotTrack := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetSendReferrer(aValue : boolean); -begin - if (FSendReferrer <> aValue) then - begin - FSendReferrer := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetHyperlinkAuditing(aValue : boolean); -begin - if (FHyperlinkAuditing <> aValue) then - begin - FHyperlinkAuditing := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetCookiePrefs(aValue : integer); -begin - if (FCookiePrefs <> aValue) then - begin - FCookiePrefs := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetImagesPrefs(aValue : integer); -begin - if (FImagesPrefs <> aValue) then - begin - FImagesPrefs := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyType(aValue : integer); -begin - if (FProxyType <> aValue) then - begin - FProxyType := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyServer(const aValue : string); -begin - if (FProxyServer <> aValue) then - begin - FProxyServer := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyPort(aValue : integer); -begin - if (FProxyPort <> aValue) then - begin - FProxyPort := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyUsername(const aValue : string); -begin - if (FProxyUsername <> aValue) then - begin - FProxyUsername := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyPassword(const aValue : string); -begin - if (FProxyPassword <> aValue) then - begin - FProxyPassword := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyScriptURL(const aValue : string); -begin - if (FProxyScriptURL <> aValue) then - begin - FProxyScriptURL := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetProxyByPassList(const aValue : string); -begin - if (FProxyByPassList <> aValue) then - begin - FProxyByPassList := aValue; - FUpdatePreferences := True; - end; -end; - -procedure TChromium.SetCustomHeaderName(const aValue : string); -begin - if (FCustomHeaderName <> aValue) then - begin - FCustomHeaderName := aValue; - FAddCustomHeader := (length(FCustomHeaderName) > 0) and (length(FCustomHeaderValue) > 0); - end; -end; - -procedure TChromium.SetCustomHeaderValue(const aValue : string); -begin - if (FCustomHeaderValue <> aValue) then - begin - FCustomHeaderValue := aValue; - FAddCustomHeader := (length(FCustomHeaderName) > 0) and (length(FCustomHeaderValue) > 0); - end; -end; - -procedure TChromium.SetCMStoragePath(const aValue : ustring); -var - CookieManager : ICefCookieManager; -begin - FCMStoragePath := aValue; - CookieManager := TCefCookieManagerRef.Global(nil); - - if (CookieManager <> nil) then - CookieManager.SetStoragePath(FCMStoragePath, False, nil); -end; - -procedure TChromium.GetHTML; -var - TempFrame : ICefFrame; -begin - if Initialized then - begin - TempFrame := FBrowser.MainFrame; - if (TempFrame <> nil) then - begin - if (FVisitor = nil) then FVisitor := TCustomCefStringVisitor.Create(self); - TempFrame.GetSource(FVisitor); - end; - end; -end; - -procedure TChromium.DeleteCookies; -var - TempTask: ICefTask; -begin - if Initialized then - begin - if (FCookiDeletercb = nil) then FCookiDeletercb := TCefCustomDeleteCookiesCallback.Create(self); - TempTask := TCefDeleteCookiesTask.Create(FCookiDeletercb); - CefPostTask(TID_IO, TempTask); - end; -end; - -procedure TChromium.RetrieveDOMDocument; -var - TempTask: ICefTask; -begin - if Initialized then - begin - TempTask := TCefGetDocumentTask.Create(self); - CefPostTask(TID_RENDERER, TempTask); - end; -end; - -procedure TChromium.RetrieveHTML; -var - TempTask: ICefTask; -begin - if Initialized then - begin - TempTask := TCefGetHTMLTask.Create(self); - CefPostTask(TID_UI, TempTask); - end; -end; - -procedure TChromium.SimulateMouseWheel(aDeltaX, aDeltaY : integer); -var - TempEvent : TCefMouseEvent; -begin - if Initialized then - begin - TempEvent.x := 0; - TempEvent.y := 0; - TempEvent.modifiers := []; - FBrowser.Host.SendMouseWheelEvent(@TempEvent, aDeltaX, aDeltaY); - end; -end; - -procedure TChromium.UpdateAllPreferences; -begin - UpdateProxyPrefs; - UpdatePreference('enable_do_not_track', FDoNotTrack); - UpdatePreference('enable_referrers', FSendReferrer); - UpdatePreference('enable_a_ping', FHyperlinkAuditing); -end; - -function TChromium.UpdateProxyPrefs : boolean; -var - TempError : ustring; - TempProxy : ICefValue; - TempValue : ICefValue; - TempDict : ICefDictionaryValue; -begin - Result := False; - - try - if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference('proxy') then - begin - TempProxy := TCefValueRef.New; - TempValue := TCefValueRef.New; - TempDict := TCefDictionaryValueRef.New; - - case FProxyType of - CEF_PROXYTYPE_AUTODETECT : - begin - TempValue.SetString('auto_detect'); - TempDict.SetValue('mode', TempValue); - end; - - CEF_PROXYTYPE_SYSTEM : - begin - TempValue.SetString('system'); - TempDict.SetValue('mode', TempValue); - end; - - CEF_PROXYTYPE_FIXED_SERVERS : - begin - TempValue.SetString('fixed_servers'); - TempDict.SetValue('mode', TempValue); - TempDict.SetString('server', FProxyServer + ':' + inttostr(FProxyPort)); - if (length(FProxyByPassList) > 0) then TempDict.SetString('bypass_list', FProxyByPassList); - end; - - - CEF_PROXYTYPE_PAC_SCRIPT : - begin - TempValue.SetString('pac_script'); - TempDict.SetValue('mode', TempValue); - TempDict.SetString('pac_url', FProxyScriptURL); - end; - - else // CEF_PROXYTYPE_DIRECT - begin - TempValue.SetString('direct'); - TempDict.SetValue('mode', TempValue); - end; - end; - - Result := TempProxy.SetDictionary(TempDict) and - FBrowser.Host.RequestContext.SetPreference('proxy', TempProxy, TempError); - - {$IFDEF DEBUG} - if not(Result) then OutputDebugString(PWideChar('UpdateProxyPrefs error : ' + quotedstr(TempError) + chr(0))); - {$ENDIF} - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.UpdateProxyPrefs error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TChromium.UpdatePreference(const aName : string; aValue : boolean) : boolean; -var - TempError : ustring; - TempValue : ICefValue; -begin - Result := False; - - try - if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then - begin - TempValue := TCefValueRef.New; - - if aValue then - TempValue.SetBool(1) - else - TempValue.SetBool(0); - - Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); - - {$IFDEF DEBUG} - if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); - {$ENDIF} - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TChromium.UpdatePreference(const aName : string; aValue : integer) : boolean; -var - TempError : ustring; - TempValue : ICefValue; -begin - Result := False; - - try - if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then - begin - TempValue := TCefValueRef.New; - TempValue.SetInt(aValue); - Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); - - {$IFDEF DEBUG} - if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); - {$ENDIF} - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TChromium.UpdatePreference(const aName : string; const aValue : double) : boolean; -var - TempError : ustring; - TempValue : ICefValue; -begin - Result := False; - - try - if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then - begin - TempValue := TCefValueRef.New; - TempValue.SetDouble(aValue); - Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); - - {$IFDEF DEBUG} - if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); - {$ENDIF} - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -function TChromium.UpdatePreference(const aName, aValue : string) : boolean; -var - TempError : ustring; - TempValue : ICefValue; -begin - Result := False; - - try - if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then - begin - TempValue := TCefValueRef.New; - TempValue.SetString(aValue); - Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); - - {$IFDEF DEBUG} - if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); - {$ENDIF} - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TChromium.HandleNull(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : -null-') - else - aResultSL.Add('-null-'); -end; - -procedure TChromium.HandleBool(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : ' + BoolToStr(aValue.GetBool, true)) - else - aResultSL.Add(BoolToStr(aValue.GetBool, true)); -end; - -procedure TChromium.HandleInteger(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : ' + IntToStr(aValue.GetInt)) - else - aResultSL.Add(IntToStr(aValue.GetInt)); -end; - -procedure TChromium.HandleDouble(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : ' + FloatToStr(aValue.GetDouble)) - else - aResultSL.Add(FloatToStr(aValue.GetDouble)); -end; - -procedure TChromium.HandleString(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : ' + aValue.GetString) - else - aResultSL.Add(aValue.GetString); -end; - -procedure TChromium.HandleBinary(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : -binary-') - else - aResultSL.Add('-binary-'); -end; - -procedure TChromium.HandleList(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey, TempResult : string; - i, j : integer; - TempList : ICefListValue; - TempValue : ICefValue; - TempSL : TStringList; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - TempList := aValue.GetList; - TempSL := TStringList.Create; - - i := 0; - j := TempList.GetSize; - - TempResult := '(' + inttostr(j) + '){'; - - while (i < j) do - begin - TempValue := TempList.GetValue(i); - - case TempValue.GetType of - VTYPE_NULL : TempResult := TempResult + '-null-,'; - VTYPE_BOOL : TempResult := TempResult + BoolToStr(aValue.GetBool, true) + ','; - VTYPE_INT : TempResult := TempResult + IntToStr(aValue.GetInt) + ','; - VTYPE_DOUBLE : TempResult := TempResult + FloatToStr(aValue.GetDouble) + ','; - VTYPE_STRING : TempResult := TempResult + aValue.GetString + ','; - VTYPE_BINARY : TempResult := TempResult + '-binary-,'; - VTYPE_DICTIONARY : - begin - TempSL.Clear; - HandleDictionary(TempValue.GetDictionary, TempSL, ''); - TempResult := TempResult + TempSL.CommaText + ','; - end; - - VTYPE_LIST : - begin - TempSL.Clear; - HandleList(TempValue, TempSL, '', ''); - TempResult := TempResult + TempSL.CommaText + ','; - end; - - else TempResult := TempResult + '-invalid-,'; - end; - - inc(i); - end; - - i := length(TempResult); - if (i > 0) and (TempResult[i] = ',') then TempResult := copy(TempResult, 1, pred(i)); - TempResult := TempResult + '}'; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : ' + TempResult) - else - aResultSL.Add(TempResult); - - TempSL.Free; -end; - -procedure TChromium.HandleInvalid(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); -var - TempKey : string; -begin - if (aRoot <> '') then - TempKey := aRoot + '.' + aKey - else - TempKey := aKey; - - if (length(TempKey) > 0) then - aResultSL.Add(TempKey + ' : -invalid-') - else - aResultSL.Add('-invalid-'); -end; - -procedure TChromium.HandleDictionary(const aDict : ICefDictionaryValue; var aResultSL : TStringList; const aRoot : string); -var - TempKeys : TStringList; - i, j : integer; - TempValue : ICefValue; - TempNewKey : string; -begin - TempKeys := nil; - - try - try - if (aDict <> nil) then - begin - TempKeys := TStringList.Create; - aDict.GetKeys(TempKeys); - - i := 0; - j := TempKeys.Count; - - while (i < j) do - begin - TempValue := aDict.GetValue(TempKeys[i]); - - case TempValue.GetType of - VTYPE_NULL : HandleNull(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_BOOL : HandleBool(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_INT : HandleInteger(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_DOUBLE : HandleDouble(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_STRING : HandleString(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_BINARY : HandleBinary(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_LIST : HandleList(TempValue, aResultSL, aRoot, TempKeys[i]); - VTYPE_DICTIONARY : - begin - if (length(aRoot) > 0) then - TempNewKey := aRoot + '.' + TempKeys[i] - else - TempNewKey := TempKeys[i]; - - HandleDictionary(TempValue.GetDictionary, aResultSL, TempNewKey); - end; - - else - HandleInvalid(TempValue, aResultSL, aRoot, TempKeys[i]); - end; - - inc(i); - end; - - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.HandleDictionary error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; - finally - if (TempKeys <> nil) then TempKeys.Free; - end; -end; - -function TChromium.GetAllPreferences : boolean; -var - TempDict : ICefDictionaryValue; -begin - Result := False; - - try - if (FBrowser <> nil) and (FPrefs <> nil) then - begin - FPrefs.Clear; - TempDict := FBrowser.Host.RequestContext.GetAllPreferences(True); - HandleDictionary(TempDict, FPrefs, ''); - Result := SendCompMessage(CEF_PREFERENCES_AVAILABLE); - end; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TChromium.GetAllPreferences error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -procedure TChromium.PrefsAvailableMsg(var aMessage : TMessage); -begin - if (FPrefs <> nil) and assigned(FOnPrefsAvailable) then FOnPrefsAvailable(self, FPrefs.Text); -end; - -function TChromium.SendCompMessage(aMsg : cardinal; wParam : cardinal; lParam : integer) : boolean; -begin - Result := (FCompHandle <> 0) and PostMessage(FCompHandle, aMsg, wParam, lParam); -end; - -procedure TChromium.TextResultAvailable(const aText : string); -begin - if assigned(FOnTextResultAvailable) then FOnTextResultAvailable(self, aText); -end; - -procedure TChromium.CookiesDeleted(numDeleted : integer); -begin - if assigned(FOnCookiesDeleted) then FOnCookiesDeleted(self, numDeleted); -end; - -procedure TChromium.DOMVisitorVisit(const document: ICefDomDocument); -begin - if assigned(FOnDocumentAvailable) then FOnDocumentAvailable(self, document); -end; - -procedure TChromium.PdfPrintFinished(aResultOK : boolean); -begin - if assigned(FOnPdfPrintFinished) then FOnPdfPrintFinished(self, aResultOK); -end; - -procedure TChromium.ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl); -var - TempInfo : TCefWindowInfo; - TempSettings : TCefBrowserSettings; - TempPoint : TCefPoint; - TempPPoint : PCefPoint; -begin - if not(Initialized) or HasDevTools then Exit; - - InitializeSettings(TempSettings); - - if (aDevTools <> nil) then - WindowInfoAsChild(TempInfo, aDevTools.Handle, aDevTools.ClientRect, aDevTools.Name) - else - WindowInfoAsPopUp(TempInfo, WindowHandle, DEVTOOLS_WINDOWNAME); - - - if (inspectElementAt.x <> low(integer)) and - (inspectElementAt.y <> low(integer)) then - begin - TempPoint.x := inspectElementAt.x; - TempPoint.y := inspectElementAt.y; - TempPPoint := @TempPoint; - end - else - TempPPoint := nil; - - FBrowser.Host.ShowDevTools(@TempInfo, TCefClientOwn.Create as ICefClient, @TempSettings, TempPPoint); -end; - -procedure TChromium.CloseDevTools(const aDevTools : TWinControl); -begin - if Initialized then - begin - if (aDevTools <> nil) then WinApi.Windows.SetParent(GetWindow(aDevTools.Handle, GW_CHILD), 0); - if (FBrowser <> nil) then FBrowser.Host.CloseDevTools; - end; -end; - -procedure TChromium.WndProc(var aMessage: TMessage); -begin - case aMessage.Msg of - CEF_PREFERENCES_AVAILABLE : PrefsAvailableMsg(aMessage); - - else aMessage.Result := DefWindowProc(FCompHandle, aMessage.Msg, aMessage.WParam, aMessage.LParam); - end; -end; - -function TChromium.doOnClose(const browser: ICefBrowser): Boolean; -begin - Result := False; - - if Assigned(FOnClose) then FOnClose(Self, browser, Result); - - FClosing := True; -end; - -procedure TChromium.doOnAddressChange(const browser: ICefBrowser; const frame: ICefFrame; const url: ustring); -begin - if Assigned(FOnAddressChange) then FOnAddressChange(Self, browser, frame, url); -end; - -procedure TChromium.doOnAfterCreated(const browser: ICefBrowser); -begin - if MultithreadApp and (FBrowser = nil) then - begin - FBrowser := browser; - if (FBrowser <> nil) then FBrowserId := FBrowser.Identifier; - end; - - UpdateAllPreferences; - - FInitialized := (FBrowser <> nil) and (FBrowserId <> 0); - - if Assigned(FOnAfterCreated) then FOnAfterCreated(Self, browser); -end; - -function TChromium.doOnBeforeBrowse(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest; - isRedirect : Boolean): Boolean; -begin - Result := False; - - if FUpdatePreferences then - begin - FUpdatePreferences := False; - UpdateAllPreferences; - end; - - if FGetPreferences then - begin - FGetPreferences := False; - GetAllPreferences; - end; - - if Assigned(FOnBeforeBrowse) then FOnBeforeBrowse(Self, browser, frame, request, isRedirect, Result); -end; - -procedure TChromium.doOnBeforeClose(const browser: ICefBrowser); -begin - FInitialized := False; - FBrowser := nil; - FBrowserId := 0; - - if Assigned(FOnBeforeClose) then FOnBeforeClose(Self, browser); -end; - -procedure TChromium.doOnBeforeContextMenu(const browser : ICefBrowser; - const frame : ICefFrame; - const params : ICefContextMenuParams; - const model : ICefMenuModel); -begin - if Assigned(FOnBeforeContextMenu) then FOnBeforeContextMenu(Self, browser, frame, params, model); -end; - -procedure TChromium.doOnBeforeDownload(const browser : ICefBrowser; - const downloadItem : ICefDownloadItem; - const suggestedName : ustring; - const callback : ICefBeforeDownloadCallback); -begin - if Assigned(FOnBeforeDownload) then FOnBeforeDownload(Self, browser, downloadItem, suggestedName, callback); -end; - -function TChromium.doOnBeforePopup(const browser : ICefBrowser; - const frame : ICefFrame; - const targetUrl : ustring; - const targetFrameName : ustring; - targetDisposition : TCefWindowOpenDisposition; - userGesture : Boolean; - var popupFeatures : TCefPopupFeatures; - var windowInfo : TCefWindowInfo; - var client : ICefClient; - var settings : TCefBrowserSettings; - var noJavascriptAccess : Boolean): Boolean; -begin - Result := False; - - if Assigned(FOnBeforePopup) then - FOnBeforePopup(Self, browser, frame, targetUrl, targetFrameName, - targetDisposition, userGesture, popupFeatures, windowInfo, client, - settings, noJavascriptAccess, Result); -end; - -function TChromium.doOnBeforeResourceLoad(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest; - const callback : ICefRequestCallback): TCefReturnValue; -var - TempHeaderMap : ICefStringMultimap; -begin - if FAddCustomHeader then - begin - TempHeaderMap := TCefStringMultimapOwn.Create; - request.GetHeaderMap(TempHeaderMap); - TempHeaderMap.Append(FCustomHeaderName, FCustomHeaderValue); - request.SetHeaderMap(TempHeaderMap); - TempHeaderMap := nil; - end; - - if not(FSendReferrer) then request.SetReferrer('', REFERRER_POLICY_NEVER); - - Result := RV_CONTINUE; - - if Assigned(FOnBeforeResourceLoad) then FOnBeforeResourceLoad(Self, browser, frame, request, callback, Result); -end; - -function TChromium.doOnBeforeUnloadDialog(const browser : ICefBrowser; - const messageText : ustring; - isReload : Boolean; - const callback : ICefJsDialogCallback): Boolean; -begin - Result := False; - - if Assigned(FOnBeforeUnloadDialog) then FOnBeforeUnloadDialog(Self, browser, messageText, isReload, callback, Result); -end; - -procedure TChromium.doOnCancelGeolocationPermission(const browser : ICefBrowser; requestId : Integer); -begin - if Assigned(FOnCancelGeolocationPermission) then - FOnCancelGeolocationPermission(Self, browser, requestId); -end; - -function TChromium.doOnCertificateError(const browser : ICefBrowser; - certError : TCefErrorcode; - const requestUrl : ustring; - const sslInfo : ICefSslInfo; - const callback : ICefRequestCallback): Boolean; -begin - Result := False; - - if Assigned(FOnCertificateError) then - FOnCertificateError(Self, browser, certError, requestUrl, sslInfo, callback, Result); -end; - -function TChromium.doOnConsoleMessage(const browser : ICefBrowser; - const aMessage : ustring; - const source : ustring; - line : Integer): Boolean; -begin - Result := False; - - if Assigned(FOnConsoleMessage) then FOnConsoleMessage(Self, browser, aMessage, source, line, Result); -end; - -function TChromium.doOnContextMenuCommand(const browser : ICefBrowser; - const frame : ICefFrame; - const params : ICefContextMenuParams; - commandId : Integer; - eventFlags : TCefEventFlags): Boolean; -begin - Result := False; - - if Assigned(FOnContextMenuCommand) then - FOnContextMenuCommand(Self, browser, frame, params, commandId, eventFlags, Result); -end; - -procedure TChromium.doOnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); -begin - if Assigned(FOnContextMenuDismissed) then FOnContextMenuDismissed(Self, browser, frame); -end; - -procedure TChromium.doOnCursorChange(const browser : ICefBrowser; - cursor : TCefCursorHandle; - cursorType : TCefCursorType; - const customCursorInfo : PCefCursorInfo); -begin - if assigned(FOnCursorChange) then FOnCursorChange(self, browser, cursor, cursorType, customCursorInfo); -end; - -procedure TChromium.doOnDialogClosed(const browser: ICefBrowser); -begin - if Assigned(FOnDialogClosed) then FOnDialogClosed(Self, browser); -end; - -procedure TChromium.doOnDownloadUpdated(const browser : ICefBrowser; - const downloadItem : ICefDownloadItem; - const callback : ICefDownloadItemCallback); -begin - if Assigned(FOnDownloadUpdated) then FOnDownloadUpdated(Self, browser, downloadItem, callback); -end; - -function TChromium.doOnDragEnter(const browser : ICefBrowser; - const dragData : ICefDragData; - mask : TCefDragOperations): Boolean; -begin - Result := False; - - if Assigned(FOnDragEnter) then FOnDragEnter(Self, browser, dragData, mask, Result); -end; - -procedure TChromium.doOnDraggableRegionsChanged(const browser : ICefBrowser; - regionsCount : NativeUInt; - regions : PCefDraggableRegionArray); -begin - if Assigned(FOnDraggableRegionsChanged) then FOnDraggableRegionsChanged(Self, browser, regionsCount, regions); -end; - -procedure TChromium.doOnFaviconUrlChange(const browser: ICefBrowser; iconUrls: TStrings); -begin - if Assigned(FOnFavIconUrlChange) then FOnFavIconUrlChange(Self, browser, iconUrls); -end; - -function TChromium.doOnFileDialog(const browser : ICefBrowser; - mode : TCefFileDialogMode; - const title : ustring; - const defaultFilePath : ustring; - acceptFilters : TStrings; - selectedAcceptFilter : Integer; - const callback : ICefFileDialogCallback): Boolean; -begin - Result := False; - - if Assigned(FOnFileDialog) then - FOnFileDialog(Self, browser, mode, title, defaultFilePath, acceptFilters, - selectedAcceptFilter, callback, Result); -end; - -procedure TChromium.doOnFindResult(const browser : ICefBrowser; - identifier : integer; - count : Integer; - const selectionRect : PCefRect; - activeMatchOrdinal : Integer; - finalUpdate : Boolean); -begin - if Assigned(FOnFindResult) then - FOnFindResult(Self, browser, identifier, count, selectionRect, activeMatchOrdinal, finalUpdate); -end; - -procedure TChromium.doOnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean); -begin - if Assigned(FOnFullScreenModeChange) then FOnFullScreenModeChange(Self, browser, fullscreen); -end; - -function TChromium.doOnGetAuthCredentials(const browser : ICefBrowser; - const frame : ICefFrame; - isProxy : Boolean; - const host : ustring; - port : Integer; - const realm : ustring; - const scheme : ustring; - const callback : ICefAuthCallback): Boolean; -begin - Result := False; - - if isProxy then - begin - if (FProxyType = CEF_PROXYTYPE_FIXED_SERVERS) and (callback <> nil) then - begin - Result := True; - callback.cont(FProxyUsername, FProxyPassword); - end; - end - else - if (frame <> nil) and frame.IsMain and Assigned(FOnGetAuthCredentials) then - FOnGetAuthCredentials(Self, browser, frame, isProxy, host, port, realm, scheme, callback, Result); -end; - -function TChromium.doOnGetResourceHandler(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest): ICefResourceHandler; -begin - Result := nil; - - if Assigned(FOnGetResourceHandler) then - FOnGetResourceHandler(Self, browser, frame, request, Result); -end; - -function TChromium.doOnGetRootScreenRect(const browser: ICefBrowser; rect: PCefRect): Boolean; -begin - Result := False; - - if Assigned(FOnGetRootScreenRect) then FOnGetRootScreenRect(Self, browser, rect, Result); -end; - -function TChromium.doOnGetScreenInfo(const browser: ICefBrowser; screenInfo: PCefScreenInfo): Boolean; -begin - Result := False; - - if Assigned(FOnGetScreenInfo) then FOnGetScreenInfo(Self, browser, screenInfo, Result); -end; - -function TChromium.doOnGetScreenPoint(const browser: ICefBrowser; viewX, viewY: Integer; screenX, screenY: PInteger): Boolean; -begin - Result := False; - - if Assigned(FOnGetScreenPoint) then FOnGetScreenPoint(Self, browser, viewX, viewY, screenX, screenY, Result); -end; - -function TChromium.doOnGetViewRect(const browser: ICefBrowser; rect: PCefRect): Boolean; -begin - Result := False; - - if Assigned(FOnGetViewRect) then FOnGetViewRect(Self, browser, rect, Result); -end; - -procedure TChromium.doOnGotFocus(const browser: ICefBrowser); -begin - if Assigned(FOnGotFocus) then FOnGotFocus(Self, browser) -end; - -function TChromium.doOnJsdialog(const browser : ICefBrowser; - const originUrl : ustring; - dialogType : TCefJsDialogType; - const messageText : ustring; - const defaultPromptText : ustring; - const callback : ICefJsDialogCallback; - out suppressMessage : Boolean): Boolean; -begin - Result := False; - - if not(Initialized) then - suppressMessage := True - else - if Assigned(FOnJsdialog) then - FOnJsdialog(Self, browser, originUrl, dialogType, messageText, - defaultPromptText, callback, suppressMessage, Result); -end; - -function TChromium.doOnKeyEvent(const browser : ICefBrowser; - const event : PCefKeyEvent; - osEvent : TCefEventHandle): Boolean; -begin - Result := False; - - if Assigned(FOnKeyEvent) then FOnKeyEvent(Self, browser, event, osEvent, Result); -end; - -procedure TChromium.doOnLoadEnd(const browser : ICefBrowser; - const frame : ICefFrame; - httpStatusCode : Integer); -begin - if Assigned(FOnLoadEnd) then FOnLoadEnd(Self, browser, frame, httpStatusCode); -end; - -procedure TChromium.doOnLoadError(const browser : ICefBrowser; - const frame : ICefFrame; - errorCode : Integer; - const errorText : ustring; - const failedUrl : ustring); -begin - if Assigned(FOnLoadError) then FOnLoadError(Self, browser, frame, errorCode, errorText, failedUrl); -end; - -procedure TChromium.doOnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); -begin - if Assigned(FOnLoadingStateChange) then FOnLoadingStateChange(Self, browser, isLoading, canGoBack, canGoForward); -end; - -procedure TChromium.doOnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); -begin - if Assigned(FOnLoadStart) then FOnLoadStart(Self, browser, frame, transitionType); -end; - -function TChromium.doOnOpenUrlFromTab(const browser : ICefBrowser; - const frame : ICefFrame; - const targetUrl : ustring; - targetDisposition : TCefWindowOpenDisposition; - userGesture : Boolean): Boolean; -begin - Result := False; - - if Assigned(FOnOpenUrlFromTab) then - FOnOpenUrlFromTab(Self, browser, frame, targetUrl, targetDisposition, userGesture, Result); -end; - -procedure TChromium.doOnPaint(const browser : ICefBrowser; - kind : TCefPaintElementType; - dirtyRectsCount : NativeUInt; - const dirtyRects : PCefRectArray; - const buffer : Pointer; - width : Integer; - height : Integer); -begin - if Assigned(FOnPaint) then FOnPaint(Self, browser, kind, dirtyRectsCount, dirtyRects, buffer, width, height); -end; - -function TChromium.doOnSelectClientCertificate(const browser : ICefBrowser; - isProxy : boolean; - const host : ustring; - port : integer; - certificatesCount : NativeUInt; - const certificates : TCefX509CertificateArray; - const callback : ICefSelectClientCertificateCallback): boolean; -begin - Result := False; - - if assigned(FOnSelectClientCertificate) then - FOnSelectClientCertificate(self, browser, isProxy, host, port, certificatesCount, certificates, callback, Result); -end; - -procedure TChromium.doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); -begin - if Assigned(FOnPluginCrashed) then FOnPluginCrashed(Self, browser, pluginPath); -end; - -procedure TChromium.doOnPopupShow(const browser: ICefBrowser; show: Boolean); -begin - if assigned(FOnPopupShow) then FOnPopupShow(self, browser, show); -end; - -procedure TChromium.doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); -begin - if assigned(FOnPopupSize) then FOnPopupSize(self, browser, rect); -end; - -function TChromium.doOnPreKeyEvent(const browser : ICefBrowser; - const event : PCefKeyEvent; - osEvent : TCefEventHandle; - out isKeyboardShortcut : Boolean): Boolean; -begin - Result := False; - - if Assigned(FOnPreKeyEvent) then FOnPreKeyEvent(Self, browser, event, osEvent, isKeyboardShortcut, Result); -end; - -function TChromium.doOnProcessMessageReceived(const browser : ICefBrowser; - sourceProcess : TCefProcessId; - const aMessage : ICefProcessMessage): Boolean; -begin - Result := False; - - if Assigned(FOnProcessMessageReceived) then - FOnProcessMessageReceived(Self, browser, sourceProcess, aMessage, Result); -end; - -procedure TChromium.doOnProtocolExecution(const browser : ICefBrowser; - const url : ustring; - out allowOsExecution : Boolean); -begin - if Assigned(FOnProtocolExecution) then FOnProtocolExecution(Self, browser, url, allowOsExecution); -end; - -function TChromium.doOnQuotaRequest(const browser : ICefBrowser; - const originUrl : ustring; - newSize : Int64; - const callback : ICefRequestCallback): Boolean; -begin - Result := False; - - if Assigned(FOnQuotaRequest) then FOnQuotaRequest(Self, browser, originUrl, newSize, callback, Result); -end; - -procedure TChromium.doOnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); -begin - if Assigned(FOnRenderProcessTerminated) then FOnRenderProcessTerminated(Self, browser, status); -end; - -procedure TChromium.doOnRenderViewReady(const browser: ICefBrowser); -begin - if Assigned(FOnRenderViewReady) then FOnRenderViewReady(Self, browser); -end; - -function TChromium.doOnRequestGeolocationPermission(const browser : ICefBrowser; - const requestingUrl : ustring; - requestId : Integer; - const callback : ICefGeolocationCallback): Boolean; -begin - Result := False; - - if Assigned(FOnRequestGeolocationPermission) then - FOnRequestGeolocationPermission(Self, browser, requestingUrl, requestId, callback, Result); -end; - -procedure TChromium.doOnResetDialogState(const browser: ICefBrowser); -begin - if Assigned(FOnResetDialogState) then FOnResetDialogState(Self, browser); -end; - -procedure TChromium.doOnResourceRedirect(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest; - const response : ICefResponse; - var newUrl : ustring); -begin - if Assigned(FOnResourceRedirect) then FOnResourceRedirect(Self, browser, frame, request, response, newUrl); -end; - -function TChromium.doOnResourceResponse(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest; - const response : ICefResponse): Boolean; -begin - Result := False; - - if Assigned(FOnResourceResponse) then FOnResourceResponse(Self, browser, frame, request, response, Result); -end; -function TChromium.doOnGetResourceResponseFilter(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest; - const response : ICefResponse) : ICefResponseFilter; -begin - Result := nil; - - if Assigned(FOnGetResourceResponseFilter) then - FOnGetResourceResponseFilter(self, browser, frame, request, response, Result); -end; - -procedure TChromium.doOnResourceLoadComplete(const browser : ICefBrowser; - const frame : ICefFrame; - const request : ICefRequest; - const response : ICefResponse; - status : TCefUrlRequestStatus; - receivedContentLength : Int64); -begin - if Assigned(FOnResourceLoadComplete) then - FOnResourceLoadComplete(self, browser, frame, request, response, status, receivedContentLength); -end; - -procedure TChromium.doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); -begin - if Assigned(FOnScrollOffsetChanged) then FOnScrollOffsetChanged(Self, browser, x, y); -end; - -procedure TChromium.doOnIMECompositionRangeChanged(const browser : ICefBrowser; - const selected_range : PCefRange; - character_boundsCount : NativeUInt; - const character_bounds : PCefRect); -begin - if assigned(FOnIMECompositionRangeChanged) then - FOnIMECompositionRangeChanged(self, browser, selected_range, character_boundsCount, character_bounds); -end; - -function TChromium.doOnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean; -begin - Result := False; - - if Assigned(FOnSetFocus) then FOnSetFocus(Self, browser, source, Result); -end; - -function TChromium.doOnStartDragging(const browser : ICefBrowser; - const dragData : ICefDragData; - allowedOps : TCefDragOperations; - x : integer; - y : Integer): Boolean; -begin - Result := False; - - if Assigned(FOnStartDragging) then FOnStartDragging(Self, browser, dragData, allowedOps, x, y, Result); -end; - -procedure TChromium.doOnStatusMessage(const browser: ICefBrowser; const value: ustring); -begin - if Assigned(FOnStatusMessage) then FOnStatusMessage(Self, browser, value); -end; - -procedure TChromium.doOnTakeFocus(const browser: ICefBrowser; next: Boolean); -begin - if Assigned(FOnTakeFocus) then FOnTakeFocus(Self, browser, next); -end; - -procedure TChromium.doOnTitleChange(const browser: ICefBrowser; const title: ustring); -begin - if Assigned(FOnTitleChange) then FOnTitleChange(Self, browser, title); -end; - -function TChromium.doOnTooltip(const browser: ICefBrowser; var text: ustring): Boolean; -begin - Result := False; - - if Assigned(FOnTooltip) then FOnTooltip(Self, browser, text, Result); -end; - -procedure TChromium.doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); -begin - if Assigned(FOnUpdateDragCursor) then FOnUpdateDragCursor(Self, browser, operation); -end; - -function TChromium.GetParentForm : TCustomForm; -var - TempComp : TComponent; -begin - Result := nil; - TempComp := Owner; - - while (TempComp <> nil) do - if (TempComp is TCustomForm) then - begin - Result := TCustomForm(TempComp); - exit; - end - else - TempComp := TempComp.owner; -end; - -procedure TChromium.MoveFormTo(const x, y: Integer); -var - TempForm : TCustomForm; - TempRect : TRect; -begin - TempForm := GetParentForm; - - if (TempForm <> nil) then - begin - TempRect.Left := min(max(x, max(screen.DesktopLeft, 0)), screen.DesktopWidth - TempForm.Width); - TempRect.Top := min(max(y, max(screen.DesktopTop, 0)), screen.DesktopHeight - TempForm.Height); - TempRect.Width := TempForm.Width; - TempRect.Height := TempForm.Height; - - TempForm.SetBounds(TempRect.Left, TempRect.Top, TempRect.Width, TempRect.Height); - end; -end; - -procedure TChromium.MoveFormBy(const x, y: Integer); -var - TempForm : TCustomForm; - TempRect : TRect; -begin - TempForm := GetParentForm; - - if (TempForm <> nil) then - begin - TempRect.Left := min(max(TempForm.Left + x, max(screen.DesktopLeft, 0)), screen.DesktopWidth - TempForm.Width); - TempRect.Top := min(max(TempForm.Top + y, max(screen.DesktopTop, 0)), screen.DesktopHeight - TempForm.Height); - TempRect.Width := TempForm.Width; - TempRect.Height := TempForm.Height; - - TempForm.SetBounds(TempRect.Left, TempRect.Top, TempRect.Width, TempRect.Height); - end; -end; - -procedure TChromium.ResizeFormWidthTo(const x : Integer); -var - TempForm : TCustomForm; - TempX, TempDeltaX : integer; -begin - TempForm := GetParentForm; - - if (TempForm <> nil) then - begin - TempX := max(x, 100); - TempDeltaX := TempForm.Width - TempForm.ClientWidth; - TempForm.Width := TempX + TempDeltaX; - end; -end; - -procedure TChromium.ResizeFormHeightTo(const y : Integer); -var - TempForm : TCustomForm; - TempY, TempDeltaY : integer; -begin - TempForm := GetParentForm; - - if (TempForm <> nil) then - begin - TempY := max(y, 100); - TempDeltaY := TempForm.Height - TempForm.ClientHeight; - TempForm.Height := TempY + TempDeltaY; - end; -end; - -procedure TChromium.SetFormLeftTo(const x : Integer); -var - TempForm : TCustomForm; -begin - TempForm := GetParentForm; - - if (TempForm <> nil) then - TempForm.Left := min(max(x, max(screen.DesktopLeft, 0)), screen.DesktopWidth - TempForm.Width); -end; - -procedure TChromium.SetFormTopTo(const y : Integer); -var - TempForm : TCustomForm; -begin - TempForm := GetParentForm; - - if (TempForm <> nil) then - TempForm.Top := min(max(y, max(screen.DesktopTop, 0)), screen.DesktopHeight - TempForm.Height); -end; - -procedure TChromium.WasResized; -begin - if Initialized then FBrowser.Host.WasResized; -end; - -procedure TChromium.WasHidden(hidden: Boolean); -begin - if Initialized then FBrowser.Host.WasHidden(hidden); -end; - -procedure TChromium.NotifyScreenInfoChanged; -begin - if Initialized then FBrowser.Host.NotifyScreenInfoChanged; -end; - -procedure TChromium.Invalidate(kind: TCefPaintElementType); -begin - if Initialized then FBrowser.Host.Invalidate(kind); -end; - -procedure TChromium.SendKeyEvent(const event: PCefKeyEvent); -begin - if Initialized then FBrowser.Host.SendKeyEvent(event); -end; - -procedure TChromium.SendMouseClickEvent(const event : PCefMouseEvent; - kind : TCefMouseButtonType; - mouseUp : Boolean; - clickCount : Integer); -begin - if Initialized then FBrowser.Host.SendMouseClickEvent(event, kind, mouseUp, clickCount); -end; - -procedure TChromium.SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); -begin - if Initialized then FBrowser.Host.SendMouseMoveEvent(event, mouseLeave); -end; - -procedure TChromium.SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); -begin - if Initialized then FBrowser.Host.SendMouseWheelEvent(event, deltaX, deltaY); -end; - -procedure TChromium.SendFocusEvent(setFocus: Boolean); -begin - if Initialized then FBrowser.Host.SendFocusEvent(setFocus); -end; - -procedure TChromium.SendCaptureLostEvent; -begin - if Initialized then FBrowser.Host.SendCaptureLostEvent; -end; - -procedure TChromium.SetFocus(focus: Boolean); -begin - if Initialized then FBrowser.Host.SetFocus(focus); -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFChromium; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + WinApi.Windows, WinApi.Messages, System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms, + uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFMiscFunctions, uCEFClient, + uCEFPDFPrintCallback, uCEFStringVisitor, uCEFConstants, uCEFTask, + uCEFDeleteCookiesCallback, uCEFDomVisitor, uCEFChromiumEvents, + uCEFChromiumOptions, uCEFChromiumFontOptions, uCEFPDFPrintOptions; + +type + TChromium = class(TComponent, IChromiumEvents) + protected + FCompHandle : HWND; + FVisitor : ICefStringVisitor; + FPDFPrintcb : ICefPdfPrintCallback; + FCookiDeletercb : ICefDeleteCookiesCallback; + FDOMVisitor : ICefDomVisitor; + FClientHandler : TVCLClientHandler; + FHandler : ICefClient; + FBrowser : ICefBrowser; + FBrowserId : Integer; + FDefaultUrl : ustring; + FOptions : TChromiumOptions; + FFontOptions : TChromiumFontOptions; + FPDFPrintOptions : TPDFPrintOptions; + FDefaultEncoding : ustring; + FPrefs : TStringList; + FProxyType : integer; + FProxyServer : string; + FProxyPort : integer; + FProxyUsername : string; + FProxyPassword : string; + FProxyScriptURL : string; + FProxyByPassList : string; + FUpdatePreferences : boolean; + FGetPreferences : boolean; + FCustomHeaderName : string; + FCustomHeaderValue : string; + FAddCustomHeader : boolean; + FDoNotTrack : boolean; + FSendReferrer : boolean; + FHyperlinkAuditing : boolean; + FCookiePrefs : integer; + FImagesPrefs : integer; + FCMStoragePath : ustring; + FZoomStep : byte; + FWindowName : string; + FIsOSR : boolean; + FInitialized : boolean; + FClosing : boolean; + + // ICefClient + FOnProcessMessageReceived : TOnProcessMessageReceived; + + // ICefLoadHandler + FOnLoadStart : TOnLoadStart; + FOnLoadEnd : TOnLoadEnd; + FOnLoadError : TOnLoadError; + FOnLoadingStateChange : TOnLoadingStateChange; + + // ICefFocusHandler + FOnTakeFocus : TOnTakeFocus; + FOnSetFocus : TOnSetFocus; + FOnGotFocus : TOnGotFocus; + + // ICefContextMenuHandler + FOnBeforeContextMenu : TOnBeforeContextMenu; + FOnContextMenuCommand : TOnContextMenuCommand; + FOnContextMenuDismissed : TOnContextMenuDismissed; + + // ICefKeyboardHandler + FOnPreKeyEvent : TOnPreKeyEvent; + FOnKeyEvent : TOnKeyEvent; + + // ICefDisplayHandler + FOnAddressChange : TOnAddressChange; + FOnTitleChange : TOnTitleChange; + FOnFavIconUrlChange : TOnFavIconUrlChange; + FOnFullScreenModeChange : TOnFullScreenModeChange; + FOnTooltip : TOnTooltip; + FOnStatusMessage : TOnStatusMessage; + FOnConsoleMessage : TOnConsoleMessage; + + // ICefDownloadHandler + FOnBeforeDownload : TOnBeforeDownload; + FOnDownloadUpdated : TOnDownloadUpdated; + + // ICefGeolocationHandler + FOnRequestGeolocationPermission : TOnRequestGeolocationPermission; + FOnCancelGeolocationPermission : TOnCancelGeolocationPermission; + + // ICefJsDialogHandler + FOnJsdialog : TOnJsdialog; + FOnBeforeUnloadDialog : TOnBeforeUnloadDialog; + FOnResetDialogState : TOnResetDialogState; + FOnDialogClosed : TOnDialogClosed; + + // ICefLifeSpanHandler + FOnBeforePopup : TOnBeforePopup; + FOnAfterCreated : TOnAfterCreated; + FOnBeforeClose : TOnBeforeClose; + FOnClose : TOnClose; + + // ICefRequestHandler + FOnBeforeBrowse : TOnBeforeBrowse; + FOnOpenUrlFromTab : TOnOpenUrlFromTab; + FOnBeforeResourceLoad : TOnBeforeResourceLoad; + FOnGetResourceHandler : TOnGetResourceHandler; + FOnResourceRedirect : TOnResourceRedirect; + FOnResourceResponse : TOnResourceResponse; + FOnGetResourceResponseFilter : TOnGetResourceResponseFilter; + FOnResourceLoadComplete : TOnResourceLoadComplete; + FOnGetAuthCredentials : TOnGetAuthCredentials; + FOnQuotaRequest : TOnQuotaRequest; + FOnProtocolExecution : TOnProtocolExecution; + FOnCertificateError : TOnCertificateError; + FOnSelectClientCertificate : TOnSelectClientCertificate; + FOnPluginCrashed : TOnPluginCrashed; + FOnRenderViewReady : TOnRenderViewReady; + FOnRenderProcessTerminated : TOnRenderProcessTerminated; + + // ICefDialogHandler + FOnFileDialog : TOnFileDialog; + + // ICefRenderHandler + FOnGetRootScreenRect : TOnGetRootScreenRect; + FOnGetViewRect : TOnGetViewRect; + FOnGetScreenPoint : TOnGetScreenPoint; + FOnGetScreenInfo : TOnGetScreenInfo; + FOnPopupShow : TOnPopupShow; + FOnPopupSize : TOnPopupSize; + FOnPaint : TOnPaint; + FOnCursorChange : TOnCursorChange; + FOnStartDragging : TOnStartDragging; + FOnUpdateDragCursor : TOnUpdateDragCursor; + FOnScrollOffsetChanged : TOnScrollOffsetChanged; + FOnIMECompositionRangeChanged : TOnIMECompositionRangeChanged; + + // ICefDragHandler + FOnDragEnter : TOnDragEnter; + FOnDraggableRegionsChanged : TOnDraggableRegionsChanged; + + // ICefFindHandler + FOnFindResult : TOnFindResult; + + // Custom + FOnTextResultAvailable : TOnTextResultAvailableEvent; + FOnPdfPrintFinished : TOnPdfPrintFinishedEvent; + FOnPrefsAvailable : TOnTextResultAvailableEvent; + FOnCookiesDeleted : TOnCookiesDeletedEvent; + FOnDocumentAvailable : TOnDocumentAvailableEvent; + + function GetIsLoading : boolean; + function GetMultithreadApp : boolean; + function GetHasDocument : boolean; + function GetHasView : boolean; + function GetHasDevTools : boolean; + function GetCanGoBack : boolean; + function GetCanGoForward : boolean; + function GetDocumentURL : string; + function GetZoomLevel : double; + function GetZoomPct : double; + function GetIsPopUp : boolean; + function GetWindowHandle : THandle; + function GetWindowlessFrameRate : integer; + function GetFrameIsFocused : boolean; + function GetInitialized : boolean; + function GetVisibleNavigationEntry : ICefNavigationEntry; + function GetHasValidMainFrame : boolean; + + procedure SetDoNotTrack(aValue : boolean); + procedure SetSendReferrer(aValue : boolean); + procedure SetHyperlinkAuditing(aValue : boolean); + procedure SetCookiePrefs(aValue : integer); + procedure SetImagesPrefs(aValue : integer); + procedure SetProxyType(aValue : integer); + procedure SetProxyServer(const aValue : string); + procedure SetProxyPort(aValue : integer); + procedure SetProxyUsername(const aValue : string); + procedure SetProxyPassword(const aValue : string); + procedure SetProxyScriptURL(const aValue : string); + procedure SetProxyByPassList(const aValue : string); + procedure SetCustomHeaderName(const aValue : string); + procedure SetCustomHeaderValue(const aValue : string); + procedure SetCMStoragePath(const aValue : ustring); + procedure SetZoomLevel(const aValue : double); + procedure SetZoomPct(const aValue : double); + procedure SetZoomStep(aValue : byte); + procedure SetWindowlessFrameRate(aValue : integer); + + + function CreateBrowserHost(aWindowInfo : PCefWindowInfo; const aClient : ICefClient; const aURL : ustring; const aSettings : PCefBrowserSettings; const aContext : ICefRequestContext): Boolean; + function CreateBrowserHostSync(aWindowInfo : PCefWindowInfo; const aClient : ICefClient; const aURL : ustring; const aSettings : PCefBrowserSettings; const aContext : ICefRequestContext): ICefBrowser; + + procedure InitializeEvents; + procedure InitializeSettings(var aSettings : TCefBrowserSettings); + + procedure GetSettings(var aSettings : TCefBrowserSettings); + procedure GetPrintPDFSettings(var aSettings : TCefPdfPrintSettings; const aTitle, aURL : string); + + procedure UpdateAllPreferences; + function UpdateProxyPrefs : boolean; + function UpdatePreference(const aName : string; aValue : boolean) : boolean; overload; + function UpdatePreference(const aName : string; aValue : integer) : boolean; overload; + function UpdatePreference(const aName : string; const aValue : double) : boolean; overload; + function UpdatePreference(const aName, aValue : string) : boolean; overload; + + procedure HandleDictionary(const aDict : ICefDictionaryValue; var aResultSL : TStringList; const aRoot : string); + procedure HandleNull(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleBool(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleInteger(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleDouble(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleString(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleBinary(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleList(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + procedure HandleInvalid(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); + + procedure PrefsAvailableMsg(var aMessage : TMessage); + function GetParentForm : TCustomForm; + procedure ApplyZoomStep; + function GetAllPreferences : boolean; + function SendCompMessage(aMsg : cardinal; wParam : cardinal = 0; lParam : integer = 0) : boolean; + procedure WndProc(var aMessage: TMessage); + + + // ICefClient + function doOnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const aMessage: ICefProcessMessage): Boolean; virtual; + + // ICefLoadHandler + procedure doOnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); virtual; + procedure doOnLoadEnd(const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer); virtual; + procedure doOnLoadError(const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring); virtual; + procedure doOnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); virtual; + + // ICefFocusHandler + procedure doOnTakeFocus(const browser: ICefBrowser; next: Boolean); virtual; + function doOnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean; virtual; + procedure doOnGotFocus(const browser: ICefBrowser); virtual; + + // ICefContextMenuHandler + procedure doOnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); virtual; + function doOnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; virtual; + procedure doOnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); virtual; + + // ICefKeyboardHandler + function doOnPreKeyEvent(const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle; out isKeyboardShortcut: Boolean): Boolean; virtual; + function doOnKeyEvent(const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle): Boolean; virtual; + + // ICefDisplayHandler + procedure doOnAddressChange(const browser: ICefBrowser; const frame: ICefFrame; const url: ustring); virtual; + procedure doOnTitleChange(const browser: ICefBrowser; const title: ustring); virtual; + procedure doOnFaviconUrlChange(const browser: ICefBrowser; iconUrls: TStrings); virtual; + procedure doOnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean); virtual; + function doOnTooltip(const browser: ICefBrowser; var text: ustring): Boolean; virtual; + procedure doOnStatusMessage(const browser: ICefBrowser; const value: ustring); virtual; + function doOnConsoleMessage(const browser: ICefBrowser; const aMessage, source: ustring; line: Integer): Boolean; virtual; + + // ICefDownloadHandler + procedure doOnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback); virtual; + procedure doOnDownloadUpdated(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback); virtual; + + // ICefGeolocationHandler + function doOnRequestGeolocationPermission(const browser: ICefBrowser; const requestingUrl: ustring; requestId: Integer; const callback: ICefGeolocationCallback): Boolean; virtual; + procedure doOnCancelGeolocationPermission(const browser: ICefBrowser; requestId: Integer); virtual; + + // ICefJsDialogHandler + function doOnJsdialog(const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean): Boolean; virtual; + function doOnBeforeUnloadDialog(const browser: ICefBrowser; const messageText: ustring; isReload: Boolean; const callback: ICefJsDialogCallback): Boolean; virtual; + procedure doOnResetDialogState(const browser: ICefBrowser); virtual; + procedure doOnDialogClosed(const browser: ICefBrowser); virtual; + + // ICefLifeSpanHandler + function doOnBeforePopup(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; var popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var noJavascriptAccess: Boolean): Boolean; virtual; + procedure doOnAfterCreated(const browser: ICefBrowser); virtual; + procedure doOnBeforeClose(const browser: ICefBrowser); virtual; + function doOnClose(const browser: ICefBrowser): Boolean; virtual; + + // ICefRequestHandler + function doOnBeforeBrowse(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; isRedirect: Boolean): Boolean; virtual; + function doOnOpenUrlFromTab(const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean): Boolean; virtual; + function doOnBeforeResourceLoad(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const callback: ICefRequestCallback): TCefReturnValue; + function doOnGetResourceHandler(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest): ICefResourceHandler; virtual; + procedure doOnResourceRedirect(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring); virtual; + function doOnResourceResponse(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse): Boolean; virtual; + function doOnGetResourceResponseFilter(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse): ICefResponseFilter; + procedure doOnResourceLoadComplete(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; status: TCefUrlRequestStatus; receivedContentLength: Int64); virtual; + function doOnGetAuthCredentials(const browser: ICefBrowser; const frame: ICefFrame; isProxy: Boolean; const host: ustring; port: Integer; const realm, scheme: ustring; const callback: ICefAuthCallback): Boolean; virtual; + function doOnQuotaRequest(const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefRequestCallback): Boolean; virtual; + procedure doOnProtocolExecution(const browser: ICefBrowser; const url: ustring; out allowOsExecution: Boolean); virtual; + function doOnCertificateError(const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefRequestCallback): Boolean; virtual; + function doOnSelectClientCertificate(const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback): boolean; + procedure doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); virtual; + procedure doOnRenderViewReady(const browser: ICefBrowser); virtual; + procedure doOnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); virtual; + + // ICefDialogHandler + function doOnFileDialog(const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback): Boolean; + + // ICefRenderHandler + function doOnGetRootScreenRect(const browser: ICefBrowser; rect: PCefRect): Boolean; + function doOnGetViewRect(const browser: ICefBrowser; rect: PCefRect): Boolean; + function doOnGetScreenPoint(const browser: ICefBrowser; viewX, viewY: Integer; screenX, screenY: PInteger): Boolean; + function doOnGetScreenInfo(const browser: ICefBrowser; screenInfo: PCefScreenInfo): Boolean; + procedure doOnPopupShow(const browser: ICefBrowser; show: Boolean); + procedure doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); + procedure doOnPaint(const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer); + procedure doOnCursorChange(const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo); + function doOnStartDragging(const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer): Boolean; + procedure doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); + procedure doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); + procedure doOnIMECompositionRangeChanged(const browser: ICefBrowser; const selected_range: PCefRange; character_boundsCount: NativeUInt; const character_bounds: PCefRect); + + // ICefDragHandler + function doOnDragEnter(const browser: ICefBrowser; const dragData: ICefDragData; mask: TCefDragOperations): Boolean; + procedure doOnDraggableRegionsChanged(const browser: ICefBrowser; regionsCount: NativeUInt; regions: PCefDraggableRegionArray); + + // ICefFindHandler + procedure doOnFindResult(const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean); + + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure AfterConstruction; override; + function CreateClientHandler(aIsOSR : boolean) : boolean; + function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : string = '') : boolean; + procedure CloseBrowser(aForceClose : boolean); + + procedure DOMVisitorVisit(const document: ICefDomDocument); + procedure CookiesDeleted(numDeleted : integer); + procedure GetHTML; + procedure VisitDOM; + procedure PdfPrintFinished(aResultOK : boolean); + procedure TextResultAvailable(const aText : string); + + procedure LoadURL(const aURL : ustring); + procedure LoadString(const aString : ustring; const aURL : ustring = ''); + procedure GoBack; + procedure GoForward; + procedure Reload; + procedure ReloadIgnoreCache; + procedure StopLoad; + procedure StartDownload(const aURL : ustring); + + procedure SimulateMouseWheel(aDeltaX, aDeltaY : integer); + procedure DeleteCookies; + procedure RetrieveDOMDocument; + procedure RetrieveHTML; + + procedure ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl); + procedure CloseDevTools(const aDevTools : TWinControl = nil); + + procedure Find(aIdentifier : integer; const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean); + procedure StopFinding(aClearSelection : Boolean); + + procedure Print; + procedure PrintToPDF(const aFilePath, aTitle, aURL : ustring); + + procedure ClipboardCopy; + procedure ClipboardPaste; + procedure ClipboardCut; + procedure ClipboardUndo; + procedure ClipboardRedo; + procedure ClipboardDel; + procedure SelectAll; + + procedure IncZoomStep; + procedure DecZoomStep; + procedure ResetZoomStep; + + procedure MoveFormTo(const x, y: Integer); + procedure MoveFormBy(const x, y: Integer); + procedure ResizeFormWidthTo(const x : Integer); + procedure ResizeFormHeightTo(const y : Integer); + procedure SetFormLeftTo(const x : Integer); + procedure SetFormTopTo(const y : Integer); + + procedure WasResized; + procedure WasHidden(hidden: Boolean); + procedure NotifyScreenInfoChanged; + procedure Invalidate(kind: TCefPaintElementType); + procedure SendKeyEvent(const event: PCefKeyEvent); + procedure SendMouseClickEvent(const event: PCefMouseEvent; kind: TCefMouseButtonType; mouseUp: Boolean; clickCount: Integer); + procedure SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); + procedure SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); + procedure SendFocusEvent(setFocus: Boolean); + procedure SendCaptureLostEvent; + procedure SetFocus(focus: Boolean); + + + property DefaultUrl : ustring read FDefaultUrl write FDefaultUrl; + property Options : TChromiumOptions read FOptions write FOptions; + property FontOptions : TChromiumFontOptions read FFontOptions write FFontOptions; + property PDFPrintOptions : TPDFPrintOptions read FPDFPrintOptions write FPDFPrintOptions; + property DefaultEncoding : ustring read FDefaultEncoding write FDefaultEncoding; + property BrowserId : integer read FBrowserId; + property Browser : ICefBrowser read FBrowser; + property CefClient : ICefClient read FHandler; + property VisibleNavigationEntry : ICefNavigationEntry read GetVisibleNavigationEntry; + property MultithreadApp : boolean read GetMultithreadApp; + property IsLoading : boolean read GetIsLoading; + property HasDocument : boolean read GetHasDocument; + property HasView : boolean read GetHasView; + property HasDevTools : boolean read GetHasDevTools; + property CanGoBack : boolean read GetCanGoBack; + property CanGoForward : boolean read GetCanGoForward; + property IsPopUp : boolean read GetIsPopUp; + property WindowHandle : THandle read GetWindowHandle; + property FrameIsFocused : boolean read GetFrameIsFocused; + property Initialized : boolean read GetInitialized; + property GetPreferences : boolean read FGetPreferences write FGetPreferences; + property CookiePrefs : integer read FCookiePrefs write SetCookiePrefs; + property ImagesPrefs : integer read FImagesPrefs write SetImagesPrefs; + property CMStoragePath : ustring read FCMStoragePath write SetCMStoragePath; + property DocumentURL : string read GetDocumentURL; + property WindowName : string read FWindowName write FWindowName; + property ZoomLevel : double read GetZoomLevel write SetZoomLevel; + property ZoomPct : double read GetZoomPct write SetZoomPct; + property ZoomStep : byte read FZoomStep write SetZoomStep; + property WindowlessFrameRate : integer read GetWindowlessFrameRate write SetWindowlessFrameRate; + property CustomHeaderName : string read FCustomHeaderName write SetCustomHeaderName; + property CustomHeaderValue : string read FCustomHeaderValue write SetCustomHeaderValue; + property DoNotTrack : boolean read FDoNotTrack write SetDoNotTrack; + property SendReferrer : boolean read FSendReferrer write SetSendReferrer; + property HyperlinkAuditing : boolean read FHyperlinkAuditing write SetHyperlinkAuditing; + property HasValidMainFrame : boolean read GetHasValidMainFrame; + + property ProxyType : integer read FProxyType write SetProxyType; + property ProxyServer : string read FProxyServer write SetProxyServer; + property ProxyPort : integer read FProxyPort write SetProxyPort; + property ProxyUsername : string read FProxyUsername write SetProxyUsername; + property ProxyPassword : string read FProxyPassword write SetProxyPassword; + property ProxyScriptURL : string read FProxyScriptURL write SetProxyScriptURL; + property ProxyByPassList : string read FProxyByPassList write SetProxyByPassList; + + published + property OnTextResultAvailable : TOnTextResultAvailableEvent read FOnTextResultAvailable write FOnTextResultAvailable; + property OnPdfPrintFinished : TOnPdfPrintFinishedEvent read FOnPdfPrintFinished write FOnPdfPrintFinished; + property OnPrefsAvailable : TOnTextResultAvailableEvent read FOnPrefsAvailable write FOnPrefsAvailable; + property OnCookiesDeleted : TOnCookiesDeletedEvent read FOnCookiesDeleted write FOnCookiesDeleted; + property OnDocumentAvailable : TOnDocumentAvailableEvent read FOnDocumentAvailable write FOnDocumentAvailable; + + // ICefClient + property OnProcessMessageReceived : TOnProcessMessageReceived read FOnProcessMessageReceived write FOnProcessMessageReceived; + + // ICefLoadHandler + property OnLoadStart : TOnLoadStart read FOnLoadStart write FOnLoadStart; + property OnLoadEnd : TOnLoadEnd read FOnLoadEnd write FOnLoadEnd; + property OnLoadError : TOnLoadError read FOnLoadError write FOnLoadError; + property OnLoadingStateChange : TOnLoadingStateChange read FOnLoadingStateChange write FOnLoadingStateChange; + + // ICefFocusHandler + property OnTakeFocus : TOnTakeFocus read FOnTakeFocus write FOnTakeFocus; + property OnSetFocus : TOnSetFocus read FOnSetFocus write FOnSetFocus; + property OnGotFocus : TOnGotFocus read FOnGotFocus write FOnGotFocus; + + // ICefContextMenuHandler + property OnBeforeContextMenu : TOnBeforeContextMenu read FOnBeforeContextMenu write FOnBeforeContextMenu; + property OnContextMenuCommand : TOnContextMenuCommand read FOnContextMenuCommand write FOnContextMenuCommand; + property OnContextMenuDismissed : TOnContextMenuDismissed read FOnContextMenuDismissed write FOnContextMenuDismissed; + + // ICefKeyboardHandler + property OnPreKeyEvent : TOnPreKeyEvent read FOnPreKeyEvent write FOnPreKeyEvent; + property OnKeyEvent : TOnKeyEvent read FOnKeyEvent write FOnKeyEvent; + + // ICefDisplayHandler + property OnAddressChange : TOnAddressChange read FOnAddressChange write FOnAddressChange; + property OnTitleChange : TOnTitleChange read FOnTitleChange write FOnTitleChange; + property OnFavIconUrlChange : TOnFavIconUrlChange read FOnFavIconUrlChange write FOnFavIconUrlChange; + property OnFullScreenModeChange : TOnFullScreenModeChange read FOnFullScreenModeChange write FOnFullScreenModeChange; + property OnTooltip : TOnTooltip read FOnTooltip write FOnTooltip; + property OnStatusMessage : TOnStatusMessage read FOnStatusMessage write FOnStatusMessage; + property OnConsoleMessage : TOnConsoleMessage read FOnConsoleMessage write FOnConsoleMessage; + + // ICefDownloadHandler + property OnBeforeDownload : TOnBeforeDownload read FOnBeforeDownload write FOnBeforeDownload; + property OnDownloadUpdated : TOnDownloadUpdated read FOnDownloadUpdated write FOnDownloadUpdated; + + // ICefGeolocationHandler + property OnRequestGeolocationPermission : TOnRequestGeolocationPermission read FOnRequestGeolocationPermission write FOnRequestGeolocationPermission; + property OnCancelGeolocationPermission : TOnCancelGeolocationPermission read FOnCancelGeolocationPermission write FOnCancelGeolocationPermission; + + // ICefJsDialogHandler + property OnJsdialog : TOnJsdialog read FOnJsdialog write FOnJsdialog; + property OnBeforeUnloadDialog : TOnBeforeUnloadDialog read FOnBeforeUnloadDialog write FOnBeforeUnloadDialog; + property OnResetDialogState : TOnResetDialogState read FOnResetDialogState write FOnResetDialogState; + property OnDialogClosed : TOnDialogClosed read FOnDialogClosed write FOnDialogClosed; + + // ICefLifeSpanHandler + property OnBeforePopup : TOnBeforePopup read FOnBeforePopup write FOnBeforePopup; + property OnAfterCreated : TOnAfterCreated read FOnAfterCreated write FOnAfterCreated; + property OnBeforeClose : TOnBeforeClose read FOnBeforeClose write FOnBeforeClose; + property OnClose : TOnClose read FOnClose write FOnClose; + + // ICefRequestHandler + property OnBeforeBrowse : TOnBeforeBrowse read FOnBeforeBrowse write FOnBeforeBrowse; + property OnOpenUrlFromTab : TOnOpenUrlFromTab read FOnOpenUrlFromTab write FOnOpenUrlFromTab; + property OnBeforeResourceLoad : TOnBeforeResourceLoad read FOnBeforeResourceLoad write FOnBeforeResourceLoad; + property OnGetResourceHandler : TOnGetResourceHandler read FOnGetResourceHandler write FOnGetResourceHandler; + property OnResourceRedirect : TOnResourceRedirect read FOnResourceRedirect write FOnResourceRedirect; + property OnResourceResponse : TOnResourceResponse read FOnResourceResponse write FOnResourceResponse; + property OnGetResourceResponseFilter : TOnGetResourceResponseFilter read FOnGetResourceResponseFilter write FOnGetResourceResponseFilter; + property OnResourceLoadComplete : TOnResourceLoadComplete read FOnResourceLoadComplete write FOnResourceLoadComplete; + property OnGetAuthCredentials : TOnGetAuthCredentials read FOnGetAuthCredentials write FOnGetAuthCredentials; + property OnQuotaRequest : TOnQuotaRequest read FOnQuotaRequest write FOnQuotaRequest; + property OnProtocolExecution : TOnProtocolExecution read FOnProtocolExecution write FOnProtocolExecution; + property OnCertificateError : TOnCertificateError read FOnCertificateError write FOnCertificateError; + property OnSelectClientCertificate : TOnSelectClientCertificate read FOnSelectClientCertificate write FOnSelectClientCertificate; + property OnPluginCrashed : TOnPluginCrashed read FOnPluginCrashed write FOnPluginCrashed; + property OnRenderViewReady : TOnRenderViewReady read FOnRenderViewReady write FOnRenderViewReady; + property OnRenderProcessTerminated : TOnRenderProcessTerminated read FOnRenderProcessTerminated write FOnRenderProcessTerminated; + + // ICefDialogHandler + property OnFileDialog : TOnFileDialog read FOnFileDialog write FOnFileDialog; + + // ICefRenderHandler + property OnGetRootScreenRect : TOnGetRootScreenRect read FOnGetRootScreenRect write FOnGetRootScreenRect; + property OnGetViewRect : TOnGetViewRect read FOnGetViewRect write FOnGetViewRect; + property OnGetScreenPoint : TOnGetScreenPoint read FOnGetScreenPoint write FOnGetScreenPoint; + property OnGetScreenInfo : TOnGetScreenInfo read FOnGetScreenInfo write FOnGetScreenInfo; + property OnPopupShow : TOnPopupShow read FOnPopupShow write FOnPopupShow; + property OnPopupSize : TOnPopupSize read FOnPopupSize write FOnPopupSize; + property OnPaint : TOnPaint read FOnPaint write FOnPaint; + property OnCursorChange : TOnCursorChange read FOnCursorChange write FOnCursorChange; + property OnStartDragging : TOnStartDragging read FOnStartDragging write FOnStartDragging; + property OnUpdateDragCursor : TOnUpdateDragCursor read FOnUpdateDragCursor write FOnUpdateDragCursor; + property OnScrollOffsetChanged : TOnScrollOffsetChanged read FOnScrollOffsetChanged write FOnScrollOffsetChanged; + property OnIMECompositionRangeChanged : TOnIMECompositionRangeChanged read FOnIMECompositionRangeChanged write FOnIMECompositionRangeChanged; + + // ICefDragHandler + property OnDragEnter : TOnDragEnter read FOnDragEnter write FOnDragEnter; + property OnDraggableRegionsChanged : TOnDraggableRegionsChanged read FOnDraggableRegionsChanged write FOnDraggableRegionsChanged; + + // ICefFindHandler + property OnFindResult : TOnFindResult read FOnFindResult write FOnFindResult; + + end; + +implementation + +uses + System.SysUtils, System.Math, + uCEFBrowser, uCEFValue, uCEFDictionaryValue, uCEFStringMultimap, uCEFCookieManager, uCEFFrame, + uCEFApplication; + +constructor TChromium.Create(AOwner: TComponent); +begin + FBrowser := nil; + FBrowserId := 0; + FCompHandle := 0; + FClosing := False; + FInitialized := False; + FIsOSR := False; + FDefaultUrl := 'about:blank'; + FClientHandler := nil; + FHandler := nil; + FOptions := nil; + FFontOptions := nil; + FDefaultEncoding := ''; + FVisitor := nil; + FPDFPrintcb := nil; + FCookiDeletercb := nil; + FDOMVisitor := nil; + FPDFPrintOptions := nil; + FPrefs := nil; + FUpdatePreferences := False; + FGetPreferences := False; + FCustomHeaderName := ''; + FCustomHeaderValue := ''; + FAddCustomHeader := False; + FDoNotTrack := True; + FSendReferrer := True; + FHyperlinkAuditing := False; + FCookiePrefs := CEF_CONTENT_SETTING_ALLOW; + FImagesPrefs := CEF_CONTENT_SETTING_ALLOW; + FZoomStep := ZOOM_STEP_DEF; + FWindowName := ''; + + FProxyType := CEF_PROXYTYPE_DIRECT; + FProxyServer := ''; + FProxyPort := 80; + FProxyUsername := ''; + FProxyPassword := ''; + FProxyScriptURL := ''; + FProxyByPassList := ''; + + InitializeEvents; + + inherited Create(AOwner); +end; + +destructor TChromium.Destroy; +begin + try + try + FBrowser := nil; + FBrowserId := 0; + + if (FCompHandle <> 0) then + begin + DeallocateHWnd(FCompHandle); + FCompHandle := 0; + end; + + if (FHandler <> nil) then + begin + (FHandler as ICefClientHandler).Disconnect; + FHandler := nil; + end; + + if (FClientHandler <> nil) then + begin + FClientHandler.Disconnect; + FClientHandler.ReleaseOtherInstances; + FClientHandler := nil; + end; + + FVisitor := nil; + FPDFPrintcb := nil; + FCookiDeletercb := nil; + FDOMVisitor := nil; + + if (FFontOptions <> nil) then FreeAndNil(FFontOptions); + if (FOptions <> nil) then FreeAndNil(FOptions); + if (FPDFPrintOptions <> nil) then FreeAndNil(FPDFPrintOptions); + if (FPrefs <> nil) then FreeAndNil(FPrefs); + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.Destroy error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; + finally + inherited Destroy; + end; +end; + +procedure TChromium.AfterConstruction; +begin + inherited AfterConstruction; + + try + if not(csDesigning in ComponentState) then + begin + FCompHandle := AllocateHWnd(WndProc); + FOptions := TChromiumOptions.Create; + FFontOptions := TChromiumFontOptions.Create; + FPDFPrintOptions := TPDFPrintOptions.Create; + FPrefs := TStringList.Create; + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.AfterConstruction error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TChromium.CreateClientHandler(aIsOSR : boolean) : boolean; +begin + Result := False; + + try + if (FHandler = nil) then + begin + FIsOSR := aIsOsr; + FClientHandler := TVCLClientHandler.Create(Self, FIsOSR); + FHandler := FClientHandler as ICefClient; + Result := (FHandler <> nil); + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.CreateClientHandler error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TChromium.InitializeEvents; +begin + // ICefClient + FOnProcessMessageReceived := nil; + + // ICefLoadHandler + FOnLoadStart := nil; + FOnLoadEnd := nil; + FOnLoadError := nil; + FOnLoadingStateChange := nil; + + // ICefFocusHandler + FOnTakeFocus := nil; + FOnSetFocus := nil; + FOnGotFocus := nil; + + // ICefContextMenuHandler + FOnBeforeContextMenu := nil; + FOnContextMenuCommand := nil; + FOnContextMenuDismissed := nil; + + // ICefKeyboardHandler + FOnPreKeyEvent := nil; + FOnKeyEvent := nil; + + // ICefDisplayHandler + FOnAddressChange := nil; + FOnTitleChange := nil; + FOnFavIconUrlChange := nil; + FOnFullScreenModeChange := nil; + FOnTooltip := nil; + FOnStatusMessage := nil; + FOnConsoleMessage := nil; + + // ICefDownloadHandler + FOnBeforeDownload := nil; + FOnDownloadUpdated := nil; + + // ICefGeolocationHandler + FOnRequestGeolocationPermission := nil; + FOnCancelGeolocationPermission := nil; + + // ICefJsDialogHandler + FOnJsdialog := nil; + FOnBeforeUnloadDialog := nil; + FOnResetDialogState := nil; + FOnDialogClosed := nil; + + // ICefLifeSpanHandler + FOnBeforePopup := nil; + FOnAfterCreated := nil; + FOnBeforeClose := nil; + FOnClose := nil; + + // ICefRequestHandler + FOnBeforeBrowse := nil; + FOnOpenUrlFromTab := nil; + FOnBeforeResourceLoad := nil; + FOnGetResourceHandler := nil; + FOnResourceRedirect := nil; + FOnResourceResponse := nil; + FOnGetResourceResponseFilter := nil; + FOnResourceLoadComplete := nil; + FOnGetAuthCredentials := nil; + FOnQuotaRequest := nil; + FOnProtocolExecution := nil; + FOnCertificateError := nil; + FOnSelectClientCertificate := nil; + FOnPluginCrashed := nil; + FOnRenderViewReady := nil; + FOnRenderProcessTerminated := nil; + + // ICefDialogHandler + FOnFileDialog := nil; + + // ICefRenderHandler + FOnGetRootScreenRect := nil; + FOnGetViewRect := nil; + FOnGetScreenPoint := nil; + FOnGetScreenInfo := nil; + FOnPopupShow := nil; + FOnPopupSize := nil; + FOnPaint := nil; + FOnCursorChange := nil; + FOnStartDragging := nil; + FOnUpdateDragCursor := nil; + FOnScrollOffsetChanged := nil; + FOnIMECompositionRangeChanged := nil; + + // ICefDragHandler + FOnDragEnter := nil; + FOnDraggableRegionsChanged := nil; + + // ICefFindHandler + FOnFindResult := nil; + + // Custom + FOnTextResultAvailable := nil; + FOnPdfPrintFinished := nil; + FOnPrefsAvailable := nil; + FOnCookiesDeleted := nil; + FOnDocumentAvailable := nil; +end; + +function TChromium.CreateBrowser(const aBrowserParent : TWinControl; const aWindowName : string) : boolean; +var + TempInfo : TCefWindowInfo; + TempSettings : TCefBrowserSettings; +begin + Result := False; + + try + if not(csDesigning in ComponentState) and + (FBrowser = nil) and + (FBrowserId = 0) and + CreateClientHandler(aBrowserParent = nil) then + begin + GetSettings(TempSettings); + + if FIsOSR then + WindowInfoAsWindowless(TempInfo, FCompHandle, False, aWindowName) + else + WindowInfoAsChild(TempInfo, aBrowserParent.Handle, aBrowserParent.ClientRect, aWindowName); + + + if MultithreadApp then + Result := CreateBrowserHost(@TempInfo, FHandler, FDefaultUrl, @TempSettings, nil) + else + begin + FBrowser := CreateBrowserHostSync(@TempInfo, FHandler, FDefaultUrl, @TempSettings, nil); + + if (FBrowser <> nil) then + begin + FBrowserId := FBrowser.Identifier; + Result := True; + end; + end; + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.CreateBrowser error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TChromium.CloseBrowser(aForceClose : boolean); +begin + if Initialized then FBrowser.Host.CloseBrowser(aForceClose); +end; + +function TChromium.CreateBrowserHost(aWindowInfo : PCefWindowInfo; + const aClient : ICefClient; + const aURL : ustring; + const aSettings : PCefBrowserSettings; + const aContext : ICefRequestContext): Boolean; +var + TempURL : TCefString; +begin + TempURL := CefString(aURL); + Result := cef_browser_host_create_browser(aWindowInfo, CefGetData(aClient), @TempURL, aSettings, CefGetData(aContext)) <> 0; +end; + +function TChromium.CreateBrowserHostSync(aWindowInfo : PCefWindowInfo; + const aClient : ICefClient; + const aURL : ustring; + const aSettings : PCefBrowserSettings; + const aContext : ICefRequestContext): ICefBrowser; +var + TempURL : TCefString; + TempBrowser : PCefBrowser; +begin + TempURL := CefString(aURL); + TempBrowser := cef_browser_host_create_browser_sync(aWindowInfo, CefGetData(aClient), @TempURL, aSettings, CefGetData(aContext)); + Result := TCefBrowserRef.UnWrap(TempBrowser); +end; + +procedure TChromium.Find(aIdentifier : integer; const aSearchText : ustring; aForward, aMatchCase, aFindNext : Boolean); +begin + if Initialized then FBrowser.Host.Find(aIdentifier, aSearchText, aForward, aMatchCase, aFindNext); +end; + +procedure TChromium.StopFinding(aClearSelection : Boolean); +begin + if Initialized then FBrowser.Host.StopFinding(aClearSelection); +end; + +procedure TChromium.Print; +begin + if Initialized then FBrowser.Host.Print; +end; + +procedure TChromium.PrintToPDF(const aFilePath, aTitle, aURL : ustring); +var + TempSettings : TCefPdfPrintSettings; +begin + if Initialized then + begin + GetPrintPDFSettings(TempSettings, aTitle, aURL); + if (FPDFPrintcb = nil) then FPDFPrintcb := TCefPDFPrintCallBack.Create(self); + FBrowser.Host.PrintToPdf(aFilePath, @TempSettings, FPDFPrintcb); + end; +end; + +procedure TChromium.VisitDOM; +var + TempFrame : ICefFrame; +begin + try + if Initialized then + begin + TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then + begin + if (FDOMVisitor = nil) then FDOMVisitor := TCustomDomVisitor.Create(self); + TempFrame.VisitDom(FDOMVisitor); + end; + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.VisitDOM error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TChromium.ClipboardCopy; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.Copy; + end; +end; + +procedure TChromium.ClipboardPaste; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.Paste; + end; +end; + +procedure TChromium.ClipboardCut; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.Cut; + end; +end; + +procedure TChromium.ClipboardUndo; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.Undo; + end; +end; + +procedure TChromium.ClipboardRedo; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.Redo; + end; +end; + +procedure TChromium.ClipboardDel; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.Del; + end; +end; + +procedure TChromium.SelectAll; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.FocusedFrame; + if (TempFrame = nil) then TempFrame := FBrowser.MainFrame; + + if (TempFrame <> nil) then TempFrame.SelectAll; + end; +end; + +procedure TChromium.GetPrintPDFSettings(var aSettings : TCefPdfPrintSettings; const aTitle, aURL : string); +begin + if (FPDFPrintOptions <> nil) then + begin + aSettings.header_footer_title := CefString(aTitle); + aSettings.header_footer_url := CefString(aURL); + aSettings.page_width := FPDFPrintOptions.page_width; + aSettings.page_height := FPDFPrintOptions.page_height; + aSettings.margin_top := FPDFPrintOptions.margin_top; + aSettings.margin_right := FPDFPrintOptions.margin_right; + aSettings.margin_bottom := FPDFPrintOptions.margin_bottom; + aSettings.margin_left := FPDFPrintOptions.margin_left; + aSettings.margin_type := FPDFPrintOptions.margin_type; + aSettings.header_footer_enabled := FPDFPrintOptions.header_footer_enabled; + aSettings.selection_only := FPDFPrintOptions.selection_only; + aSettings.landscape := FPDFPrintOptions.landscape; + aSettings.backgrounds_enabled := FPDFPrintOptions.backgrounds_enabled; + end; +end; + +procedure TChromium.GetSettings(var aSettings : TCefBrowserSettings); +begin + if (FFontOptions <> nil) and (FOptions <> nil) then + begin + aSettings.size := SizeOf(TCefBrowserSettings); + aSettings.windowless_frame_rate := FOptions.WindowlessFrameRate; + aSettings.standard_font_family := CefString(FFontOptions.StandardFontFamily); + aSettings.fixed_font_family := CefString(FFontOptions.FixedFontFamily); + aSettings.serif_font_family := CefString(FFontOptions.SerifFontFamily); + aSettings.sans_serif_font_family := CefString(FFontOptions.SansSerifFontFamily); + aSettings.cursive_font_family := CefString(FFontOptions.CursiveFontFamily); + aSettings.fantasy_font_family := CefString(FFontOptions.FantasyFontFamily); + aSettings.default_font_size := FFontOptions.DefaultFontSize; + aSettings.default_fixed_font_size := FFontOptions.DefaultFixedFontSize; + aSettings.minimum_font_size := FFontOptions.MinimumFontSize; + aSettings.minimum_logical_font_size := FFontOptions.MinimumLogicalFontSize; + aSettings.remote_fonts := FFontOptions.RemoteFonts; + aSettings.default_encoding := CefString(DefaultEncoding); + aSettings.javascript := FOptions.Javascript; + aSettings.javascript_open_windows := FOptions.JavascriptOpenWindows; + aSettings.javascript_close_windows := FOptions.JavascriptCloseWindows; + aSettings.javascript_access_clipboard := FOptions.JavascriptAccessClipboard; + aSettings.javascript_dom_paste := FOptions.JavascriptDomPaste; + aSettings.caret_browsing := FOptions.CaretBrowsing; + aSettings.plugins := FOptions.Plugins; + aSettings.universal_access_from_file_urls := FOptions.UniversalAccessFromFileUrls; + aSettings.file_access_from_file_urls := FOptions.FileAccessFromFileUrls; + aSettings.web_security := FOptions.WebSecurity; + aSettings.image_loading := FOptions.ImageLoading; + aSettings.image_shrink_standalone_to_fit := FOptions.ImageShrinkStandaloneToFit; + aSettings.text_area_resize := FOptions.TextAreaResize; + aSettings.tab_to_links := FOptions.TabToLinks; + aSettings.local_storage := FOptions.LocalStorage; + aSettings.databases := FOptions.Databases; + aSettings.application_cache := FOptions.ApplicationCache; + aSettings.webgl := FOptions.Webgl; + aSettings.background_color := FOptions.BackgroundColor; + aSettings.accept_language_list := CefString(FOptions.AcceptLanguageList); + end; +end; + +procedure TChromium.InitializeSettings(var aSettings : TCefBrowserSettings); +begin + aSettings.size := SizeOf(TCefBrowserSettings); + aSettings.windowless_frame_rate := 30; + aSettings.standard_font_family := CefString(''); + aSettings.fixed_font_family := CefString(''); + aSettings.serif_font_family := CefString(''); + aSettings.sans_serif_font_family := CefString(''); + aSettings.cursive_font_family := CefString(''); + aSettings.fantasy_font_family := CefString(''); + aSettings.default_font_size := 0; + aSettings.default_fixed_font_size := 0; + aSettings.minimum_font_size := 0; + aSettings.minimum_logical_font_size := 0; + aSettings.remote_fonts := STATE_DEFAULT; + aSettings.default_encoding := CefString(''); + aSettings.javascript := STATE_DEFAULT; + aSettings.javascript_open_windows := STATE_DEFAULT; + aSettings.javascript_close_windows := STATE_DEFAULT; + aSettings.javascript_access_clipboard := STATE_DEFAULT; + aSettings.javascript_dom_paste := STATE_DEFAULT; + aSettings.caret_browsing := STATE_DEFAULT; + aSettings.plugins := STATE_DEFAULT; + aSettings.universal_access_from_file_urls := STATE_DEFAULT; + aSettings.file_access_from_file_urls := STATE_DEFAULT; + aSettings.web_security := STATE_DEFAULT; + aSettings.image_loading := STATE_DEFAULT; + aSettings.image_shrink_standalone_to_fit := STATE_DEFAULT; + aSettings.text_area_resize := STATE_DEFAULT; + aSettings.tab_to_links := STATE_DEFAULT; + aSettings.local_storage := STATE_DEFAULT; + aSettings.databases := STATE_DEFAULT; + aSettings.application_cache := STATE_DEFAULT; + aSettings.webgl := STATE_DEFAULT; + aSettings.background_color := 0; + aSettings.accept_language_list := CefString(''); +end; + +procedure TChromium.LoadURL(const aURL : ustring); +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.MainFrame; + if (TempFrame <> nil) then TempFrame.LoadUrl(aURL); + end; +end; + +procedure TChromium.LoadString(const aString : ustring; const aURL : ustring); +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.MainFrame; + if (TempFrame <> nil) then TempFrame.LoadString(aString, aURL); + end; +end; + +procedure TChromium.GoBack; +begin + if Initialized and CanGoBack then FBrowser.GoBack; +end; + +procedure TChromium.GoForward; +begin + if Initialized and CanGoForward then FBrowser.GoForward; +end; + +procedure TChromium.Reload; +begin + if Initialized then FBrowser.Reload; +end; + +procedure TChromium.ReloadIgnoreCache; +begin + if Initialized then FBrowser.ReloadIgnoreCache; +end; + +procedure TChromium.StopLoad; +begin + if Initialized then FBrowser.StopLoad; +end; + +procedure TChromium.StartDownload(const aURL : ustring); +begin + if Initialized then FBrowser.Host.StartDownload(aURL); +end; + +function TChromium.GetIsLoading : boolean; +begin + Result := Initialized and FBrowser.IsLoading; +end; + +function TChromium.GetMultithreadApp : boolean; +begin + Result := True; + + try + if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.MultiThreadedMessageLoop; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.GetMultithreadApp error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TChromium.GetHasDocument : boolean; +begin + Result := Initialized and FBrowser.HasDocument; +end; + +function TChromium.GetHasView : boolean; +begin + Result := Initialized and FBrowser.Host.HasView; +end; + +function TChromium.GetHasDevTools : boolean; +begin + Result := Initialized and FBrowser.Host.HasDevTools; +end; + +function TChromium.GetWindowHandle : THandle; +begin + if Initialized then + Result := FBrowser.Host.WindowHandle + else + Result := 0; +end; + +function TChromium.GetFrameIsFocused : boolean; +begin + Result := Initialized and (FBrowser.FocusedFrame <> nil); +end; + +function TChromium.GetWindowlessFrameRate : integer; +begin + if Initialized then + Result := FBrowser.Host.GetWindowlessFrameRate + else + Result := 0; +end; + +function TChromium.GetVisibleNavigationEntry : ICefNavigationEntry; +begin + if Initialized then + Result := FBrowser.Host.VisibleNavigationEntry + else + Result := nil; +end; + +function TChromium.GetHasValidMainFrame : boolean; +begin + Result := Initialized and (FBrowser.MainFrame <> nil) and FBrowser.MainFrame.IsValid; +end; + +procedure TChromium.SetWindowlessFrameRate(aValue : integer); +begin + if Initialized then FBrowser.Host.SetWindowlessFrameRate(aValue); +end; + +function TChromium.GetCanGoBack : boolean; +begin + Result := Initialized and FBrowser.CanGoBack; +end; + +function TChromium.GetCanGoForward : boolean; +begin + Result := Initialized and FBrowser.CanGoForward; +end; + +function TChromium.GetIsPopUp : boolean; +begin + Result := Initialized and FBrowser.IsPopUp; +end; + +function TChromium.GetInitialized : boolean; +begin + Result := FInitialized and not(FClosing) and (FBrowser <> nil); +end; + +function TChromium.GetDocumentURL : string; +var + TempFrame : ICefFrame; +begin + Result := ''; + + if Initialized then + begin + TempFrame := FBrowser.MainFrame; + if (TempFrame <> nil) then Result := TempFrame.URL; + end; +end; + +function TChromium.GetZoomLevel : double; +begin + Result := 0; + + if Initialized then Result := FBrowser.Host.ZoomLevel; +end; + +procedure TChromium.SetZoomLevel(const aValue : double); +begin + if Initialized then FBrowser.Host.ZoomLevel := aValue; +end; + +function TChromium.GetZoomPct : double; +begin + Result := power(1.2, ZoomLevel) * 100; +end; + +procedure TChromium.SetZoomPct(const aValue : double); +begin + if Initialized and (aValue > 0) then ZoomLevel := LogN(1.2, aValue / 100); +end; + +procedure TChromium.ApplyZoomStep; +begin + case FZoomStep of + ZOOM_STEP_25 : ZoomPct := 25; + ZOOM_STEP_33 : ZoomPct := 33; + ZOOM_STEP_50 : ZoomPct := 50; + ZOOM_STEP_67 : ZoomPct := 67; + ZOOM_STEP_75 : ZoomPct := 75; + ZOOM_STEP_90 : ZoomPct := 90; + ZOOM_STEP_100 : ZoomPct := 100; + ZOOM_STEP_110 : ZoomPct := 110; + ZOOM_STEP_125 : ZoomPct := 125; + ZOOM_STEP_150 : ZoomPct := 150; + ZOOM_STEP_175 : ZoomPct := 175; + ZOOM_STEP_200 : ZoomPct := 200; + ZOOM_STEP_250 : ZoomPct := 250; + ZOOM_STEP_300 : ZoomPct := 300; + ZOOM_STEP_400 : ZoomPct := 400; + ZOOM_STEP_500 : ZoomPct := 500; + end; +end; + +procedure TChromium.SetZoomStep(aValue : byte); +begin + if Initialized and (aValue in [ZOOM_STEP_MIN..ZOOM_STEP_MAX]) then + begin + FZoomStep := aValue; + ApplyZoomStep; + end; +end; + +procedure TChromium.IncZoomStep; +begin + if Initialized and (FZoomStep < ZOOM_STEP_MAX) then + begin + inc(FZoomStep); + ApplyZoomStep; + end; +end; + +procedure TChromium.DecZoomStep; +begin + if Initialized and (FZoomStep > ZOOM_STEP_MIN) then + begin + dec(FZoomStep); + ApplyZoomStep; + end; +end; + +procedure TChromium.ResetZoomStep; +begin + ZoomStep := ZOOM_STEP_DEF; +end; + +procedure TChromium.SetDoNotTrack(aValue : boolean); +begin + if (FDoNotTrack <> aValue) then + begin + FDoNotTrack := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetSendReferrer(aValue : boolean); +begin + if (FSendReferrer <> aValue) then + begin + FSendReferrer := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetHyperlinkAuditing(aValue : boolean); +begin + if (FHyperlinkAuditing <> aValue) then + begin + FHyperlinkAuditing := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetCookiePrefs(aValue : integer); +begin + if (FCookiePrefs <> aValue) then + begin + FCookiePrefs := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetImagesPrefs(aValue : integer); +begin + if (FImagesPrefs <> aValue) then + begin + FImagesPrefs := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyType(aValue : integer); +begin + if (FProxyType <> aValue) then + begin + FProxyType := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyServer(const aValue : string); +begin + if (FProxyServer <> aValue) then + begin + FProxyServer := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyPort(aValue : integer); +begin + if (FProxyPort <> aValue) then + begin + FProxyPort := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyUsername(const aValue : string); +begin + if (FProxyUsername <> aValue) then + begin + FProxyUsername := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyPassword(const aValue : string); +begin + if (FProxyPassword <> aValue) then + begin + FProxyPassword := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyScriptURL(const aValue : string); +begin + if (FProxyScriptURL <> aValue) then + begin + FProxyScriptURL := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetProxyByPassList(const aValue : string); +begin + if (FProxyByPassList <> aValue) then + begin + FProxyByPassList := aValue; + FUpdatePreferences := True; + end; +end; + +procedure TChromium.SetCustomHeaderName(const aValue : string); +begin + if (FCustomHeaderName <> aValue) then + begin + FCustomHeaderName := aValue; + FAddCustomHeader := (length(FCustomHeaderName) > 0) and (length(FCustomHeaderValue) > 0); + end; +end; + +procedure TChromium.SetCustomHeaderValue(const aValue : string); +begin + if (FCustomHeaderValue <> aValue) then + begin + FCustomHeaderValue := aValue; + FAddCustomHeader := (length(FCustomHeaderName) > 0) and (length(FCustomHeaderValue) > 0); + end; +end; + +procedure TChromium.SetCMStoragePath(const aValue : ustring); +var + CookieManager : ICefCookieManager; +begin + FCMStoragePath := aValue; + CookieManager := TCefCookieManagerRef.Global(nil); + + if (CookieManager <> nil) then + CookieManager.SetStoragePath(FCMStoragePath, False, nil); +end; + +procedure TChromium.GetHTML; +var + TempFrame : ICefFrame; +begin + if Initialized then + begin + TempFrame := FBrowser.MainFrame; + if (TempFrame <> nil) then + begin + if (FVisitor = nil) then FVisitor := TCustomCefStringVisitor.Create(self); + TempFrame.GetSource(FVisitor); + end; + end; +end; + +procedure TChromium.DeleteCookies; +var + TempTask: ICefTask; +begin + if Initialized then + begin + if (FCookiDeletercb = nil) then FCookiDeletercb := TCefCustomDeleteCookiesCallback.Create(self); + TempTask := TCefDeleteCookiesTask.Create(FCookiDeletercb); + CefPostTask(TID_IO, TempTask); + end; +end; + +procedure TChromium.RetrieveDOMDocument; +var + TempTask: ICefTask; +begin + if Initialized then + begin + TempTask := TCefGetDocumentTask.Create(self); + CefPostTask(TID_RENDERER, TempTask); + end; +end; + +procedure TChromium.RetrieveHTML; +var + TempTask: ICefTask; +begin + if Initialized then + begin + TempTask := TCefGetHTMLTask.Create(self); + CefPostTask(TID_UI, TempTask); + end; +end; + +procedure TChromium.SimulateMouseWheel(aDeltaX, aDeltaY : integer); +var + TempEvent : TCefMouseEvent; +begin + if Initialized then + begin + TempEvent.x := 0; + TempEvent.y := 0; + TempEvent.modifiers := []; + FBrowser.Host.SendMouseWheelEvent(@TempEvent, aDeltaX, aDeltaY); + end; +end; + +procedure TChromium.UpdateAllPreferences; +begin + UpdateProxyPrefs; + UpdatePreference('enable_do_not_track', FDoNotTrack); + UpdatePreference('enable_referrers', FSendReferrer); + UpdatePreference('enable_a_ping', FHyperlinkAuditing); +end; + +function TChromium.UpdateProxyPrefs : boolean; +var + TempError : ustring; + TempProxy : ICefValue; + TempValue : ICefValue; + TempDict : ICefDictionaryValue; +begin + Result := False; + + try + if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference('proxy') then + begin + TempProxy := TCefValueRef.New; + TempValue := TCefValueRef.New; + TempDict := TCefDictionaryValueRef.New; + + case FProxyType of + CEF_PROXYTYPE_AUTODETECT : + begin + TempValue.SetString('auto_detect'); + TempDict.SetValue('mode', TempValue); + end; + + CEF_PROXYTYPE_SYSTEM : + begin + TempValue.SetString('system'); + TempDict.SetValue('mode', TempValue); + end; + + CEF_PROXYTYPE_FIXED_SERVERS : + begin + TempValue.SetString('fixed_servers'); + TempDict.SetValue('mode', TempValue); + TempDict.SetString('server', FProxyServer + ':' + inttostr(FProxyPort)); + if (length(FProxyByPassList) > 0) then TempDict.SetString('bypass_list', FProxyByPassList); + end; + + + CEF_PROXYTYPE_PAC_SCRIPT : + begin + TempValue.SetString('pac_script'); + TempDict.SetValue('mode', TempValue); + TempDict.SetString('pac_url', FProxyScriptURL); + end; + + else // CEF_PROXYTYPE_DIRECT + begin + TempValue.SetString('direct'); + TempDict.SetValue('mode', TempValue); + end; + end; + + Result := TempProxy.SetDictionary(TempDict) and + FBrowser.Host.RequestContext.SetPreference('proxy', TempProxy, TempError); + + {$IFDEF DEBUG} + if not(Result) then OutputDebugString(PWideChar('UpdateProxyPrefs error : ' + quotedstr(TempError) + chr(0))); + {$ENDIF} + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.UpdateProxyPrefs error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TChromium.UpdatePreference(const aName : string; aValue : boolean) : boolean; +var + TempError : ustring; + TempValue : ICefValue; +begin + Result := False; + + try + if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then + begin + TempValue := TCefValueRef.New; + + if aValue then + TempValue.SetBool(1) + else + TempValue.SetBool(0); + + Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); + + {$IFDEF DEBUG} + if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); + {$ENDIF} + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TChromium.UpdatePreference(const aName : string; aValue : integer) : boolean; +var + TempError : ustring; + TempValue : ICefValue; +begin + Result := False; + + try + if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then + begin + TempValue := TCefValueRef.New; + TempValue.SetInt(aValue); + Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); + + {$IFDEF DEBUG} + if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); + {$ENDIF} + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TChromium.UpdatePreference(const aName : string; const aValue : double) : boolean; +var + TempError : ustring; + TempValue : ICefValue; +begin + Result := False; + + try + if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then + begin + TempValue := TCefValueRef.New; + TempValue.SetDouble(aValue); + Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); + + {$IFDEF DEBUG} + if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); + {$ENDIF} + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +function TChromium.UpdatePreference(const aName, aValue : string) : boolean; +var + TempError : ustring; + TempValue : ICefValue; +begin + Result := False; + + try + if (FBrowser <> nil) and FBrowser.Host.RequestContext.CanSetPreference(aName) then + begin + TempValue := TCefValueRef.New; + TempValue.SetString(aValue); + Result := FBrowser.Host.RequestContext.SetPreference(aName, TempValue, TempError); + + {$IFDEF DEBUG} + if not(Result) then OutputDebugString(PWideChar('UpdatePreference error : ' + quotedstr(TempError) + chr(0))); + {$ENDIF} + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.UpdatePreference error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TChromium.HandleNull(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : -null-') + else + aResultSL.Add('-null-'); +end; + +procedure TChromium.HandleBool(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : ' + BoolToStr(aValue.GetBool, true)) + else + aResultSL.Add(BoolToStr(aValue.GetBool, true)); +end; + +procedure TChromium.HandleInteger(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : ' + IntToStr(aValue.GetInt)) + else + aResultSL.Add(IntToStr(aValue.GetInt)); +end; + +procedure TChromium.HandleDouble(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : ' + FloatToStr(aValue.GetDouble)) + else + aResultSL.Add(FloatToStr(aValue.GetDouble)); +end; + +procedure TChromium.HandleString(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : ' + aValue.GetString) + else + aResultSL.Add(aValue.GetString); +end; + +procedure TChromium.HandleBinary(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : -binary-') + else + aResultSL.Add('-binary-'); +end; + +procedure TChromium.HandleList(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey, TempResult : string; + i, j : integer; + TempList : ICefListValue; + TempValue : ICefValue; + TempSL : TStringList; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + TempList := aValue.GetList; + TempSL := TStringList.Create; + + i := 0; + j := TempList.GetSize; + + TempResult := '(' + inttostr(j) + '){'; + + while (i < j) do + begin + TempValue := TempList.GetValue(i); + + case TempValue.GetType of + VTYPE_NULL : TempResult := TempResult + '-null-,'; + VTYPE_BOOL : TempResult := TempResult + BoolToStr(aValue.GetBool, true) + ','; + VTYPE_INT : TempResult := TempResult + IntToStr(aValue.GetInt) + ','; + VTYPE_DOUBLE : TempResult := TempResult + FloatToStr(aValue.GetDouble) + ','; + VTYPE_STRING : TempResult := TempResult + aValue.GetString + ','; + VTYPE_BINARY : TempResult := TempResult + '-binary-,'; + VTYPE_DICTIONARY : + begin + TempSL.Clear; + HandleDictionary(TempValue.GetDictionary, TempSL, ''); + TempResult := TempResult + TempSL.CommaText + ','; + end; + + VTYPE_LIST : + begin + TempSL.Clear; + HandleList(TempValue, TempSL, '', ''); + TempResult := TempResult + TempSL.CommaText + ','; + end; + + else TempResult := TempResult + '-invalid-,'; + end; + + inc(i); + end; + + i := length(TempResult); + if (i > 0) and (TempResult[i] = ',') then TempResult := copy(TempResult, 1, pred(i)); + TempResult := TempResult + '}'; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : ' + TempResult) + else + aResultSL.Add(TempResult); + + TempSL.Free; +end; + +procedure TChromium.HandleInvalid(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string); +var + TempKey : string; +begin + if (aRoot <> '') then + TempKey := aRoot + '.' + aKey + else + TempKey := aKey; + + if (length(TempKey) > 0) then + aResultSL.Add(TempKey + ' : -invalid-') + else + aResultSL.Add('-invalid-'); +end; + +procedure TChromium.HandleDictionary(const aDict : ICefDictionaryValue; var aResultSL : TStringList; const aRoot : string); +var + TempKeys : TStringList; + i, j : integer; + TempValue : ICefValue; + TempNewKey : string; +begin + TempKeys := nil; + + try + try + if (aDict <> nil) then + begin + TempKeys := TStringList.Create; + aDict.GetKeys(TempKeys); + + i := 0; + j := TempKeys.Count; + + while (i < j) do + begin + TempValue := aDict.GetValue(TempKeys[i]); + + case TempValue.GetType of + VTYPE_NULL : HandleNull(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_BOOL : HandleBool(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_INT : HandleInteger(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_DOUBLE : HandleDouble(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_STRING : HandleString(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_BINARY : HandleBinary(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_LIST : HandleList(TempValue, aResultSL, aRoot, TempKeys[i]); + VTYPE_DICTIONARY : + begin + if (length(aRoot) > 0) then + TempNewKey := aRoot + '.' + TempKeys[i] + else + TempNewKey := TempKeys[i]; + + HandleDictionary(TempValue.GetDictionary, aResultSL, TempNewKey); + end; + + else + HandleInvalid(TempValue, aResultSL, aRoot, TempKeys[i]); + end; + + inc(i); + end; + + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.HandleDictionary error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; + finally + if (TempKeys <> nil) then TempKeys.Free; + end; +end; + +function TChromium.GetAllPreferences : boolean; +var + TempDict : ICefDictionaryValue; +begin + Result := False; + + try + if (FBrowser <> nil) and (FPrefs <> nil) then + begin + FPrefs.Clear; + TempDict := FBrowser.Host.RequestContext.GetAllPreferences(True); + HandleDictionary(TempDict, FPrefs, ''); + Result := SendCompMessage(CEF_PREFERENCES_AVAILABLE); + end; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TChromium.GetAllPreferences error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +procedure TChromium.PrefsAvailableMsg(var aMessage : TMessage); +begin + if (FPrefs <> nil) and assigned(FOnPrefsAvailable) then FOnPrefsAvailable(self, FPrefs.Text); +end; + +function TChromium.SendCompMessage(aMsg : cardinal; wParam : cardinal; lParam : integer) : boolean; +begin + Result := (FCompHandle <> 0) and PostMessage(FCompHandle, aMsg, wParam, lParam); +end; + +procedure TChromium.TextResultAvailable(const aText : string); +begin + if assigned(FOnTextResultAvailable) then FOnTextResultAvailable(self, aText); +end; + +procedure TChromium.CookiesDeleted(numDeleted : integer); +begin + if assigned(FOnCookiesDeleted) then FOnCookiesDeleted(self, numDeleted); +end; + +procedure TChromium.DOMVisitorVisit(const document: ICefDomDocument); +begin + if assigned(FOnDocumentAvailable) then FOnDocumentAvailable(self, document); +end; + +procedure TChromium.PdfPrintFinished(aResultOK : boolean); +begin + if assigned(FOnPdfPrintFinished) then FOnPdfPrintFinished(self, aResultOK); +end; + +procedure TChromium.ShowDevTools(inspectElementAt: TPoint; const aDevTools : TWinControl); +var + TempInfo : TCefWindowInfo; + TempSettings : TCefBrowserSettings; + TempPoint : TCefPoint; + TempPPoint : PCefPoint; +begin + if not(Initialized) or HasDevTools then Exit; + + InitializeSettings(TempSettings); + + if (aDevTools <> nil) then + WindowInfoAsChild(TempInfo, aDevTools.Handle, aDevTools.ClientRect, aDevTools.Name) + else + WindowInfoAsPopUp(TempInfo, WindowHandle, DEVTOOLS_WINDOWNAME); + + + if (inspectElementAt.x <> low(integer)) and + (inspectElementAt.y <> low(integer)) then + begin + TempPoint.x := inspectElementAt.x; + TempPoint.y := inspectElementAt.y; + TempPPoint := @TempPoint; + end + else + TempPPoint := nil; + + FBrowser.Host.ShowDevTools(@TempInfo, TCefClientOwn.Create as ICefClient, @TempSettings, TempPPoint); +end; + +procedure TChromium.CloseDevTools(const aDevTools : TWinControl); +begin + if Initialized then + begin + if (aDevTools <> nil) then WinApi.Windows.SetParent(GetWindow(aDevTools.Handle, GW_CHILD), 0); + if (FBrowser <> nil) then FBrowser.Host.CloseDevTools; + end; +end; + +procedure TChromium.WndProc(var aMessage: TMessage); +begin + case aMessage.Msg of + CEF_PREFERENCES_AVAILABLE : PrefsAvailableMsg(aMessage); + + else aMessage.Result := DefWindowProc(FCompHandle, aMessage.Msg, aMessage.WParam, aMessage.LParam); + end; +end; + +function TChromium.doOnClose(const browser: ICefBrowser): Boolean; +begin + Result := False; + + if Assigned(FOnClose) then FOnClose(Self, browser, Result); + + FClosing := True; +end; + +procedure TChromium.doOnAddressChange(const browser: ICefBrowser; const frame: ICefFrame; const url: ustring); +begin + if Assigned(FOnAddressChange) then FOnAddressChange(Self, browser, frame, url); +end; + +procedure TChromium.doOnAfterCreated(const browser: ICefBrowser); +begin + if MultithreadApp and (FBrowser = nil) then + begin + FBrowser := browser; + if (FBrowser <> nil) then FBrowserId := FBrowser.Identifier; + end; + + UpdateAllPreferences; + + FInitialized := (FBrowser <> nil) and (FBrowserId <> 0); + + if Assigned(FOnAfterCreated) then FOnAfterCreated(Self, browser); +end; + +function TChromium.doOnBeforeBrowse(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest; + isRedirect : Boolean): Boolean; +begin + Result := False; + + if FUpdatePreferences then + begin + FUpdatePreferences := False; + UpdateAllPreferences; + end; + + if FGetPreferences then + begin + FGetPreferences := False; + GetAllPreferences; + end; + + if Assigned(FOnBeforeBrowse) then FOnBeforeBrowse(Self, browser, frame, request, isRedirect, Result); +end; + +procedure TChromium.doOnBeforeClose(const browser: ICefBrowser); +begin + FInitialized := False; + FBrowser := nil; + FBrowserId := 0; + + if Assigned(FOnBeforeClose) then FOnBeforeClose(Self, browser); +end; + +procedure TChromium.doOnBeforeContextMenu(const browser : ICefBrowser; + const frame : ICefFrame; + const params : ICefContextMenuParams; + const model : ICefMenuModel); +begin + if Assigned(FOnBeforeContextMenu) then FOnBeforeContextMenu(Self, browser, frame, params, model); +end; + +procedure TChromium.doOnBeforeDownload(const browser : ICefBrowser; + const downloadItem : ICefDownloadItem; + const suggestedName : ustring; + const callback : ICefBeforeDownloadCallback); +begin + if Assigned(FOnBeforeDownload) then FOnBeforeDownload(Self, browser, downloadItem, suggestedName, callback); +end; + +function TChromium.doOnBeforePopup(const browser : ICefBrowser; + const frame : ICefFrame; + const targetUrl : ustring; + const targetFrameName : ustring; + targetDisposition : TCefWindowOpenDisposition; + userGesture : Boolean; + var popupFeatures : TCefPopupFeatures; + var windowInfo : TCefWindowInfo; + var client : ICefClient; + var settings : TCefBrowserSettings; + var noJavascriptAccess : Boolean): Boolean; +begin + Result := False; + + if Assigned(FOnBeforePopup) then + FOnBeforePopup(Self, browser, frame, targetUrl, targetFrameName, + targetDisposition, userGesture, popupFeatures, windowInfo, client, + settings, noJavascriptAccess, Result); +end; + +function TChromium.doOnBeforeResourceLoad(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest; + const callback : ICefRequestCallback): TCefReturnValue; +var + TempHeaderMap : ICefStringMultimap; +begin + if FAddCustomHeader then + begin + TempHeaderMap := TCefStringMultimapOwn.Create; + request.GetHeaderMap(TempHeaderMap); + TempHeaderMap.Append(FCustomHeaderName, FCustomHeaderValue); + request.SetHeaderMap(TempHeaderMap); + TempHeaderMap := nil; + end; + + if not(FSendReferrer) then request.SetReferrer('', REFERRER_POLICY_NEVER); + + Result := RV_CONTINUE; + + if Assigned(FOnBeforeResourceLoad) then FOnBeforeResourceLoad(Self, browser, frame, request, callback, Result); +end; + +function TChromium.doOnBeforeUnloadDialog(const browser : ICefBrowser; + const messageText : ustring; + isReload : Boolean; + const callback : ICefJsDialogCallback): Boolean; +begin + Result := False; + + if Assigned(FOnBeforeUnloadDialog) then FOnBeforeUnloadDialog(Self, browser, messageText, isReload, callback, Result); +end; + +procedure TChromium.doOnCancelGeolocationPermission(const browser : ICefBrowser; requestId : Integer); +begin + if Assigned(FOnCancelGeolocationPermission) then + FOnCancelGeolocationPermission(Self, browser, requestId); +end; + +function TChromium.doOnCertificateError(const browser : ICefBrowser; + certError : TCefErrorcode; + const requestUrl : ustring; + const sslInfo : ICefSslInfo; + const callback : ICefRequestCallback): Boolean; +begin + Result := False; + + if Assigned(FOnCertificateError) then + FOnCertificateError(Self, browser, certError, requestUrl, sslInfo, callback, Result); +end; + +function TChromium.doOnConsoleMessage(const browser : ICefBrowser; + const aMessage : ustring; + const source : ustring; + line : Integer): Boolean; +begin + Result := False; + + if Assigned(FOnConsoleMessage) then FOnConsoleMessage(Self, browser, aMessage, source, line, Result); +end; + +function TChromium.doOnContextMenuCommand(const browser : ICefBrowser; + const frame : ICefFrame; + const params : ICefContextMenuParams; + commandId : Integer; + eventFlags : TCefEventFlags): Boolean; +begin + Result := False; + + if Assigned(FOnContextMenuCommand) then + FOnContextMenuCommand(Self, browser, frame, params, commandId, eventFlags, Result); +end; + +procedure TChromium.doOnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); +begin + if Assigned(FOnContextMenuDismissed) then FOnContextMenuDismissed(Self, browser, frame); +end; + +procedure TChromium.doOnCursorChange(const browser : ICefBrowser; + cursor : TCefCursorHandle; + cursorType : TCefCursorType; + const customCursorInfo : PCefCursorInfo); +begin + if assigned(FOnCursorChange) then FOnCursorChange(self, browser, cursor, cursorType, customCursorInfo); +end; + +procedure TChromium.doOnDialogClosed(const browser: ICefBrowser); +begin + if Assigned(FOnDialogClosed) then FOnDialogClosed(Self, browser); +end; + +procedure TChromium.doOnDownloadUpdated(const browser : ICefBrowser; + const downloadItem : ICefDownloadItem; + const callback : ICefDownloadItemCallback); +begin + if Assigned(FOnDownloadUpdated) then FOnDownloadUpdated(Self, browser, downloadItem, callback); +end; + +function TChromium.doOnDragEnter(const browser : ICefBrowser; + const dragData : ICefDragData; + mask : TCefDragOperations): Boolean; +begin + Result := False; + + if Assigned(FOnDragEnter) then FOnDragEnter(Self, browser, dragData, mask, Result); +end; + +procedure TChromium.doOnDraggableRegionsChanged(const browser : ICefBrowser; + regionsCount : NativeUInt; + regions : PCefDraggableRegionArray); +begin + if Assigned(FOnDraggableRegionsChanged) then FOnDraggableRegionsChanged(Self, browser, regionsCount, regions); +end; + +procedure TChromium.doOnFaviconUrlChange(const browser: ICefBrowser; iconUrls: TStrings); +begin + if Assigned(FOnFavIconUrlChange) then FOnFavIconUrlChange(Self, browser, iconUrls); +end; + +function TChromium.doOnFileDialog(const browser : ICefBrowser; + mode : TCefFileDialogMode; + const title : ustring; + const defaultFilePath : ustring; + acceptFilters : TStrings; + selectedAcceptFilter : Integer; + const callback : ICefFileDialogCallback): Boolean; +begin + Result := False; + + if Assigned(FOnFileDialog) then + FOnFileDialog(Self, browser, mode, title, defaultFilePath, acceptFilters, + selectedAcceptFilter, callback, Result); +end; + +procedure TChromium.doOnFindResult(const browser : ICefBrowser; + identifier : integer; + count : Integer; + const selectionRect : PCefRect; + activeMatchOrdinal : Integer; + finalUpdate : Boolean); +begin + if Assigned(FOnFindResult) then + FOnFindResult(Self, browser, identifier, count, selectionRect, activeMatchOrdinal, finalUpdate); +end; + +procedure TChromium.doOnFullScreenModeChange(const browser: ICefBrowser; fullscreen: Boolean); +begin + if Assigned(FOnFullScreenModeChange) then FOnFullScreenModeChange(Self, browser, fullscreen); +end; + +function TChromium.doOnGetAuthCredentials(const browser : ICefBrowser; + const frame : ICefFrame; + isProxy : Boolean; + const host : ustring; + port : Integer; + const realm : ustring; + const scheme : ustring; + const callback : ICefAuthCallback): Boolean; +begin + Result := False; + + if isProxy then + begin + if (FProxyType = CEF_PROXYTYPE_FIXED_SERVERS) and (callback <> nil) then + begin + Result := True; + callback.cont(FProxyUsername, FProxyPassword); + end; + end + else + if (frame <> nil) and frame.IsMain and Assigned(FOnGetAuthCredentials) then + FOnGetAuthCredentials(Self, browser, frame, isProxy, host, port, realm, scheme, callback, Result); +end; + +function TChromium.doOnGetResourceHandler(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest): ICefResourceHandler; +begin + Result := nil; + + if Assigned(FOnGetResourceHandler) then + FOnGetResourceHandler(Self, browser, frame, request, Result); +end; + +function TChromium.doOnGetRootScreenRect(const browser: ICefBrowser; rect: PCefRect): Boolean; +begin + Result := False; + + if Assigned(FOnGetRootScreenRect) then FOnGetRootScreenRect(Self, browser, rect, Result); +end; + +function TChromium.doOnGetScreenInfo(const browser: ICefBrowser; screenInfo: PCefScreenInfo): Boolean; +begin + Result := False; + + if Assigned(FOnGetScreenInfo) then FOnGetScreenInfo(Self, browser, screenInfo, Result); +end; + +function TChromium.doOnGetScreenPoint(const browser: ICefBrowser; viewX, viewY: Integer; screenX, screenY: PInteger): Boolean; +begin + Result := False; + + if Assigned(FOnGetScreenPoint) then FOnGetScreenPoint(Self, browser, viewX, viewY, screenX, screenY, Result); +end; + +function TChromium.doOnGetViewRect(const browser: ICefBrowser; rect: PCefRect): Boolean; +begin + Result := False; + + if Assigned(FOnGetViewRect) then FOnGetViewRect(Self, browser, rect, Result); +end; + +procedure TChromium.doOnGotFocus(const browser: ICefBrowser); +begin + if Assigned(FOnGotFocus) then FOnGotFocus(Self, browser) +end; + +function TChromium.doOnJsdialog(const browser : ICefBrowser; + const originUrl : ustring; + dialogType : TCefJsDialogType; + const messageText : ustring; + const defaultPromptText : ustring; + const callback : ICefJsDialogCallback; + out suppressMessage : Boolean): Boolean; +begin + Result := False; + + if not(Initialized) then + suppressMessage := True + else + if Assigned(FOnJsdialog) then + FOnJsdialog(Self, browser, originUrl, dialogType, messageText, + defaultPromptText, callback, suppressMessage, Result); +end; + +function TChromium.doOnKeyEvent(const browser : ICefBrowser; + const event : PCefKeyEvent; + osEvent : TCefEventHandle): Boolean; +begin + Result := False; + + if Assigned(FOnKeyEvent) then FOnKeyEvent(Self, browser, event, osEvent, Result); +end; + +procedure TChromium.doOnLoadEnd(const browser : ICefBrowser; + const frame : ICefFrame; + httpStatusCode : Integer); +begin + if Assigned(FOnLoadEnd) then FOnLoadEnd(Self, browser, frame, httpStatusCode); +end; + +procedure TChromium.doOnLoadError(const browser : ICefBrowser; + const frame : ICefFrame; + errorCode : Integer; + const errorText : ustring; + const failedUrl : ustring); +begin + if Assigned(FOnLoadError) then FOnLoadError(Self, browser, frame, errorCode, errorText, failedUrl); +end; + +procedure TChromium.doOnLoadingStateChange(const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean); +begin + if Assigned(FOnLoadingStateChange) then FOnLoadingStateChange(Self, browser, isLoading, canGoBack, canGoForward); +end; + +procedure TChromium.doOnLoadStart(const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType); +begin + if Assigned(FOnLoadStart) then FOnLoadStart(Self, browser, frame, transitionType); +end; + +function TChromium.doOnOpenUrlFromTab(const browser : ICefBrowser; + const frame : ICefFrame; + const targetUrl : ustring; + targetDisposition : TCefWindowOpenDisposition; + userGesture : Boolean): Boolean; +begin + Result := False; + + if Assigned(FOnOpenUrlFromTab) then + FOnOpenUrlFromTab(Self, browser, frame, targetUrl, targetDisposition, userGesture, Result); +end; + +procedure TChromium.doOnPaint(const browser : ICefBrowser; + kind : TCefPaintElementType; + dirtyRectsCount : NativeUInt; + const dirtyRects : PCefRectArray; + const buffer : Pointer; + width : Integer; + height : Integer); +begin + if Assigned(FOnPaint) then FOnPaint(Self, browser, kind, dirtyRectsCount, dirtyRects, buffer, width, height); +end; + +function TChromium.doOnSelectClientCertificate(const browser : ICefBrowser; + isProxy : boolean; + const host : ustring; + port : integer; + certificatesCount : NativeUInt; + const certificates : TCefX509CertificateArray; + const callback : ICefSelectClientCertificateCallback): boolean; +begin + Result := False; + + if assigned(FOnSelectClientCertificate) then + FOnSelectClientCertificate(self, browser, isProxy, host, port, certificatesCount, certificates, callback, Result); +end; + +procedure TChromium.doOnPluginCrashed(const browser: ICefBrowser; const pluginPath: ustring); +begin + if Assigned(FOnPluginCrashed) then FOnPluginCrashed(Self, browser, pluginPath); +end; + +procedure TChromium.doOnPopupShow(const browser: ICefBrowser; show: Boolean); +begin + if assigned(FOnPopupShow) then FOnPopupShow(self, browser, show); +end; + +procedure TChromium.doOnPopupSize(const browser: ICefBrowser; const rect: PCefRect); +begin + if assigned(FOnPopupSize) then FOnPopupSize(self, browser, rect); +end; + +function TChromium.doOnPreKeyEvent(const browser : ICefBrowser; + const event : PCefKeyEvent; + osEvent : TCefEventHandle; + out isKeyboardShortcut : Boolean): Boolean; +begin + Result := False; + + if Assigned(FOnPreKeyEvent) then FOnPreKeyEvent(Self, browser, event, osEvent, isKeyboardShortcut, Result); +end; + +function TChromium.doOnProcessMessageReceived(const browser : ICefBrowser; + sourceProcess : TCefProcessId; + const aMessage : ICefProcessMessage): Boolean; +begin + Result := False; + + if Assigned(FOnProcessMessageReceived) then + FOnProcessMessageReceived(Self, browser, sourceProcess, aMessage, Result); +end; + +procedure TChromium.doOnProtocolExecution(const browser : ICefBrowser; + const url : ustring; + out allowOsExecution : Boolean); +begin + if Assigned(FOnProtocolExecution) then FOnProtocolExecution(Self, browser, url, allowOsExecution); +end; + +function TChromium.doOnQuotaRequest(const browser : ICefBrowser; + const originUrl : ustring; + newSize : Int64; + const callback : ICefRequestCallback): Boolean; +begin + Result := False; + + if Assigned(FOnQuotaRequest) then FOnQuotaRequest(Self, browser, originUrl, newSize, callback, Result); +end; + +procedure TChromium.doOnRenderProcessTerminated(const browser: ICefBrowser; status: TCefTerminationStatus); +begin + if Assigned(FOnRenderProcessTerminated) then FOnRenderProcessTerminated(Self, browser, status); +end; + +procedure TChromium.doOnRenderViewReady(const browser: ICefBrowser); +begin + if Assigned(FOnRenderViewReady) then FOnRenderViewReady(Self, browser); +end; + +function TChromium.doOnRequestGeolocationPermission(const browser : ICefBrowser; + const requestingUrl : ustring; + requestId : Integer; + const callback : ICefGeolocationCallback): Boolean; +begin + Result := False; + + if Assigned(FOnRequestGeolocationPermission) then + FOnRequestGeolocationPermission(Self, browser, requestingUrl, requestId, callback, Result); +end; + +procedure TChromium.doOnResetDialogState(const browser: ICefBrowser); +begin + if Assigned(FOnResetDialogState) then FOnResetDialogState(Self, browser); +end; + +procedure TChromium.doOnResourceRedirect(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest; + const response : ICefResponse; + var newUrl : ustring); +begin + if Assigned(FOnResourceRedirect) then FOnResourceRedirect(Self, browser, frame, request, response, newUrl); +end; + +function TChromium.doOnResourceResponse(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest; + const response : ICefResponse): Boolean; +begin + Result := False; + + if Assigned(FOnResourceResponse) then FOnResourceResponse(Self, browser, frame, request, response, Result); +end; +function TChromium.doOnGetResourceResponseFilter(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest; + const response : ICefResponse) : ICefResponseFilter; +begin + Result := nil; + + if Assigned(FOnGetResourceResponseFilter) then + FOnGetResourceResponseFilter(self, browser, frame, request, response, Result); +end; + +procedure TChromium.doOnResourceLoadComplete(const browser : ICefBrowser; + const frame : ICefFrame; + const request : ICefRequest; + const response : ICefResponse; + status : TCefUrlRequestStatus; + receivedContentLength : Int64); +begin + if Assigned(FOnResourceLoadComplete) then + FOnResourceLoadComplete(self, browser, frame, request, response, status, receivedContentLength); +end; + +procedure TChromium.doOnScrollOffsetChanged(const browser: ICefBrowser; x, y: Double); +begin + if Assigned(FOnScrollOffsetChanged) then FOnScrollOffsetChanged(Self, browser, x, y); +end; + +procedure TChromium.doOnIMECompositionRangeChanged(const browser : ICefBrowser; + const selected_range : PCefRange; + character_boundsCount : NativeUInt; + const character_bounds : PCefRect); +begin + if assigned(FOnIMECompositionRangeChanged) then + FOnIMECompositionRangeChanged(self, browser, selected_range, character_boundsCount, character_bounds); +end; + +function TChromium.doOnSetFocus(const browser: ICefBrowser; source: TCefFocusSource): Boolean; +begin + Result := False; + + if Assigned(FOnSetFocus) then FOnSetFocus(Self, browser, source, Result); +end; + +function TChromium.doOnStartDragging(const browser : ICefBrowser; + const dragData : ICefDragData; + allowedOps : TCefDragOperations; + x : integer; + y : Integer): Boolean; +begin + Result := False; + + if Assigned(FOnStartDragging) then FOnStartDragging(Self, browser, dragData, allowedOps, x, y, Result); +end; + +procedure TChromium.doOnStatusMessage(const browser: ICefBrowser; const value: ustring); +begin + if Assigned(FOnStatusMessage) then FOnStatusMessage(Self, browser, value); +end; + +procedure TChromium.doOnTakeFocus(const browser: ICefBrowser; next: Boolean); +begin + if Assigned(FOnTakeFocus) then FOnTakeFocus(Self, browser, next); +end; + +procedure TChromium.doOnTitleChange(const browser: ICefBrowser; const title: ustring); +begin + if Assigned(FOnTitleChange) then FOnTitleChange(Self, browser, title); +end; + +function TChromium.doOnTooltip(const browser: ICefBrowser; var text: ustring): Boolean; +begin + Result := False; + + if Assigned(FOnTooltip) then FOnTooltip(Self, browser, text, Result); +end; + +procedure TChromium.doOnUpdateDragCursor(const browser: ICefBrowser; operation: TCefDragOperation); +begin + if Assigned(FOnUpdateDragCursor) then FOnUpdateDragCursor(Self, browser, operation); +end; + +function TChromium.GetParentForm : TCustomForm; +var + TempComp : TComponent; +begin + Result := nil; + TempComp := Owner; + + while (TempComp <> nil) do + if (TempComp is TCustomForm) then + begin + Result := TCustomForm(TempComp); + exit; + end + else + TempComp := TempComp.owner; +end; + +procedure TChromium.MoveFormTo(const x, y: Integer); +var + TempForm : TCustomForm; + TempRect : TRect; +begin + TempForm := GetParentForm; + + if (TempForm <> nil) then + begin + TempRect.Left := min(max(x, max(screen.DesktopLeft, 0)), screen.DesktopWidth - TempForm.Width); + TempRect.Top := min(max(y, max(screen.DesktopTop, 0)), screen.DesktopHeight - TempForm.Height); + TempRect.Width := TempForm.Width; + TempRect.Height := TempForm.Height; + + TempForm.SetBounds(TempRect.Left, TempRect.Top, TempRect.Width, TempRect.Height); + end; +end; + +procedure TChromium.MoveFormBy(const x, y: Integer); +var + TempForm : TCustomForm; + TempRect : TRect; +begin + TempForm := GetParentForm; + + if (TempForm <> nil) then + begin + TempRect.Left := min(max(TempForm.Left + x, max(screen.DesktopLeft, 0)), screen.DesktopWidth - TempForm.Width); + TempRect.Top := min(max(TempForm.Top + y, max(screen.DesktopTop, 0)), screen.DesktopHeight - TempForm.Height); + TempRect.Width := TempForm.Width; + TempRect.Height := TempForm.Height; + + TempForm.SetBounds(TempRect.Left, TempRect.Top, TempRect.Width, TempRect.Height); + end; +end; + +procedure TChromium.ResizeFormWidthTo(const x : Integer); +var + TempForm : TCustomForm; + TempX, TempDeltaX : integer; +begin + TempForm := GetParentForm; + + if (TempForm <> nil) then + begin + TempX := max(x, 100); + TempDeltaX := TempForm.Width - TempForm.ClientWidth; + TempForm.Width := TempX + TempDeltaX; + end; +end; + +procedure TChromium.ResizeFormHeightTo(const y : Integer); +var + TempForm : TCustomForm; + TempY, TempDeltaY : integer; +begin + TempForm := GetParentForm; + + if (TempForm <> nil) then + begin + TempY := max(y, 100); + TempDeltaY := TempForm.Height - TempForm.ClientHeight; + TempForm.Height := TempY + TempDeltaY; + end; +end; + +procedure TChromium.SetFormLeftTo(const x : Integer); +var + TempForm : TCustomForm; +begin + TempForm := GetParentForm; + + if (TempForm <> nil) then + TempForm.Left := min(max(x, max(screen.DesktopLeft, 0)), screen.DesktopWidth - TempForm.Width); +end; + +procedure TChromium.SetFormTopTo(const y : Integer); +var + TempForm : TCustomForm; +begin + TempForm := GetParentForm; + + if (TempForm <> nil) then + TempForm.Top := min(max(y, max(screen.DesktopTop, 0)), screen.DesktopHeight - TempForm.Height); +end; + +procedure TChromium.WasResized; +begin + if Initialized then FBrowser.Host.WasResized; +end; + +procedure TChromium.WasHidden(hidden: Boolean); +begin + if Initialized then FBrowser.Host.WasHidden(hidden); +end; + +procedure TChromium.NotifyScreenInfoChanged; +begin + if Initialized then FBrowser.Host.NotifyScreenInfoChanged; +end; + +procedure TChromium.Invalidate(kind: TCefPaintElementType); +begin + if Initialized then FBrowser.Host.Invalidate(kind); +end; + +procedure TChromium.SendKeyEvent(const event: PCefKeyEvent); +begin + if Initialized then FBrowser.Host.SendKeyEvent(event); +end; + +procedure TChromium.SendMouseClickEvent(const event : PCefMouseEvent; + kind : TCefMouseButtonType; + mouseUp : Boolean; + clickCount : Integer); +begin + if Initialized then FBrowser.Host.SendMouseClickEvent(event, kind, mouseUp, clickCount); +end; + +procedure TChromium.SendMouseMoveEvent(const event: PCefMouseEvent; mouseLeave: Boolean); +begin + if Initialized then FBrowser.Host.SendMouseMoveEvent(event, mouseLeave); +end; + +procedure TChromium.SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer); +begin + if Initialized then FBrowser.Host.SendMouseWheelEvent(event, deltaX, deltaY); +end; + +procedure TChromium.SendFocusEvent(setFocus: Boolean); +begin + if Initialized then FBrowser.Host.SendFocusEvent(setFocus); +end; + +procedure TChromium.SendCaptureLostEvent; +begin + if Initialized then FBrowser.Host.SendCaptureLostEvent; +end; + +procedure TChromium.SetFocus(focus: Boolean); +begin + if Initialized then FBrowser.Host.SetFocus(focus); +end; + +end. diff --git a/uCEFChromiumEvents.pas b/source/uCEFChromiumEvents.pas similarity index 99% rename from uCEFChromiumEvents.pas rename to source/uCEFChromiumEvents.pas index 53cd729d..a971b0dd 100644 --- a/uCEFChromiumEvents.pas +++ b/source/uCEFChromiumEvents.pas @@ -1,124 +1,124 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFChromiumEvents; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFTypes, uCEFInterfaces; - -type - TOnTextResultAvailableEvent = procedure(Sender: TObject; const aText : string) of object; - TOnPdfPrintFinishedEvent = procedure(Sender: TObject; aResultOK : boolean) of object; - TOnCookiesDeletedEvent = procedure(Sender: TObject; numDeleted : integer) of object; - TOnDocumentAvailableEvent = procedure(Sender: TObject; const aDocument : ICefDomDocument) of object; - TOnProcessMessageReceived = procedure(Sender: TObject; const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage; out Result: Boolean) of object; - TOnLoadingStateChange = procedure(Sender: TObject; const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean) of object; - TOnLoadStart = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType) of object; - TOnLoadEnd = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer) of object; - TOnLoadError = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring) of object; - TOnTakeFocus = procedure(Sender: TObject; const browser: ICefBrowser; next: Boolean) of object; - TOnSetFocus = procedure(Sender: TObject; const browser: ICefBrowser; source: TCefFocusSource; out Result: Boolean) of object; - TOnGotFocus = procedure(Sender: TObject; const browser: ICefBrowser) of object; - TOnBeforeContextMenu = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel) of object; - TOnContextMenuCommand = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags; out Result: Boolean) of object; - TOnContextMenuDismissed = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame) of object; - TOnPreKeyEvent = procedure(Sender: TObject; const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle; out isKeyboardShortcut: Boolean; out Result: Boolean) of object; - TOnKeyEvent = procedure(Sender: TObject; const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle; out Result: Boolean) of object; - TOnAddressChange = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const url: ustring) of object; - TOnTitleChange = procedure(Sender: TObject; const browser: ICefBrowser; const title: ustring) of object; - TOnFavIconUrlChange = procedure(Sender: TObject; const browser: ICefBrowser; const iconUrls: TStrings) of object; - TOnFullScreenModeChange = procedure(Sender: TObject; const browser: ICefBrowser; fullscreen: Boolean) of object; - TOnTooltip = procedure(Sender: TObject; const browser: ICefBrowser; var text: ustring; out Result: Boolean) of object; - TOnStatusMessage = procedure(Sender: TObject; const browser: ICefBrowser; const value: ustring) of object; - TOnConsoleMessage = procedure(Sender: TObject; const browser: ICefBrowser; const message, source: ustring; line: Integer; out Result: Boolean) of object; - TOnBeforeDownload = procedure(Sender: TObject; const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback) of object; - TOnDownloadUpdated = procedure(Sender: TObject; const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback) of object; - TOnRequestGeolocationPermission = procedure(Sender: TObject; const browser: ICefBrowser; const requestingUrl: ustring; requestId: Integer; const callback: ICefGeolocationCallback; out Result: Boolean) of object; - TOnCancelGeolocationPermission = procedure(Sender: TObject; const browser: ICefBrowser; requestId: Integer) of object; - TOnJsdialog = procedure(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean; out Result: Boolean) of object; - TOnBeforeUnloadDialog = procedure(Sender: TObject; const browser: ICefBrowser; const messageText: ustring; isReload: Boolean; const callback: ICefJsDialogCallback; out Result: Boolean) of object; - TOnResetDialogState = procedure(Sender: TObject; const browser: ICefBrowser) of object; - TOnDialogClosed = procedure(Sender: TObject; const browser: ICefBrowser) of object; - TOnBeforePopup = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; var popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var noJavascriptAccess: Boolean; out Result: Boolean) of object; - TOnAfterCreated = procedure(Sender: TObject; const browser: ICefBrowser) of object; - TOnBeforeClose = procedure(Sender: TObject; const browser: ICefBrowser) of object; - TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; out Result: Boolean) of object; - TOnBeforeBrowse = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; isRedirect: Boolean; out Result: Boolean) of object; - TOnOpenUrlFromTab = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; out Result: Boolean) of Object; - TOnBeforeResourceLoad = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const callback: ICefRequestCallback; out Result: TCefReturnValue) of object; - TOnGetResourceHandler = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; out Result: ICefResourceHandler) of object; - TOnResourceRedirect = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring) of object; - TOnResourceResponse = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; out Result: Boolean) of Object; - TOnGetResourceResponseFilter = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; out Result: ICefResponseFilter) of object; - TOnResourceLoadComplete = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; status: TCefUrlRequestStatus; receivedContentLength: Int64) of object; - TOnGetAuthCredentials = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; isProxy: Boolean; const host: ustring; port: Integer; const realm, scheme: ustring; const callback: ICefAuthCallback; out Result: Boolean) of object; - TOnQuotaRequest = procedure(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefRequestCallback; out Result: Boolean) of object; - TOnProtocolExecution = procedure(Sender: TObject; const browser: ICefBrowser; const url: ustring; out allowOsExecution: Boolean) of object; - TOnCertificateError = procedure(Sender: TObject; const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefRequestCallback; out Result: Boolean) of Object; - TOnSelectClientCertificate = procedure(Sender: TObject; const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback; var aResult : boolean) of object; - TOnPluginCrashed = procedure(Sender: TObject; const browser: ICefBrowser; const pluginPath: ustring) of object; - TOnRenderViewReady = procedure(Sender: Tobject; const browser: ICefBrowser) of Object; - TOnRenderProcessTerminated = procedure(Sender: TObject; const browser: ICefBrowser; status: TCefTerminationStatus) of object; - TOnFileDialog = procedure(Sender: TObject; const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback; out Result: Boolean) of Object; - TOnGetRootScreenRect = procedure(Sender: TObject; const browser: ICefBrowser; rect: PCefRect; out Result: Boolean) of Object; - TOnGetViewRect = procedure(Sender: TObject; const browser: ICefBrowser; rect: PCefRect; out Result: Boolean) of Object; - TOnGetScreenPoint = procedure(Sender: TObject; const browser: ICefBrowser; viewX, viewY: Integer; screenX, screenY: PInteger; out Result: Boolean) of Object; - TOnGetScreenInfo = procedure(Sender: TObject; const browser: ICefBrowser; screenInfo: PCefScreenInfo; Result: Boolean) of Object; - TOnPopupShow = procedure(Sender: TObject; const browser: ICefBrowser; show: Boolean) of Object; - TOnPopupSize = procedure(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect) of Object; - TOnPaint = procedure(Sender: TObject; const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer) of Object; - TOnCursorChange = procedure(Sender: TObject; const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo) of Object; - TOnStartDragging = procedure(Sender: TObject; const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer; out Result: Boolean) of Object; - TOnUpdateDragCursor = procedure(Sender: TObject; const browser: ICefBrowser; operation: TCefDragOperation) of Object; - TOnScrollOffsetChanged = procedure(Sender: TObject; const browser: ICefBrowser; x, y: Double) of Object; - TOnIMECompositionRangeChanged = procedure(Sender: TObject; const browser: ICefBrowser; const selected_range: PCefRange; character_boundsCount: NativeUInt; const character_bounds: PCefRect) of Object; - TOnDragEnter = procedure(Sender: TObject; const browser: ICefBrowser; const dragData: ICefDragData; mask: TCefDragOperations; out Result: Boolean) of Object; - TOnDraggableRegionsChanged = procedure(Sender: TObject; const browser: ICefBrowser; regionsCount: NativeUInt; regions: PCefDraggableRegionArray)of Object; - TOnFindResult = procedure(Sender: TObject; const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean) of Object; - - -implementation - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFChromiumEvents; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFTypes, uCEFInterfaces; + +type + TOnTextResultAvailableEvent = procedure(Sender: TObject; const aText : string) of object; + TOnPdfPrintFinishedEvent = procedure(Sender: TObject; aResultOK : boolean) of object; + TOnCookiesDeletedEvent = procedure(Sender: TObject; numDeleted : integer) of object; + TOnDocumentAvailableEvent = procedure(Sender: TObject; const aDocument : ICefDomDocument) of object; + TOnProcessMessageReceived = procedure(Sender: TObject; const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage; out Result: Boolean) of object; + TOnLoadingStateChange = procedure(Sender: TObject; const browser: ICefBrowser; isLoading, canGoBack, canGoForward: Boolean) of object; + TOnLoadStart = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; transitionType: TCefTransitionType) of object; + TOnLoadEnd = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer) of object; + TOnLoadError = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; errorCode: Integer; const errorText, failedUrl: ustring) of object; + TOnTakeFocus = procedure(Sender: TObject; const browser: ICefBrowser; next: Boolean) of object; + TOnSetFocus = procedure(Sender: TObject; const browser: ICefBrowser; source: TCefFocusSource; out Result: Boolean) of object; + TOnGotFocus = procedure(Sender: TObject; const browser: ICefBrowser) of object; + TOnBeforeContextMenu = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel) of object; + TOnContextMenuCommand = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags; out Result: Boolean) of object; + TOnContextMenuDismissed = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame) of object; + TOnPreKeyEvent = procedure(Sender: TObject; const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle; out isKeyboardShortcut: Boolean; out Result: Boolean) of object; + TOnKeyEvent = procedure(Sender: TObject; const browser: ICefBrowser; const event: PCefKeyEvent; osEvent: TCefEventHandle; out Result: Boolean) of object; + TOnAddressChange = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const url: ustring) of object; + TOnTitleChange = procedure(Sender: TObject; const browser: ICefBrowser; const title: ustring) of object; + TOnFavIconUrlChange = procedure(Sender: TObject; const browser: ICefBrowser; const iconUrls: TStrings) of object; + TOnFullScreenModeChange = procedure(Sender: TObject; const browser: ICefBrowser; fullscreen: Boolean) of object; + TOnTooltip = procedure(Sender: TObject; const browser: ICefBrowser; var text: ustring; out Result: Boolean) of object; + TOnStatusMessage = procedure(Sender: TObject; const browser: ICefBrowser; const value: ustring) of object; + TOnConsoleMessage = procedure(Sender: TObject; const browser: ICefBrowser; const message, source: ustring; line: Integer; out Result: Boolean) of object; + TOnBeforeDownload = procedure(Sender: TObject; const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback) of object; + TOnDownloadUpdated = procedure(Sender: TObject; const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback) of object; + TOnRequestGeolocationPermission = procedure(Sender: TObject; const browser: ICefBrowser; const requestingUrl: ustring; requestId: Integer; const callback: ICefGeolocationCallback; out Result: Boolean) of object; + TOnCancelGeolocationPermission = procedure(Sender: TObject; const browser: ICefBrowser; requestId: Integer) of object; + TOnJsdialog = procedure(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; dialogType: TCefJsDialogType; const messageText, defaultPromptText: ustring; const callback: ICefJsDialogCallback; out suppressMessage: Boolean; out Result: Boolean) of object; + TOnBeforeUnloadDialog = procedure(Sender: TObject; const browser: ICefBrowser; const messageText: ustring; isReload: Boolean; const callback: ICefJsDialogCallback; out Result: Boolean) of object; + TOnResetDialogState = procedure(Sender: TObject; const browser: ICefBrowser) of object; + TOnDialogClosed = procedure(Sender: TObject; const browser: ICefBrowser) of object; + TOnBeforePopup = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl, targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; var popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo; var client: ICefClient; var settings: TCefBrowserSettings; var noJavascriptAccess: Boolean; out Result: Boolean) of object; + TOnAfterCreated = procedure(Sender: TObject; const browser: ICefBrowser) of object; + TOnBeforeClose = procedure(Sender: TObject; const browser: ICefBrowser) of object; + TOnClose = procedure(Sender: TObject; const browser: ICefBrowser; out Result: Boolean) of object; + TOnBeforeBrowse = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; isRedirect: Boolean; out Result: Boolean) of object; + TOnOpenUrlFromTab = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; out Result: Boolean) of Object; + TOnBeforeResourceLoad = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const callback: ICefRequestCallback; out Result: TCefReturnValue) of object; + TOnGetResourceHandler = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; out Result: ICefResourceHandler) of object; + TOnResourceRedirect = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; var newUrl: ustring) of object; + TOnResourceResponse = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; out Result: Boolean) of Object; + TOnGetResourceResponseFilter = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; out Result: ICefResponseFilter) of object; + TOnResourceLoadComplete = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; status: TCefUrlRequestStatus; receivedContentLength: Int64) of object; + TOnGetAuthCredentials = procedure(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; isProxy: Boolean; const host: ustring; port: Integer; const realm, scheme: ustring; const callback: ICefAuthCallback; out Result: Boolean) of object; + TOnQuotaRequest = procedure(Sender: TObject; const browser: ICefBrowser; const originUrl: ustring; newSize: Int64; const callback: ICefRequestCallback; out Result: Boolean) of object; + TOnProtocolExecution = procedure(Sender: TObject; const browser: ICefBrowser; const url: ustring; out allowOsExecution: Boolean) of object; + TOnCertificateError = procedure(Sender: TObject; const browser: ICefBrowser; certError: TCefErrorcode; const requestUrl: ustring; const sslInfo: ICefSslInfo; const callback: ICefRequestCallback; out Result: Boolean) of Object; + TOnSelectClientCertificate = procedure(Sender: TObject; const browser: ICefBrowser; isProxy: boolean; const host: ustring; port: integer; certificatesCount: NativeUInt; const certificates: TCefX509CertificateArray; const callback: ICefSelectClientCertificateCallback; var aResult : boolean) of object; + TOnPluginCrashed = procedure(Sender: TObject; const browser: ICefBrowser; const pluginPath: ustring) of object; + TOnRenderViewReady = procedure(Sender: Tobject; const browser: ICefBrowser) of Object; + TOnRenderProcessTerminated = procedure(Sender: TObject; const browser: ICefBrowser; status: TCefTerminationStatus) of object; + TOnFileDialog = procedure(Sender: TObject; const browser: ICefBrowser; mode: TCefFileDialogMode; const title, defaultFilePath: ustring; acceptFilters: TStrings; selectedAcceptFilter: Integer; const callback: ICefFileDialogCallback; out Result: Boolean) of Object; + TOnGetRootScreenRect = procedure(Sender: TObject; const browser: ICefBrowser; rect: PCefRect; out Result: Boolean) of Object; + TOnGetViewRect = procedure(Sender: TObject; const browser: ICefBrowser; rect: PCefRect; out Result: Boolean) of Object; + TOnGetScreenPoint = procedure(Sender: TObject; const browser: ICefBrowser; viewX, viewY: Integer; screenX, screenY: PInteger; out Result: Boolean) of Object; + TOnGetScreenInfo = procedure(Sender: TObject; const browser: ICefBrowser; screenInfo: PCefScreenInfo; Result: Boolean) of Object; + TOnPopupShow = procedure(Sender: TObject; const browser: ICefBrowser; show: Boolean) of Object; + TOnPopupSize = procedure(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect) of Object; + TOnPaint = procedure(Sender: TObject; const browser: ICefBrowser; kind: TCefPaintElementType; dirtyRectsCount: NativeUInt; const dirtyRects: PCefRectArray; const buffer: Pointer; width, height: Integer) of Object; + TOnCursorChange = procedure(Sender: TObject; const browser: ICefBrowser; cursor: TCefCursorHandle; cursorType: TCefCursorType; const customCursorInfo: PCefCursorInfo) of Object; + TOnStartDragging = procedure(Sender: TObject; const browser: ICefBrowser; const dragData: ICefDragData; allowedOps: TCefDragOperations; x, y: Integer; out Result: Boolean) of Object; + TOnUpdateDragCursor = procedure(Sender: TObject; const browser: ICefBrowser; operation: TCefDragOperation) of Object; + TOnScrollOffsetChanged = procedure(Sender: TObject; const browser: ICefBrowser; x, y: Double) of Object; + TOnIMECompositionRangeChanged = procedure(Sender: TObject; const browser: ICefBrowser; const selected_range: PCefRange; character_boundsCount: NativeUInt; const character_bounds: PCefRect) of Object; + TOnDragEnter = procedure(Sender: TObject; const browser: ICefBrowser; const dragData: ICefDragData; mask: TCefDragOperations; out Result: Boolean) of Object; + TOnDraggableRegionsChanged = procedure(Sender: TObject; const browser: ICefBrowser; regionsCount: NativeUInt; regions: PCefDraggableRegionArray)of Object; + TOnFindResult = procedure(Sender: TObject; const browser: ICefBrowser; identifier, count: Integer; const selectionRect: PCefRect; activeMatchOrdinal: Integer; finalUpdate: Boolean) of Object; + + +implementation + +end. diff --git a/uCEFChromiumFontOptions.pas b/source/uCEFChromiumFontOptions.pas similarity index 97% rename from uCEFChromiumFontOptions.pas rename to source/uCEFChromiumFontOptions.pas index 17645353..03ca8e1d 100644 --- a/uCEFChromiumFontOptions.pas +++ b/source/uCEFChromiumFontOptions.pas @@ -1,100 +1,100 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFChromiumFontOptions; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFTypes; - -type - TChromiumFontOptions = class(TPersistent) - protected - FStandardFontFamily : ustring; - FCursiveFontFamily : ustring; - FSansSerifFontFamily : ustring; - FMinimumLogicalFontSize : Integer; - FFantasyFontFamily : ustring; - FSerifFontFamily : ustring; - FDefaultFixedFontSize : Integer; - FDefaultFontSize : Integer; - FRemoteFontsDisabled : TCefState; - FFixedFontFamily : ustring; - FMinimumFontSize : Integer; - - public - constructor Create; virtual; - - published - property StandardFontFamily : ustring read FStandardFontFamily write FStandardFontFamily; - property FixedFontFamily : ustring read FFixedFontFamily write FFixedFontFamily; - property SerifFontFamily : ustring read FSerifFontFamily write FSerifFontFamily; - property SansSerifFontFamily : ustring read FSansSerifFontFamily write FSansSerifFontFamily; - property CursiveFontFamily : ustring read FCursiveFontFamily write FCursiveFontFamily; - property FantasyFontFamily : ustring read FFantasyFontFamily write FFantasyFontFamily; - property DefaultFontSize : Integer read FDefaultFontSize write FDefaultFontSize default 0; - property DefaultFixedFontSize : Integer read FDefaultFixedFontSize write FDefaultFixedFontSize default 0; - property MinimumFontSize : Integer read FMinimumFontSize write FMinimumFontSize default 0; - property MinimumLogicalFontSize : Integer read FMinimumLogicalFontSize write FMinimumLogicalFontSize default 0; - property RemoteFonts : TCefState read FRemoteFontsDisabled write FRemoteFontsDisabled default STATE_DEFAULT; - end; - -implementation - -constructor TChromiumFontOptions.Create; -begin - FStandardFontFamily := ''; - FCursiveFontFamily := ''; - FSansSerifFontFamily := ''; - FMinimumLogicalFontSize := 0; - FFantasyFontFamily := ''; - FSerifFontFamily := ''; - FDefaultFixedFontSize := 0; - FDefaultFontSize := 0; - FRemoteFontsDisabled := STATE_DEFAULT; - FFixedFontFamily := ''; - FMinimumFontSize := 0; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFChromiumFontOptions; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFTypes; + +type + TChromiumFontOptions = class(TPersistent) + protected + FStandardFontFamily : ustring; + FCursiveFontFamily : ustring; + FSansSerifFontFamily : ustring; + FMinimumLogicalFontSize : Integer; + FFantasyFontFamily : ustring; + FSerifFontFamily : ustring; + FDefaultFixedFontSize : Integer; + FDefaultFontSize : Integer; + FRemoteFontsDisabled : TCefState; + FFixedFontFamily : ustring; + FMinimumFontSize : Integer; + + public + constructor Create; virtual; + + published + property StandardFontFamily : ustring read FStandardFontFamily write FStandardFontFamily; + property FixedFontFamily : ustring read FFixedFontFamily write FFixedFontFamily; + property SerifFontFamily : ustring read FSerifFontFamily write FSerifFontFamily; + property SansSerifFontFamily : ustring read FSansSerifFontFamily write FSansSerifFontFamily; + property CursiveFontFamily : ustring read FCursiveFontFamily write FCursiveFontFamily; + property FantasyFontFamily : ustring read FFantasyFontFamily write FFantasyFontFamily; + property DefaultFontSize : Integer read FDefaultFontSize write FDefaultFontSize default 0; + property DefaultFixedFontSize : Integer read FDefaultFixedFontSize write FDefaultFixedFontSize default 0; + property MinimumFontSize : Integer read FMinimumFontSize write FMinimumFontSize default 0; + property MinimumLogicalFontSize : Integer read FMinimumLogicalFontSize write FMinimumLogicalFontSize default 0; + property RemoteFonts : TCefState read FRemoteFontsDisabled write FRemoteFontsDisabled default STATE_DEFAULT; + end; + +implementation + +constructor TChromiumFontOptions.Create; +begin + FStandardFontFamily := ''; + FCursiveFontFamily := ''; + FSansSerifFontFamily := ''; + FMinimumLogicalFontSize := 0; + FFantasyFontFamily := ''; + FSerifFontFamily := ''; + FDefaultFixedFontSize := 0; + FDefaultFontSize := 0; + FRemoteFontsDisabled := STATE_DEFAULT; + FFixedFontFamily := ''; + FMinimumFontSize := 0; +end; + +end. diff --git a/uCEFChromiumOptions.pas b/source/uCEFChromiumOptions.pas similarity index 98% rename from uCEFChromiumOptions.pas rename to source/uCEFChromiumOptions.pas index 7a2c3072..353c4d87 100644 --- a/uCEFChromiumOptions.pas +++ b/source/uCEFChromiumOptions.pas @@ -1,129 +1,129 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFChromiumOptions; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFTypes; - -type - TChromiumOptions = class(TPersistent) - protected - FWindowlessFrameRate : Integer; - FJavascript : TCefState; - FJavascriptOpenWindows : TCefState; - FJavascriptCloseWindows : TCefState; - FJavascriptAccessClipboard : TCefState; - FJavascriptDomPaste : TCefState; - FCaretBrowsing : TCefState; - FPlugins : TCefState; - FUniversalAccessFromFileUrls : TCefState; - FFileAccessFromFileUrls : TCefState; - FWebSecurity : TCefState; - FImageLoading : TCefState; - FImageShrinkStandaloneToFit : TCefState; - FTextAreaResize : TCefState; - FTabToLinks : TCefState; - FLocalStorage : TCefState; - FDatabases : TCefState; - FApplicationCache : TCefState; - FWebgl : TCefState; - FBackgroundColor : TCefColor; - FAcceptLanguageList : ustring; - - public - constructor Create; virtual; - - published - property Javascript : TCefState read FJavascript write FJavascript default STATE_DEFAULT; - property JavascriptOpenWindows : TCefState read FJavascriptOpenWindows write FJavascriptOpenWindows default STATE_DEFAULT; - property JavascriptCloseWindows : TCefState read FJavascriptCloseWindows write FJavascriptCloseWindows default STATE_DEFAULT; - property JavascriptAccessClipboard : TCefState read FJavascriptAccessClipboard write FJavascriptAccessClipboard default STATE_DEFAULT; - property JavascriptDomPaste : TCefState read FJavascriptDomPaste write FJavascriptDomPaste default STATE_DEFAULT; - property CaretBrowsing : TCefState read FCaretBrowsing write FCaretBrowsing default STATE_DEFAULT; - property Plugins : TCefState read FPlugins write FPlugins default STATE_DEFAULT; - property UniversalAccessFromFileUrls : TCefState read FUniversalAccessFromFileUrls write FUniversalAccessFromFileUrls default STATE_DEFAULT; - property FileAccessFromFileUrls : TCefState read FFileAccessFromFileUrls write FFileAccessFromFileUrls default STATE_DEFAULT; - property WebSecurity : TCefState read FWebSecurity write FWebSecurity default STATE_DEFAULT; - property ImageLoading : TCefState read FImageLoading write FImageLoading default STATE_DEFAULT; - property ImageShrinkStandaloneToFit : TCefState read FImageShrinkStandaloneToFit write FImageShrinkStandaloneToFit default STATE_DEFAULT; - property TextAreaResize : TCefState read FTextAreaResize write FTextAreaResize default STATE_DEFAULT; - property TabToLinks : TCefState read FTabToLinks write FTabToLinks default STATE_DEFAULT; - property LocalStorage : TCefState read FLocalStorage write FLocalStorage default STATE_DEFAULT; - property Databases : TCefState read FDatabases write FDatabases default STATE_DEFAULT; - property ApplicationCache : TCefState read FApplicationCache write FApplicationCache default STATE_DEFAULT; - property Webgl : TCefState read FWebgl write FWebgl default STATE_DEFAULT; - property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor default 0; - property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList; - property WindowlessFrameRate : Integer read FWindowlessFrameRate write FWindowlessFrameRate default 30; - end; - -implementation - -constructor TChromiumOptions.Create; -begin - FWindowlessFrameRate := 30; - FJavascript := STATE_DEFAULT; - FJavascriptOpenWindows := STATE_DEFAULT; - FJavascriptCloseWindows := STATE_DEFAULT; - FJavascriptAccessClipboard := STATE_DEFAULT; - FJavascriptDomPaste := STATE_DEFAULT; - FCaretBrowsing := STATE_DEFAULT; - FPlugins := STATE_DEFAULT; - FUniversalAccessFromFileUrls := STATE_DEFAULT; - FFileAccessFromFileUrls := STATE_DEFAULT; - FWebSecurity := STATE_DEFAULT; - FImageLoading := STATE_DEFAULT; - FImageShrinkStandaloneToFit := STATE_DEFAULT; - FTextAreaResize := STATE_DEFAULT; - FTabToLinks := STATE_DEFAULT; - FLocalStorage := STATE_DEFAULT; - FDatabases := STATE_DEFAULT; - FApplicationCache := STATE_DEFAULT; - FWebgl := STATE_DEFAULT; - FBackgroundColor := 0; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFChromiumOptions; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFTypes; + +type + TChromiumOptions = class(TPersistent) + protected + FWindowlessFrameRate : Integer; + FJavascript : TCefState; + FJavascriptOpenWindows : TCefState; + FJavascriptCloseWindows : TCefState; + FJavascriptAccessClipboard : TCefState; + FJavascriptDomPaste : TCefState; + FCaretBrowsing : TCefState; + FPlugins : TCefState; + FUniversalAccessFromFileUrls : TCefState; + FFileAccessFromFileUrls : TCefState; + FWebSecurity : TCefState; + FImageLoading : TCefState; + FImageShrinkStandaloneToFit : TCefState; + FTextAreaResize : TCefState; + FTabToLinks : TCefState; + FLocalStorage : TCefState; + FDatabases : TCefState; + FApplicationCache : TCefState; + FWebgl : TCefState; + FBackgroundColor : TCefColor; + FAcceptLanguageList : ustring; + + public + constructor Create; virtual; + + published + property Javascript : TCefState read FJavascript write FJavascript default STATE_DEFAULT; + property JavascriptOpenWindows : TCefState read FJavascriptOpenWindows write FJavascriptOpenWindows default STATE_DEFAULT; + property JavascriptCloseWindows : TCefState read FJavascriptCloseWindows write FJavascriptCloseWindows default STATE_DEFAULT; + property JavascriptAccessClipboard : TCefState read FJavascriptAccessClipboard write FJavascriptAccessClipboard default STATE_DEFAULT; + property JavascriptDomPaste : TCefState read FJavascriptDomPaste write FJavascriptDomPaste default STATE_DEFAULT; + property CaretBrowsing : TCefState read FCaretBrowsing write FCaretBrowsing default STATE_DEFAULT; + property Plugins : TCefState read FPlugins write FPlugins default STATE_DEFAULT; + property UniversalAccessFromFileUrls : TCefState read FUniversalAccessFromFileUrls write FUniversalAccessFromFileUrls default STATE_DEFAULT; + property FileAccessFromFileUrls : TCefState read FFileAccessFromFileUrls write FFileAccessFromFileUrls default STATE_DEFAULT; + property WebSecurity : TCefState read FWebSecurity write FWebSecurity default STATE_DEFAULT; + property ImageLoading : TCefState read FImageLoading write FImageLoading default STATE_DEFAULT; + property ImageShrinkStandaloneToFit : TCefState read FImageShrinkStandaloneToFit write FImageShrinkStandaloneToFit default STATE_DEFAULT; + property TextAreaResize : TCefState read FTextAreaResize write FTextAreaResize default STATE_DEFAULT; + property TabToLinks : TCefState read FTabToLinks write FTabToLinks default STATE_DEFAULT; + property LocalStorage : TCefState read FLocalStorage write FLocalStorage default STATE_DEFAULT; + property Databases : TCefState read FDatabases write FDatabases default STATE_DEFAULT; + property ApplicationCache : TCefState read FApplicationCache write FApplicationCache default STATE_DEFAULT; + property Webgl : TCefState read FWebgl write FWebgl default STATE_DEFAULT; + property BackgroundColor : TCefColor read FBackgroundColor write FBackgroundColor default 0; + property AcceptLanguageList : ustring read FAcceptLanguageList write FAcceptLanguageList; + property WindowlessFrameRate : Integer read FWindowlessFrameRate write FWindowlessFrameRate default 30; + end; + +implementation + +constructor TChromiumOptions.Create; +begin + FWindowlessFrameRate := 30; + FJavascript := STATE_DEFAULT; + FJavascriptOpenWindows := STATE_DEFAULT; + FJavascriptCloseWindows := STATE_DEFAULT; + FJavascriptAccessClipboard := STATE_DEFAULT; + FJavascriptDomPaste := STATE_DEFAULT; + FCaretBrowsing := STATE_DEFAULT; + FPlugins := STATE_DEFAULT; + FUniversalAccessFromFileUrls := STATE_DEFAULT; + FFileAccessFromFileUrls := STATE_DEFAULT; + FWebSecurity := STATE_DEFAULT; + FImageLoading := STATE_DEFAULT; + FImageShrinkStandaloneToFit := STATE_DEFAULT; + FTextAreaResize := STATE_DEFAULT; + FTabToLinks := STATE_DEFAULT; + FLocalStorage := STATE_DEFAULT; + FDatabases := STATE_DEFAULT; + FApplicationCache := STATE_DEFAULT; + FWebgl := STATE_DEFAULT; + FBackgroundColor := 0; +end; + +end. diff --git a/uCEFChromiumWindow.pas b/source/uCEFChromiumWindow.pas similarity index 96% rename from uCEFChromiumWindow.pas rename to source/uCEFChromiumWindow.pas index 7a8d528d..9392e3e6 100644 --- a/uCEFChromiumWindow.pas +++ b/source/uCEFChromiumWindow.pas @@ -1,136 +1,136 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFChromiumWindow; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - WinApi.Windows, System.Classes, WinApi.Messages, - uCEFWindowParent, uCEFChromium, uCEFInterfaces, uCEFConstants; - -type - TChromiumWindow = class(TCEFWindowParent) - protected - FChromium : TChromium; - FOnClose : TNotifyEvent; - - function GetChildWindowHandle : THandle; override; - - procedure OnCloseMsg(var aMessage : TMessage); message CEF_DOONCLOSE; - - procedure WebBrowser_OnClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean); - - public - constructor Create(AOwner: TComponent); override; - procedure AfterConstruction; override; - procedure CreateBrowser; - procedure CloseBrowser(aForceClose : boolean); - procedure LoadURL(const aURL : string); - - property ChromiumBrowser : TChromium read FChromium; - - published - property OnClose : TNotifyEvent read FOnClose write FOnClose; - end; - -implementation - -uses - System.SysUtils; - -constructor TChromiumWindow.Create(AOwner: TComponent); -begin - inherited Create(AOwner); - - FChromium := nil; - FOnClose := nil; -end; - -procedure TChromiumWindow.AfterConstruction; -begin - inherited AfterConstruction; - - if not(csDesigning in ComponentState) then - begin - FChromium := TChromium.Create(self); - FChromium.OnClose := WebBrowser_OnClose; - end; -end; - -function TChromiumWindow.GetChildWindowHandle : THandle; -begin - if (FChromium <> nil) then - Result := FChromium.WindowHandle - else - Result := 0; -end; - -procedure TChromiumWindow.WebBrowser_OnClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean); -begin - PostMessage(self.Handle, CEF_DOONCLOSE, 0, 0); - Result := True; -end; - -procedure TChromiumWindow.OnCloseMsg(var aMessage : TMessage); -begin - if assigned(FOnClose) then FOnClose(self); -end; - -procedure TChromiumWindow.CreateBrowser; -begin - if not(csDesigning in ComponentState) and (FChromium <> nil) then - FChromium.CreateBrowser(self, ''); -end; - -procedure TChromiumWindow.CloseBrowser(aForceClose : boolean); -begin - if (FChromium <> nil) then FChromium.CloseBrowser(aForceClose); -end; - -procedure TChromiumWindow.LoadURL(const aURL : string); -begin - if not(csDesigning in ComponentState) and (FChromium <> nil) then - FChromium.LoadURL(aURL); -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFChromiumWindow; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + WinApi.Windows, System.Classes, WinApi.Messages, + uCEFWindowParent, uCEFChromium, uCEFInterfaces, uCEFConstants; + +type + TChromiumWindow = class(TCEFWindowParent) + protected + FChromium : TChromium; + FOnClose : TNotifyEvent; + + function GetChildWindowHandle : THandle; override; + + procedure OnCloseMsg(var aMessage : TMessage); message CEF_DOONCLOSE; + + procedure WebBrowser_OnClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean); + + public + constructor Create(AOwner: TComponent); override; + procedure AfterConstruction; override; + procedure CreateBrowser; + procedure CloseBrowser(aForceClose : boolean); + procedure LoadURL(const aURL : string); + + property ChromiumBrowser : TChromium read FChromium; + + published + property OnClose : TNotifyEvent read FOnClose write FOnClose; + end; + +implementation + +uses + System.SysUtils; + +constructor TChromiumWindow.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FChromium := nil; + FOnClose := nil; +end; + +procedure TChromiumWindow.AfterConstruction; +begin + inherited AfterConstruction; + + if not(csDesigning in ComponentState) then + begin + FChromium := TChromium.Create(self); + FChromium.OnClose := WebBrowser_OnClose; + end; +end; + +function TChromiumWindow.GetChildWindowHandle : THandle; +begin + if (FChromium <> nil) then + Result := FChromium.WindowHandle + else + Result := 0; +end; + +procedure TChromiumWindow.WebBrowser_OnClose(Sender: TObject; const browser: ICefBrowser; out Result: Boolean); +begin + PostMessage(self.Handle, CEF_DOONCLOSE, 0, 0); + Result := True; +end; + +procedure TChromiumWindow.OnCloseMsg(var aMessage : TMessage); +begin + if assigned(FOnClose) then FOnClose(self); +end; + +procedure TChromiumWindow.CreateBrowser; +begin + if not(csDesigning in ComponentState) and (FChromium <> nil) then + FChromium.CreateBrowser(self, ''); +end; + +procedure TChromiumWindow.CloseBrowser(aForceClose : boolean); +begin + if (FChromium <> nil) then FChromium.CloseBrowser(aForceClose); +end; + +procedure TChromiumWindow.LoadURL(const aURL : string); +begin + if not(csDesigning in ComponentState) and (FChromium <> nil) then + FChromium.LoadURL(aURL); +end; + +end. diff --git a/uCEFClient.pas b/source/uCEFClient.pas similarity index 96% rename from uCEFClient.pas rename to source/uCEFClient.pas index e65239ac..f9d806e7 100644 --- a/uCEFClient.pas +++ b/source/uCEFClient.pas @@ -1,524 +1,524 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFClient; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - WinApi.Windows, - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefClientOwn = class(TCefBaseOwn, ICefClient) - protected - function GetContextMenuHandler: ICefContextMenuHandler; virtual; - function GetDialogHandler: ICefDialogHandler; virtual; - function GetDisplayHandler: ICefDisplayHandler; virtual; - function GetDownloadHandler: ICefDownloadHandler; virtual; - function GetDragHandler: ICefDragHandler; virtual; - function GetFindHandler: ICefFindHandler; virtual; - function GetFocusHandler: ICefFocusHandler; virtual; - function GetGeolocationHandler: ICefGeolocationHandler; virtual; - function GetJsdialogHandler: ICefJsdialogHandler; virtual; - function GetKeyboardHandler: ICefKeyboardHandler; virtual; - function GetLifeSpanHandler: ICefLifeSpanHandler; virtual; - function GetRenderHandler: ICefRenderHandler; virtual; - function GetLoadHandler: ICefLoadHandler; virtual; - function GetRequestHandler: ICefRequestHandler; virtual; - function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; virtual; - - public - constructor Create; virtual; - end; - - TCustomClientHandler = class(TCefClientOwn, ICefClientHandler) - protected - FEvents : IChromiumEvents; - FLoadHandler : ICefLoadHandler; - FFocusHandler : ICefFocusHandler; - FContextMenuHandler : ICefContextMenuHandler; - FDialogHandler : ICefDialogHandler; - FKeyboardHandler : ICefKeyboardHandler; - FDisplayHandler : ICefDisplayHandler; - FDownloadHandler : ICefDownloadHandler; - FGeolocationHandler : ICefGeolocationHandler; - FJsDialogHandler : ICefJsDialogHandler; - FLifeSpanHandler : ICefLifeSpanHandler; - FRenderHandler : ICefRenderHandler; - FRequestHandler : ICefRequestHandler; - FDragHandler : ICefDragHandler; - FFindHandler : ICefFindHandler; - - function GetContextMenuHandler: ICefContextMenuHandler; override; - function GetDialogHandler: ICefDialogHandler; override; - function GetDisplayHandler: ICefDisplayHandler; override; - function GetDownloadHandler: ICefDownloadHandler; override; - function GetDragHandler: ICefDragHandler; override; - function GetFindHandler: ICefFindHandler; override; - function GetFocusHandler: ICefFocusHandler; override; - function GetGeolocationHandler: ICefGeolocationHandler; override; - function GetJsdialogHandler: ICefJsdialogHandler; override; - function GetKeyboardHandler: ICefKeyboardHandler; override; - function GetLifeSpanHandler: ICefLifeSpanHandler; override; - function GetRenderHandler: ICefRenderHandler; override; - function GetLoadHandler: ICefLoadHandler; override; - function GetRequestHandler: ICefRequestHandler; override; - function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; override; - public - constructor Create(const events: IChromiumEvents; renderer: Boolean); reintroduce; virtual; - procedure Disconnect; - end; - - TVCLClientHandler = class(TCustomClientHandler) - protected - function GetMultithreadApp : boolean; - - public - constructor Create(const crm: IChromiumEvents; renderer: Boolean); reintroduce; - destructor Destroy; override; - procedure ReleaseOtherInstances; - - property MultithreadApp : boolean read GetMultithreadApp; - end; - -implementation - -uses - System.SysUtils, - uCEFMiscFunctions, uCEFLibFunctions, uCEFProcessMessage, uCEFBrowser, uCEFLoadHandler, - uCEFFocusHandler, uCEFContextMenuHandler, uCEFDialogHandler, uCEFKeyboardHandler, - uCEFDisplayHandler, uCEFDownloadHandler, uCEFGeolocationHandler, uCEFJsDialogHandler, - uCEFLifeSpanHandler, uCEFRequestHandler, uCEFRenderHandler, uCEFDragHandler, - uCEFFindHandler, uCEFConstants, uCEFApplication; - -var - looping : Boolean = False; - CefInstances : Integer = 0; - CefTimer : UINT = 0; - -function cef_client_get_context_menu_handler(self: PCefClient): PCefContextMenuHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetContextMenuHandler); -end; - -function cef_client_get_dialog_handler(self: PCefClient): PCefDialogHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetDialogHandler); -end; - -function cef_client_get_display_handler(self: PCefClient): PCefDisplayHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetDisplayHandler); -end; - -function cef_client_get_download_handler(self: PCefClient): PCefDownloadHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetDownloadHandler); -end; - -function cef_client_get_drag_handler(self: PCefClient): PCefDragHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetDragHandler); -end; - -function cef_client_get_find_handler(self: PCefClient): PCefFindHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetFindHandler); -end; - -function cef_client_get_focus_handler(self: PCefClient): PCefFocusHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetFocusHandler); -end; - -function cef_client_get_geolocation_handler(self: PCefClient): PCefGeolocationHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetGeolocationHandler); -end; - -function cef_client_get_jsdialog_handler(self: PCefClient): PCefJsDialogHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetJsdialogHandler); -end; - -function cef_client_get_keyboard_handler(self: PCefClient): PCefKeyboardHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetKeyboardHandler); -end; - -function cef_client_get_life_span_handler(self: PCefClient): PCefLifeSpanHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetLifeSpanHandler); -end; - -function cef_client_get_load_handler(self: PCefClient): PCefLoadHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetLoadHandler); -end; - -function cef_client_get_get_render_handler(self: PCefClient): PCefRenderHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetRenderHandler); -end; - -function cef_client_get_request_handler(self: PCefClient): PCefRequestHandler; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := CefGetData(GetRequestHandler); -end; - -function cef_client_on_process_message_received(self: PCefClient; browser: PCefBrowser; - source_process: TCefProcessId; message: PCefProcessMessage): Integer; stdcall; -begin - with TCefClientOwn(CefGetObject(self)) do - Result := Ord(OnProcessMessageReceived(TCefBrowserRef.UnWrap(browser), source_process, TCefProcessMessageRef.UnWrap(message))); -end; - -constructor TCefClientOwn.Create; -begin - inherited CreateData(SizeOf(TCefClient)); - - with PCefClient(FData)^ do - begin - get_context_menu_handler := cef_client_get_context_menu_handler; - get_dialog_handler := cef_client_get_dialog_handler; - get_display_handler := cef_client_get_display_handler; - get_download_handler := cef_client_get_download_handler; - get_drag_handler := cef_client_get_drag_handler; - get_find_handler := cef_client_get_find_handler; - get_focus_handler := cef_client_get_focus_handler; - get_geolocation_handler := cef_client_get_geolocation_handler; - get_jsdialog_handler := cef_client_get_jsdialog_handler; - get_keyboard_handler := cef_client_get_keyboard_handler; - get_life_span_handler := cef_client_get_life_span_handler; - get_load_handler := cef_client_get_load_handler; - get_render_handler := cef_client_get_get_render_handler; - get_request_handler := cef_client_get_request_handler; - on_process_message_received := cef_client_on_process_message_received; - end; -end; - -function TCefClientOwn.GetContextMenuHandler: ICefContextMenuHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetDialogHandler: ICefDialogHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetDisplayHandler: ICefDisplayHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetDownloadHandler: ICefDownloadHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetDragHandler: ICefDragHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetFindHandler: ICefFindHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetFocusHandler: ICefFocusHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetGeolocationHandler: ICefGeolocationHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetJsdialogHandler: ICefJsDialogHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetKeyboardHandler: ICefKeyboardHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetLifeSpanHandler: ICefLifeSpanHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetLoadHandler: ICefLoadHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetRenderHandler: ICefRenderHandler; -begin - Result := nil; -end; - -function TCefClientOwn.GetRequestHandler: ICefRequestHandler; -begin - Result := nil; -end; - -function TCefClientOwn.OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; -begin - Result := False; -end; - -// TCustomClientHandler - -constructor TCustomClientHandler.Create(const events: IChromiumEvents; renderer: Boolean); -begin - inherited Create; - - FEvents := events; - - FLoadHandler := TCustomLoadHandler.Create(events); - FFocusHandler := TCustomFocusHandler.Create(events); - FContextMenuHandler := TCustomContextMenuHandler.Create(events); - FDialogHandler := TCustomDialogHandler.Create(events); - FKeyboardHandler := TCustomKeyboardHandler.Create(events); - FDisplayHandler := TCustomDisplayHandler.Create(events); - FDownloadHandler := TCustomDownloadHandler.Create(events); - FGeolocationHandler := TCustomGeolocationHandler.Create(events); - FJsDialogHandler := TCustomJsDialogHandler.Create(events); - FLifeSpanHandler := TCustomLifeSpanHandler.Create(events); - FRequestHandler := TCustomRequestHandler.Create(events); - - if renderer then - FRenderHandler := TCustomRenderHandler.Create(events) - else - FRenderHandler := nil; - - FDragHandler := TCustomDragHandler.Create(events); - FFindHandler := TCustomFindHandler.Create(events); -end; - -procedure TCustomClientHandler.Disconnect; -begin - FEvents := nil; - FLoadHandler := nil; - FFocusHandler := nil; - FContextMenuHandler := nil; - FDialogHandler := nil; - FKeyboardHandler := nil; - FDisplayHandler := nil; - FDownloadHandler := nil; - FGeolocationHandler := nil; - FJsDialogHandler := nil; - FLifeSpanHandler := nil; - FRequestHandler := nil; - FRenderHandler := nil; - FDragHandler := nil; - FFindHandler := nil; -end; - -function TCustomClientHandler.GetContextMenuHandler: ICefContextMenuHandler; -begin - Result := FContextMenuHandler; -end; - -function TCustomClientHandler.GetDialogHandler: ICefDialogHandler; -begin - Result := FDialogHandler; -end; - -function TCustomClientHandler.GetDisplayHandler: ICefDisplayHandler; -begin - Result := FDisplayHandler; -end; - -function TCustomClientHandler.GetDownloadHandler: ICefDownloadHandler; -begin - Result := FDownloadHandler; -end; - -function TCustomClientHandler.GetDragHandler: ICefDragHandler; -begin - Result := FDragHandler; -end; - -function TCustomClientHandler.GetFindHandler: ICefFindHandler; -begin - Result := FFindHandler; -end; - -function TCustomClientHandler.GetFocusHandler: ICefFocusHandler; -begin - Result := FFocusHandler; -end; - -function TCustomClientHandler.GetGeolocationHandler: ICefGeolocationHandler; -begin - Result := FGeolocationHandler; -end; - -function TCustomClientHandler.GetJsdialogHandler: ICefJsDialogHandler; -begin - Result := FJsDialogHandler; -end; - -function TCustomClientHandler.GetKeyboardHandler: ICefKeyboardHandler; -begin - Result := FKeyboardHandler; -end; - -function TCustomClientHandler.GetLifeSpanHandler: ICefLifeSpanHandler; -begin - Result := FLifeSpanHandler; -end; - -function TCustomClientHandler.GetLoadHandler: ICefLoadHandler; -begin - Result := FLoadHandler; -end; - -function TCustomClientHandler.GetRenderHandler: ICefRenderHandler; -begin - Result := FRenderHandler; -end; - -function TCustomClientHandler.GetRequestHandler: ICefRequestHandler; -begin - Result := FRequestHandler; -end; - -function TCustomClientHandler.OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; -begin - if Assigned(FEvents) then - Result := FEvents.doOnProcessMessageReceived(browser, sourceProcess, message) - else - Result := False; -end; - -// TVCLClientHandler - -procedure TimerProc(hwnd: HWND; uMsg: UINT; idEvent: Pointer; dwTime: DWORD); stdcall; -begin - if looping then Exit; - - if (CefInstances > 0) then - begin - looping := True; - - try - cef_do_message_loop_work; - finally - looping := False; - end; - end; -end; - -constructor TVCLClientHandler.Create(const crm: IChromiumEvents; renderer : Boolean); -begin - inherited Create(crm, renderer); - - if not(MultithreadApp) then - begin - if (CefInstances = 0) then CefTimer := SetTimer(0, 0, USER_TIMER_MINIMUM, @TimerProc); - InterlockedIncrement(CefInstances); - end; -end; - -destructor TVCLClientHandler.Destroy; -begin - if not(MultithreadApp) then - begin - InterlockedDecrement(CefInstances); - if (CefInstances = 0) then KillTimer(0, CefTimer); - end; - - inherited Destroy; -end; - -procedure TVCLClientHandler.ReleaseOtherInstances; -var - i : integer; -begin - i := pred(self.FRefCount); - - while (i >= 1) do - begin - self._Release; - dec(i); - end; -end; - -function TVCLClientHandler.GetMultithreadApp : boolean; -begin - Result := True; - - try - if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.MultiThreadedMessageLoop; - except - on e : exception do - begin - {$IFDEF DEBUG} - OutputDebugString(PWideChar('TVCLClientHandler.GetMultithreadApp error: ' + e.Message + chr(0))); - {$ENDIF} - end; - end; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFClient; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + WinApi.Windows, + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefClientOwn = class(TCefBaseOwn, ICefClient) + protected + function GetContextMenuHandler: ICefContextMenuHandler; virtual; + function GetDialogHandler: ICefDialogHandler; virtual; + function GetDisplayHandler: ICefDisplayHandler; virtual; + function GetDownloadHandler: ICefDownloadHandler; virtual; + function GetDragHandler: ICefDragHandler; virtual; + function GetFindHandler: ICefFindHandler; virtual; + function GetFocusHandler: ICefFocusHandler; virtual; + function GetGeolocationHandler: ICefGeolocationHandler; virtual; + function GetJsdialogHandler: ICefJsdialogHandler; virtual; + function GetKeyboardHandler: ICefKeyboardHandler; virtual; + function GetLifeSpanHandler: ICefLifeSpanHandler; virtual; + function GetRenderHandler: ICefRenderHandler; virtual; + function GetLoadHandler: ICefLoadHandler; virtual; + function GetRequestHandler: ICefRequestHandler; virtual; + function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; virtual; + + public + constructor Create; virtual; + end; + + TCustomClientHandler = class(TCefClientOwn, ICefClientHandler) + protected + FEvents : IChromiumEvents; + FLoadHandler : ICefLoadHandler; + FFocusHandler : ICefFocusHandler; + FContextMenuHandler : ICefContextMenuHandler; + FDialogHandler : ICefDialogHandler; + FKeyboardHandler : ICefKeyboardHandler; + FDisplayHandler : ICefDisplayHandler; + FDownloadHandler : ICefDownloadHandler; + FGeolocationHandler : ICefGeolocationHandler; + FJsDialogHandler : ICefJsDialogHandler; + FLifeSpanHandler : ICefLifeSpanHandler; + FRenderHandler : ICefRenderHandler; + FRequestHandler : ICefRequestHandler; + FDragHandler : ICefDragHandler; + FFindHandler : ICefFindHandler; + + function GetContextMenuHandler: ICefContextMenuHandler; override; + function GetDialogHandler: ICefDialogHandler; override; + function GetDisplayHandler: ICefDisplayHandler; override; + function GetDownloadHandler: ICefDownloadHandler; override; + function GetDragHandler: ICefDragHandler; override; + function GetFindHandler: ICefFindHandler; override; + function GetFocusHandler: ICefFocusHandler; override; + function GetGeolocationHandler: ICefGeolocationHandler; override; + function GetJsdialogHandler: ICefJsdialogHandler; override; + function GetKeyboardHandler: ICefKeyboardHandler; override; + function GetLifeSpanHandler: ICefLifeSpanHandler; override; + function GetRenderHandler: ICefRenderHandler; override; + function GetLoadHandler: ICefLoadHandler; override; + function GetRequestHandler: ICefRequestHandler; override; + function OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; override; + public + constructor Create(const events: IChromiumEvents; renderer: Boolean); reintroduce; virtual; + procedure Disconnect; + end; + + TVCLClientHandler = class(TCustomClientHandler) + protected + function GetMultithreadApp : boolean; + + public + constructor Create(const crm: IChromiumEvents; renderer: Boolean); reintroduce; + destructor Destroy; override; + procedure ReleaseOtherInstances; + + property MultithreadApp : boolean read GetMultithreadApp; + end; + +implementation + +uses + System.SysUtils, + uCEFMiscFunctions, uCEFLibFunctions, uCEFProcessMessage, uCEFBrowser, uCEFLoadHandler, + uCEFFocusHandler, uCEFContextMenuHandler, uCEFDialogHandler, uCEFKeyboardHandler, + uCEFDisplayHandler, uCEFDownloadHandler, uCEFGeolocationHandler, uCEFJsDialogHandler, + uCEFLifeSpanHandler, uCEFRequestHandler, uCEFRenderHandler, uCEFDragHandler, + uCEFFindHandler, uCEFConstants, uCEFApplication; + +var + looping : Boolean = False; + CefInstances : Integer = 0; + CefTimer : UINT = 0; + +function cef_client_get_context_menu_handler(self: PCefClient): PCefContextMenuHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetContextMenuHandler); +end; + +function cef_client_get_dialog_handler(self: PCefClient): PCefDialogHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetDialogHandler); +end; + +function cef_client_get_display_handler(self: PCefClient): PCefDisplayHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetDisplayHandler); +end; + +function cef_client_get_download_handler(self: PCefClient): PCefDownloadHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetDownloadHandler); +end; + +function cef_client_get_drag_handler(self: PCefClient): PCefDragHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetDragHandler); +end; + +function cef_client_get_find_handler(self: PCefClient): PCefFindHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetFindHandler); +end; + +function cef_client_get_focus_handler(self: PCefClient): PCefFocusHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetFocusHandler); +end; + +function cef_client_get_geolocation_handler(self: PCefClient): PCefGeolocationHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetGeolocationHandler); +end; + +function cef_client_get_jsdialog_handler(self: PCefClient): PCefJsDialogHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetJsdialogHandler); +end; + +function cef_client_get_keyboard_handler(self: PCefClient): PCefKeyboardHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetKeyboardHandler); +end; + +function cef_client_get_life_span_handler(self: PCefClient): PCefLifeSpanHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetLifeSpanHandler); +end; + +function cef_client_get_load_handler(self: PCefClient): PCefLoadHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetLoadHandler); +end; + +function cef_client_get_get_render_handler(self: PCefClient): PCefRenderHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetRenderHandler); +end; + +function cef_client_get_request_handler(self: PCefClient): PCefRequestHandler; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := CefGetData(GetRequestHandler); +end; + +function cef_client_on_process_message_received(self: PCefClient; browser: PCefBrowser; + source_process: TCefProcessId; message: PCefProcessMessage): Integer; stdcall; +begin + with TCefClientOwn(CefGetObject(self)) do + Result := Ord(OnProcessMessageReceived(TCefBrowserRef.UnWrap(browser), source_process, TCefProcessMessageRef.UnWrap(message))); +end; + +constructor TCefClientOwn.Create; +begin + inherited CreateData(SizeOf(TCefClient)); + + with PCefClient(FData)^ do + begin + get_context_menu_handler := cef_client_get_context_menu_handler; + get_dialog_handler := cef_client_get_dialog_handler; + get_display_handler := cef_client_get_display_handler; + get_download_handler := cef_client_get_download_handler; + get_drag_handler := cef_client_get_drag_handler; + get_find_handler := cef_client_get_find_handler; + get_focus_handler := cef_client_get_focus_handler; + get_geolocation_handler := cef_client_get_geolocation_handler; + get_jsdialog_handler := cef_client_get_jsdialog_handler; + get_keyboard_handler := cef_client_get_keyboard_handler; + get_life_span_handler := cef_client_get_life_span_handler; + get_load_handler := cef_client_get_load_handler; + get_render_handler := cef_client_get_get_render_handler; + get_request_handler := cef_client_get_request_handler; + on_process_message_received := cef_client_on_process_message_received; + end; +end; + +function TCefClientOwn.GetContextMenuHandler: ICefContextMenuHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetDialogHandler: ICefDialogHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetDisplayHandler: ICefDisplayHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetDownloadHandler: ICefDownloadHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetDragHandler: ICefDragHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetFindHandler: ICefFindHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetFocusHandler: ICefFocusHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetGeolocationHandler: ICefGeolocationHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetJsdialogHandler: ICefJsDialogHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetKeyboardHandler: ICefKeyboardHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetLifeSpanHandler: ICefLifeSpanHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetLoadHandler: ICefLoadHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetRenderHandler: ICefRenderHandler; +begin + Result := nil; +end; + +function TCefClientOwn.GetRequestHandler: ICefRequestHandler; +begin + Result := nil; +end; + +function TCefClientOwn.OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; +begin + Result := False; +end; + +// TCustomClientHandler + +constructor TCustomClientHandler.Create(const events: IChromiumEvents; renderer: Boolean); +begin + inherited Create; + + FEvents := events; + + FLoadHandler := TCustomLoadHandler.Create(events); + FFocusHandler := TCustomFocusHandler.Create(events); + FContextMenuHandler := TCustomContextMenuHandler.Create(events); + FDialogHandler := TCustomDialogHandler.Create(events); + FKeyboardHandler := TCustomKeyboardHandler.Create(events); + FDisplayHandler := TCustomDisplayHandler.Create(events); + FDownloadHandler := TCustomDownloadHandler.Create(events); + FGeolocationHandler := TCustomGeolocationHandler.Create(events); + FJsDialogHandler := TCustomJsDialogHandler.Create(events); + FLifeSpanHandler := TCustomLifeSpanHandler.Create(events); + FRequestHandler := TCustomRequestHandler.Create(events); + + if renderer then + FRenderHandler := TCustomRenderHandler.Create(events) + else + FRenderHandler := nil; + + FDragHandler := TCustomDragHandler.Create(events); + FFindHandler := TCustomFindHandler.Create(events); +end; + +procedure TCustomClientHandler.Disconnect; +begin + FEvents := nil; + FLoadHandler := nil; + FFocusHandler := nil; + FContextMenuHandler := nil; + FDialogHandler := nil; + FKeyboardHandler := nil; + FDisplayHandler := nil; + FDownloadHandler := nil; + FGeolocationHandler := nil; + FJsDialogHandler := nil; + FLifeSpanHandler := nil; + FRequestHandler := nil; + FRenderHandler := nil; + FDragHandler := nil; + FFindHandler := nil; +end; + +function TCustomClientHandler.GetContextMenuHandler: ICefContextMenuHandler; +begin + Result := FContextMenuHandler; +end; + +function TCustomClientHandler.GetDialogHandler: ICefDialogHandler; +begin + Result := FDialogHandler; +end; + +function TCustomClientHandler.GetDisplayHandler: ICefDisplayHandler; +begin + Result := FDisplayHandler; +end; + +function TCustomClientHandler.GetDownloadHandler: ICefDownloadHandler; +begin + Result := FDownloadHandler; +end; + +function TCustomClientHandler.GetDragHandler: ICefDragHandler; +begin + Result := FDragHandler; +end; + +function TCustomClientHandler.GetFindHandler: ICefFindHandler; +begin + Result := FFindHandler; +end; + +function TCustomClientHandler.GetFocusHandler: ICefFocusHandler; +begin + Result := FFocusHandler; +end; + +function TCustomClientHandler.GetGeolocationHandler: ICefGeolocationHandler; +begin + Result := FGeolocationHandler; +end; + +function TCustomClientHandler.GetJsdialogHandler: ICefJsDialogHandler; +begin + Result := FJsDialogHandler; +end; + +function TCustomClientHandler.GetKeyboardHandler: ICefKeyboardHandler; +begin + Result := FKeyboardHandler; +end; + +function TCustomClientHandler.GetLifeSpanHandler: ICefLifeSpanHandler; +begin + Result := FLifeSpanHandler; +end; + +function TCustomClientHandler.GetLoadHandler: ICefLoadHandler; +begin + Result := FLoadHandler; +end; + +function TCustomClientHandler.GetRenderHandler: ICefRenderHandler; +begin + Result := FRenderHandler; +end; + +function TCustomClientHandler.GetRequestHandler: ICefRequestHandler; +begin + Result := FRequestHandler; +end; + +function TCustomClientHandler.OnProcessMessageReceived(const browser: ICefBrowser; sourceProcess: TCefProcessId; const message: ICefProcessMessage): Boolean; +begin + if Assigned(FEvents) then + Result := FEvents.doOnProcessMessageReceived(browser, sourceProcess, message) + else + Result := False; +end; + +// TVCLClientHandler + +procedure TimerProc(hwnd: HWND; uMsg: UINT; idEvent: Pointer; dwTime: DWORD); stdcall; +begin + if looping then Exit; + + if (CefInstances > 0) then + begin + looping := True; + + try + cef_do_message_loop_work; + finally + looping := False; + end; + end; +end; + +constructor TVCLClientHandler.Create(const crm: IChromiumEvents; renderer : Boolean); +begin + inherited Create(crm, renderer); + + if not(MultithreadApp) then + begin + if (CefInstances = 0) then CefTimer := SetTimer(0, 0, USER_TIMER_MINIMUM, @TimerProc); + InterlockedIncrement(CefInstances); + end; +end; + +destructor TVCLClientHandler.Destroy; +begin + if not(MultithreadApp) then + begin + InterlockedDecrement(CefInstances); + if (CefInstances = 0) then KillTimer(0, CefTimer); + end; + + inherited Destroy; +end; + +procedure TVCLClientHandler.ReleaseOtherInstances; +var + i : integer; +begin + i := pred(self.FRefCount); + + while (i >= 1) do + begin + self._Release; + dec(i); + end; +end; + +function TVCLClientHandler.GetMultithreadApp : boolean; +begin + Result := True; + + try + if (GlobalCEFApp <> nil) then Result := GlobalCEFApp.MultiThreadedMessageLoop; + except + on e : exception do + begin + {$IFDEF DEBUG} + OutputDebugString(PWideChar('TVCLClientHandler.GetMultithreadApp error: ' + e.Message + chr(0))); + {$ENDIF} + end; + end; +end; + +end. diff --git a/uCEFCommandLine.pas b/source/uCEFCommandLine.pas similarity index 96% rename from uCEFCommandLine.pas rename to source/uCEFCommandLine.pas index 884eecff..7fc9bc40 100644 --- a/uCEFCommandLine.pas +++ b/source/uCEFCommandLine.pas @@ -1,274 +1,274 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFCommandLine; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFBase, uCEFTypes, uCEFInterfaces; - -type - TCefCommandLineRef = class(TCefBaseRef, ICefCommandLine) - protected - function IsValid: Boolean; - function IsReadOnly: Boolean; - function Copy: ICefCommandLine; - procedure InitFromArgv(argc: Integer; const argv: PPAnsiChar); - procedure InitFromString(const commandLine: ustring); - procedure Reset; - function GetCommandLineString: ustring; - procedure GetArgv(args: TStrings); - function GetProgram: ustring; - procedure SetProgram(const prog: ustring); - function HasSwitches: Boolean; - function HasSwitch(const name: ustring): Boolean; - function GetSwitchValue(const name: ustring): ustring; - procedure GetSwitches(switches: TStrings); - procedure AppendSwitch(const name: ustring); - procedure AppendSwitchWithValue(const name, value: ustring); - function HasArguments: Boolean; - procedure GetArguments(arguments: TStrings); - procedure AppendArgument(const argument: ustring); - procedure PrependWrapper(const wrapper: ustring); - - public - class function UnWrap(data: Pointer): ICefCommandLine; - class function New: ICefCommandLine; - class function Global: ICefCommandLine; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -procedure TCefCommandLineRef.AppendArgument(const argument: ustring); -var - a: TCefString; -begin - a := CefString(argument); - PCefCommandLine(FData).append_argument(PCefCommandLine(FData), @a); -end; - -procedure TCefCommandLineRef.AppendSwitch(const name: ustring); -var - n: TCefString; -begin - n := CefString(name); - PCefCommandLine(FData).append_switch(PCefCommandLine(FData), @n); -end; - -procedure TCefCommandLineRef.AppendSwitchWithValue(const name, value: ustring); -var - n, v: TCefString; -begin - n := CefString(name); - v := CefString(value); - PCefCommandLine(FData).append_switch_with_value(PCefCommandLine(FData), @n, @v); -end; - -function TCefCommandLineRef.Copy: ICefCommandLine; -begin - Result := UnWrap(PCefCommandLine(FData).copy(PCefCommandLine(FData))); -end; - -procedure TCefCommandLineRef.GetArguments(arguments: TStrings); -var - list: TCefStringList; - i: Integer; - str: TCefString; -begin - list := cef_string_list_alloc; - try - PCefCommandLine(FData).get_arguments(PCefCommandLine(FData), list); - for i := 0 to cef_string_list_size(list) - 1 do - begin - FillChar(str, SizeOf(str), 0); - cef_string_list_value(list, i, @str); - arguments.Add(CefStringClearAndGet(str)); - end; - finally - cef_string_list_free(list); - end; -end; - -procedure TCefCommandLineRef.GetArgv(args: TStrings); -var - list: TCefStringList; - i: Integer; - str: TCefString; -begin - list := cef_string_list_alloc; - try - PCefCommandLine(FData).get_argv(FData, list); - for i := 0 to cef_string_list_size(list) - 1 do - begin - FillChar(str, SizeOf(str), 0); - cef_string_list_value(list, i, @str); - args.Add(CefStringClearAndGet(str)); - end; - finally - cef_string_list_free(list); - end; -end; - -function TCefCommandLineRef.GetCommandLineString: ustring; -begin - Result := CefStringFreeAndGet(PCefCommandLine(FData).get_command_line_string(PCefCommandLine(FData))); -end; - -function TCefCommandLineRef.GetProgram: ustring; -begin - Result := CefStringFreeAndGet(PCefCommandLine(FData).get_program(PCefCommandLine(FData))); -end; - -procedure TCefCommandLineRef.GetSwitches(switches: TStrings); -var - list: TCefStringList; - i: Integer; - str: TCefString; -begin - list := cef_string_list_alloc; - try - PCefCommandLine(FData).get_switches(PCefCommandLine(FData), list); - for i := 0 to cef_string_list_size(list) - 1 do - begin - FillChar(str, SizeOf(str), 0); - cef_string_list_value(list, i, @str); - switches.Add(CefStringClearAndGet(str)); - end; - finally - cef_string_list_free(list); - end; -end; - -function TCefCommandLineRef.GetSwitchValue(const name: ustring): ustring; -var - n: TCefString; -begin - n := CefString(name); - Result := CefStringFreeAndGet(PCefCommandLine(FData).get_switch_value(PCefCommandLine(FData), @n)); -end; - -class function TCefCommandLineRef.Global: ICefCommandLine; -begin - Result := UnWrap(cef_command_line_get_global); -end; - -function TCefCommandLineRef.HasArguments: Boolean; -begin - Result := PCefCommandLine(FData).has_arguments(PCefCommandLine(FData)) <> 0; -end; - -function TCefCommandLineRef.HasSwitch(const name: ustring): Boolean; -var - n: TCefString; -begin - n := CefString(name); - Result := PCefCommandLine(FData).has_switch(PCefCommandLine(FData), @n) <> 0; -end; - -function TCefCommandLineRef.HasSwitches: Boolean; -begin - Result := PCefCommandLine(FData).has_switches(PCefCommandLine(FData)) <> 0; -end; - -procedure TCefCommandLineRef.InitFromArgv(argc: Integer; - const argv: PPAnsiChar); -begin - PCefCommandLine(FData).init_from_argv(PCefCommandLine(FData), argc, argv); -end; - -procedure TCefCommandLineRef.InitFromString(const commandLine: ustring); -var - cl: TCefString; -begin - cl := CefString(commandLine); - PCefCommandLine(FData).init_from_string(PCefCommandLine(FData), @cl); -end; - -function TCefCommandLineRef.IsReadOnly: Boolean; -begin - Result := PCefCommandLine(FData).is_read_only(PCefCommandLine(FData)) <> 0; -end; - -function TCefCommandLineRef.IsValid: Boolean; -begin - Result := PCefCommandLine(FData).is_valid(PCefCommandLine(FData)) <> 0; -end; - -class function TCefCommandLineRef.New: ICefCommandLine; -begin - Result := UnWrap(cef_command_line_create); -end; - -procedure TCefCommandLineRef.PrependWrapper(const wrapper: ustring); -var - w: TCefString; -begin - w := CefString(wrapper); - PCefCommandLine(FData).prepend_wrapper(PCefCommandLine(FData), @w); -end; - -procedure TCefCommandLineRef.Reset; -begin - PCefCommandLine(FData).reset(PCefCommandLine(FData)); -end; - -procedure TCefCommandLineRef.SetProgram(const prog: ustring); -var - p: TCefString; -begin - p := CefString(prog); - PCefCommandLine(FData).set_program(PCefCommandLine(FData), @p); -end; - -class function TCefCommandLineRef.UnWrap(data: Pointer): ICefCommandLine; -begin - if data <> nil then - Result := Create(data) as ICefCommandLine else - Result := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFCommandLine; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFBase, uCEFTypes, uCEFInterfaces; + +type + TCefCommandLineRef = class(TCefBaseRef, ICefCommandLine) + protected + function IsValid: Boolean; + function IsReadOnly: Boolean; + function Copy: ICefCommandLine; + procedure InitFromArgv(argc: Integer; const argv: PPAnsiChar); + procedure InitFromString(const commandLine: ustring); + procedure Reset; + function GetCommandLineString: ustring; + procedure GetArgv(args: TStrings); + function GetProgram: ustring; + procedure SetProgram(const prog: ustring); + function HasSwitches: Boolean; + function HasSwitch(const name: ustring): Boolean; + function GetSwitchValue(const name: ustring): ustring; + procedure GetSwitches(switches: TStrings); + procedure AppendSwitch(const name: ustring); + procedure AppendSwitchWithValue(const name, value: ustring); + function HasArguments: Boolean; + procedure GetArguments(arguments: TStrings); + procedure AppendArgument(const argument: ustring); + procedure PrependWrapper(const wrapper: ustring); + + public + class function UnWrap(data: Pointer): ICefCommandLine; + class function New: ICefCommandLine; + class function Global: ICefCommandLine; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + +procedure TCefCommandLineRef.AppendArgument(const argument: ustring); +var + a: TCefString; +begin + a := CefString(argument); + PCefCommandLine(FData).append_argument(PCefCommandLine(FData), @a); +end; + +procedure TCefCommandLineRef.AppendSwitch(const name: ustring); +var + n: TCefString; +begin + n := CefString(name); + PCefCommandLine(FData).append_switch(PCefCommandLine(FData), @n); +end; + +procedure TCefCommandLineRef.AppendSwitchWithValue(const name, value: ustring); +var + n, v: TCefString; +begin + n := CefString(name); + v := CefString(value); + PCefCommandLine(FData).append_switch_with_value(PCefCommandLine(FData), @n, @v); +end; + +function TCefCommandLineRef.Copy: ICefCommandLine; +begin + Result := UnWrap(PCefCommandLine(FData).copy(PCefCommandLine(FData))); +end; + +procedure TCefCommandLineRef.GetArguments(arguments: TStrings); +var + list: TCefStringList; + i: Integer; + str: TCefString; +begin + list := cef_string_list_alloc; + try + PCefCommandLine(FData).get_arguments(PCefCommandLine(FData), list); + for i := 0 to cef_string_list_size(list) - 1 do + begin + FillChar(str, SizeOf(str), 0); + cef_string_list_value(list, i, @str); + arguments.Add(CefStringClearAndGet(str)); + end; + finally + cef_string_list_free(list); + end; +end; + +procedure TCefCommandLineRef.GetArgv(args: TStrings); +var + list: TCefStringList; + i: Integer; + str: TCefString; +begin + list := cef_string_list_alloc; + try + PCefCommandLine(FData).get_argv(FData, list); + for i := 0 to cef_string_list_size(list) - 1 do + begin + FillChar(str, SizeOf(str), 0); + cef_string_list_value(list, i, @str); + args.Add(CefStringClearAndGet(str)); + end; + finally + cef_string_list_free(list); + end; +end; + +function TCefCommandLineRef.GetCommandLineString: ustring; +begin + Result := CefStringFreeAndGet(PCefCommandLine(FData).get_command_line_string(PCefCommandLine(FData))); +end; + +function TCefCommandLineRef.GetProgram: ustring; +begin + Result := CefStringFreeAndGet(PCefCommandLine(FData).get_program(PCefCommandLine(FData))); +end; + +procedure TCefCommandLineRef.GetSwitches(switches: TStrings); +var + list: TCefStringList; + i: Integer; + str: TCefString; +begin + list := cef_string_list_alloc; + try + PCefCommandLine(FData).get_switches(PCefCommandLine(FData), list); + for i := 0 to cef_string_list_size(list) - 1 do + begin + FillChar(str, SizeOf(str), 0); + cef_string_list_value(list, i, @str); + switches.Add(CefStringClearAndGet(str)); + end; + finally + cef_string_list_free(list); + end; +end; + +function TCefCommandLineRef.GetSwitchValue(const name: ustring): ustring; +var + n: TCefString; +begin + n := CefString(name); + Result := CefStringFreeAndGet(PCefCommandLine(FData).get_switch_value(PCefCommandLine(FData), @n)); +end; + +class function TCefCommandLineRef.Global: ICefCommandLine; +begin + Result := UnWrap(cef_command_line_get_global); +end; + +function TCefCommandLineRef.HasArguments: Boolean; +begin + Result := PCefCommandLine(FData).has_arguments(PCefCommandLine(FData)) <> 0; +end; + +function TCefCommandLineRef.HasSwitch(const name: ustring): Boolean; +var + n: TCefString; +begin + n := CefString(name); + Result := PCefCommandLine(FData).has_switch(PCefCommandLine(FData), @n) <> 0; +end; + +function TCefCommandLineRef.HasSwitches: Boolean; +begin + Result := PCefCommandLine(FData).has_switches(PCefCommandLine(FData)) <> 0; +end; + +procedure TCefCommandLineRef.InitFromArgv(argc: Integer; + const argv: PPAnsiChar); +begin + PCefCommandLine(FData).init_from_argv(PCefCommandLine(FData), argc, argv); +end; + +procedure TCefCommandLineRef.InitFromString(const commandLine: ustring); +var + cl: TCefString; +begin + cl := CefString(commandLine); + PCefCommandLine(FData).init_from_string(PCefCommandLine(FData), @cl); +end; + +function TCefCommandLineRef.IsReadOnly: Boolean; +begin + Result := PCefCommandLine(FData).is_read_only(PCefCommandLine(FData)) <> 0; +end; + +function TCefCommandLineRef.IsValid: Boolean; +begin + Result := PCefCommandLine(FData).is_valid(PCefCommandLine(FData)) <> 0; +end; + +class function TCefCommandLineRef.New: ICefCommandLine; +begin + Result := UnWrap(cef_command_line_create); +end; + +procedure TCefCommandLineRef.PrependWrapper(const wrapper: ustring); +var + w: TCefString; +begin + w := CefString(wrapper); + PCefCommandLine(FData).prepend_wrapper(PCefCommandLine(FData), @w); +end; + +procedure TCefCommandLineRef.Reset; +begin + PCefCommandLine(FData).reset(PCefCommandLine(FData)); +end; + +procedure TCefCommandLineRef.SetProgram(const prog: ustring); +var + p: TCefString; +begin + p := CefString(prog); + PCefCommandLine(FData).set_program(PCefCommandLine(FData), @p); +end; + +class function TCefCommandLineRef.UnWrap(data: Pointer): ICefCommandLine; +begin + if data <> nil then + Result := Create(data) as ICefCommandLine else + Result := nil; +end; + +end. diff --git a/uCEFCompletionCallback.pas b/source/uCEFCompletionCallback.pas similarity index 96% rename from uCEFCompletionCallback.pas rename to source/uCEFCompletionCallback.pas index f4c8966d..e0853e18 100644 --- a/uCEFCompletionCallback.pas +++ b/source/uCEFCompletionCallback.pas @@ -1,107 +1,107 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFCompletionCallback; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces; - -type - TCefCompletionCallbackOwn = class(TCefBaseOwn, ICefCompletionCallback) - protected - procedure OnComplete; virtual; - - public - constructor Create; virtual; - end; - - TCefFastCompletionCallback = class(TCefCompletionCallbackOwn) - protected - FProc: TCefCompletionCallbackProc; - - procedure OnComplete; override; - - public - constructor Create(const proc: TCefCompletionCallbackProc); reintroduce; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFTypes; - -procedure cef_completion_callback_on_complete(self: PCefCompletionCallback); stdcall; -begin - with TCefCompletionCallbackOwn(CefGetObject(self)) do OnComplete(); -end; - -// TCefCompletionHandlerOwn - -constructor TCefCompletionCallbackOwn.Create; -begin - inherited CreateData(SizeOf(TCefCompletionCallback)); - - with PCefCompletionCallback(FData)^ do on_complete := cef_completion_callback_on_complete; -end; - -procedure TCefCompletionCallbackOwn.OnComplete; -begin - -end; - -// TCefFastCompletionHandler - -constructor TCefFastCompletionCallback.Create(const proc: TCefCompletionCallbackProc); -begin - inherited Create; - - FProc := proc; -end; - -procedure TCefFastCompletionCallback.OnComplete; -begin - FProc(); -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFCompletionCallback; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces; + +type + TCefCompletionCallbackOwn = class(TCefBaseOwn, ICefCompletionCallback) + protected + procedure OnComplete; virtual; + + public + constructor Create; virtual; + end; + + TCefFastCompletionCallback = class(TCefCompletionCallbackOwn) + protected + FProc: TCefCompletionCallbackProc; + + procedure OnComplete; override; + + public + constructor Create(const proc: TCefCompletionCallbackProc); reintroduce; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions, uCEFTypes; + +procedure cef_completion_callback_on_complete(self: PCefCompletionCallback); stdcall; +begin + with TCefCompletionCallbackOwn(CefGetObject(self)) do OnComplete(); +end; + +// TCefCompletionHandlerOwn + +constructor TCefCompletionCallbackOwn.Create; +begin + inherited CreateData(SizeOf(TCefCompletionCallback)); + + with PCefCompletionCallback(FData)^ do on_complete := cef_completion_callback_on_complete; +end; + +procedure TCefCompletionCallbackOwn.OnComplete; +begin + +end; + +// TCefFastCompletionHandler + +constructor TCefFastCompletionCallback.Create(const proc: TCefCompletionCallbackProc); +begin + inherited Create; + + FProc := proc; +end; + +procedure TCefFastCompletionCallback.OnComplete; +begin + FProc(); +end; + +end. diff --git a/uCEFConstants.pas b/source/uCEFConstants.pas similarity index 100% rename from uCEFConstants.pas rename to source/uCEFConstants.pas diff --git a/uCEFContextMenuHandler.pas b/source/uCEFContextMenuHandler.pas similarity index 97% rename from uCEFContextMenuHandler.pas rename to source/uCEFContextMenuHandler.pas index 04e5a57d..47696305 100644 --- a/uCEFContextMenuHandler.pas +++ b/source/uCEFContextMenuHandler.pas @@ -1,186 +1,186 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFContextMenuHandler; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefContextMenuHandlerOwn = class(TCefBaseOwn, ICefContextMenuHandler) - protected - procedure OnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); virtual; - function RunContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel; const callback: ICefRunContextMenuCallback): Boolean; virtual; - function OnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; virtual; - procedure OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); virtual; - - public - constructor Create; virtual; - end; - - TCustomContextMenuHandler = class(TCefContextMenuHandlerOwn) - protected - FEvent: IChromiumEvents; - - procedure OnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); override; - function OnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; override; - procedure OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); override; - - public - constructor Create(const events: IChromiumEvents); reintroduce; virtual; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser, uCEFFrame, uCEFContextMenuParams, - uCEFMenuModel, uCEFRunContextMenuCallback; - -procedure cef_context_menu_handler_on_before_context_menu(self: PCefContextMenuHandler; - browser: PCefBrowser; frame: PCefFrame; params: PCefContextMenuParams; - model: PCefMenuModel); stdcall; -begin - with TCefContextMenuHandlerOwn(CefGetObject(self)) do - OnBeforeContextMenu(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame), - TCefContextMenuParamsRef.UnWrap(params), TCefMenuModelRef.UnWrap(model)); -end; - -function cef_context_menu_handler_run_context_menu(self: PCefContextMenuHandler; - browser: PCefBrowser; frame: PCefFrame; params: PCefContextMenuParams; - model: PCefMenuModel; callback: PCefRunContextMenuCallback): Integer; stdcall; -begin - with TCefContextMenuHandlerOwn(CefGetObject(self)) do - Result := Ord(RunContextMenu(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame), - TCefContextMenuParamsRef.UnWrap(params), TCefMenuModelRef.UnWrap(model), - TCefRunContextMenuCallbackRef.UnWrap(callback))); -end; - -function cef_context_menu_handler_on_context_menu_command(self: PCefContextMenuHandler; - browser: PCefBrowser; frame: PCefFrame; params: PCefContextMenuParams; - command_id: Integer; event_flags: Integer): Integer; stdcall; -begin - with TCefContextMenuHandlerOwn(CefGetObject(self)) do - Result := Ord(OnContextMenuCommand(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame), - TCefContextMenuParamsRef.UnWrap(params), command_id, TCefEventFlags(Pointer(@event_flags)^))); -end; - -procedure cef_context_menu_handler_on_context_menu_dismissed(self: PCefContextMenuHandler; - browser: PCefBrowser; frame: PCefFrame); stdcall; -begin - with TCefContextMenuHandlerOwn(CefGetObject(self)) do - OnContextMenuDismissed(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame)); -end; - -constructor TCefContextMenuHandlerOwn.Create; -begin - inherited CreateData(SizeOf(TCefContextMenuHandler)); - with PCefContextMenuHandler(FData)^ do - begin - on_before_context_menu := cef_context_menu_handler_on_before_context_menu; - run_context_menu := cef_context_menu_handler_run_context_menu; - on_context_menu_command := cef_context_menu_handler_on_context_menu_command; - on_context_menu_dismissed := cef_context_menu_handler_on_context_menu_dismissed; - end; -end; - -procedure TCefContextMenuHandlerOwn.OnBeforeContextMenu( - const browser: ICefBrowser; const frame: ICefFrame; - const params: ICefContextMenuParams; const model: ICefMenuModel); -begin - -end; - -function TCefContextMenuHandlerOwn.OnContextMenuCommand( - const browser: ICefBrowser; const frame: ICefFrame; - const params: ICefContextMenuParams; commandId: Integer; - eventFlags: TCefEventFlags): Boolean; -begin - Result := False; -end; - -procedure TCefContextMenuHandlerOwn.OnContextMenuDismissed( - const browser: ICefBrowser; const frame: ICefFrame); -begin - -end; - -function TCefContextMenuHandlerOwn.RunContextMenu(const browser: ICefBrowser; - const frame: ICefFrame; const params: ICefContextMenuParams; - const model: ICefMenuModel; - const callback: ICefRunContextMenuCallback): Boolean; -begin - Result := False; -end; - -// TCustomContextMenuHandler - -constructor TCustomContextMenuHandler.Create(const events: IChromiumEvents); -begin - inherited Create; - FEvent := events; -end; - -procedure TCustomContextMenuHandler.OnBeforeContextMenu( - const browser: ICefBrowser; const frame: ICefFrame; - const params: ICefContextMenuParams; const model: ICefMenuModel); -begin - FEvent.doOnBeforeContextMenu(browser, frame, params, model); -end; - -function TCustomContextMenuHandler.OnContextMenuCommand( - const browser: ICefBrowser; const frame: ICefFrame; - const params: ICefContextMenuParams; commandId: Integer; - eventFlags: TCefEventFlags): Boolean; -begin - Result := FEvent.doOnContextMenuCommand(browser, frame, params, commandId, - eventFlags); -end; - -procedure TCustomContextMenuHandler.OnContextMenuDismissed( - const browser: ICefBrowser; const frame: ICefFrame); -begin - FEvent.doOnContextMenuDismissed(browser, frame); -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFContextMenuHandler; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefContextMenuHandlerOwn = class(TCefBaseOwn, ICefContextMenuHandler) + protected + procedure OnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); virtual; + function RunContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel; const callback: ICefRunContextMenuCallback): Boolean; virtual; + function OnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; virtual; + procedure OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); virtual; + + public + constructor Create; virtual; + end; + + TCustomContextMenuHandler = class(TCefContextMenuHandlerOwn) + protected + FEvent: IChromiumEvents; + + procedure OnBeforeContextMenu(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; const model: ICefMenuModel); override; + function OnContextMenuCommand(const browser: ICefBrowser; const frame: ICefFrame; const params: ICefContextMenuParams; commandId: Integer; eventFlags: TCefEventFlags): Boolean; override; + procedure OnContextMenuDismissed(const browser: ICefBrowser; const frame: ICefFrame); override; + + public + constructor Create(const events: IChromiumEvents); reintroduce; virtual; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser, uCEFFrame, uCEFContextMenuParams, + uCEFMenuModel, uCEFRunContextMenuCallback; + +procedure cef_context_menu_handler_on_before_context_menu(self: PCefContextMenuHandler; + browser: PCefBrowser; frame: PCefFrame; params: PCefContextMenuParams; + model: PCefMenuModel); stdcall; +begin + with TCefContextMenuHandlerOwn(CefGetObject(self)) do + OnBeforeContextMenu(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame), + TCefContextMenuParamsRef.UnWrap(params), TCefMenuModelRef.UnWrap(model)); +end; + +function cef_context_menu_handler_run_context_menu(self: PCefContextMenuHandler; + browser: PCefBrowser; frame: PCefFrame; params: PCefContextMenuParams; + model: PCefMenuModel; callback: PCefRunContextMenuCallback): Integer; stdcall; +begin + with TCefContextMenuHandlerOwn(CefGetObject(self)) do + Result := Ord(RunContextMenu(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame), + TCefContextMenuParamsRef.UnWrap(params), TCefMenuModelRef.UnWrap(model), + TCefRunContextMenuCallbackRef.UnWrap(callback))); +end; + +function cef_context_menu_handler_on_context_menu_command(self: PCefContextMenuHandler; + browser: PCefBrowser; frame: PCefFrame; params: PCefContextMenuParams; + command_id: Integer; event_flags: Integer): Integer; stdcall; +begin + with TCefContextMenuHandlerOwn(CefGetObject(self)) do + Result := Ord(OnContextMenuCommand(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame), + TCefContextMenuParamsRef.UnWrap(params), command_id, TCefEventFlags(Pointer(@event_flags)^))); +end; + +procedure cef_context_menu_handler_on_context_menu_dismissed(self: PCefContextMenuHandler; + browser: PCefBrowser; frame: PCefFrame); stdcall; +begin + with TCefContextMenuHandlerOwn(CefGetObject(self)) do + OnContextMenuDismissed(TCefBrowserRef.UnWrap(browser), TCefFrameRef.UnWrap(frame)); +end; + +constructor TCefContextMenuHandlerOwn.Create; +begin + inherited CreateData(SizeOf(TCefContextMenuHandler)); + with PCefContextMenuHandler(FData)^ do + begin + on_before_context_menu := cef_context_menu_handler_on_before_context_menu; + run_context_menu := cef_context_menu_handler_run_context_menu; + on_context_menu_command := cef_context_menu_handler_on_context_menu_command; + on_context_menu_dismissed := cef_context_menu_handler_on_context_menu_dismissed; + end; +end; + +procedure TCefContextMenuHandlerOwn.OnBeforeContextMenu( + const browser: ICefBrowser; const frame: ICefFrame; + const params: ICefContextMenuParams; const model: ICefMenuModel); +begin + +end; + +function TCefContextMenuHandlerOwn.OnContextMenuCommand( + const browser: ICefBrowser; const frame: ICefFrame; + const params: ICefContextMenuParams; commandId: Integer; + eventFlags: TCefEventFlags): Boolean; +begin + Result := False; +end; + +procedure TCefContextMenuHandlerOwn.OnContextMenuDismissed( + const browser: ICefBrowser; const frame: ICefFrame); +begin + +end; + +function TCefContextMenuHandlerOwn.RunContextMenu(const browser: ICefBrowser; + const frame: ICefFrame; const params: ICefContextMenuParams; + const model: ICefMenuModel; + const callback: ICefRunContextMenuCallback): Boolean; +begin + Result := False; +end; + +// TCustomContextMenuHandler + +constructor TCustomContextMenuHandler.Create(const events: IChromiumEvents); +begin + inherited Create; + FEvent := events; +end; + +procedure TCustomContextMenuHandler.OnBeforeContextMenu( + const browser: ICefBrowser; const frame: ICefFrame; + const params: ICefContextMenuParams; const model: ICefMenuModel); +begin + FEvent.doOnBeforeContextMenu(browser, frame, params, model); +end; + +function TCustomContextMenuHandler.OnContextMenuCommand( + const browser: ICefBrowser; const frame: ICefFrame; + const params: ICefContextMenuParams; commandId: Integer; + eventFlags: TCefEventFlags): Boolean; +begin + Result := FEvent.doOnContextMenuCommand(browser, frame, params, commandId, + eventFlags); +end; + +procedure TCustomContextMenuHandler.OnContextMenuDismissed( + const browser: ICefBrowser; const frame: ICefFrame); +begin + FEvent.doOnContextMenuDismissed(browser, frame); +end; + +end. diff --git a/uCEFContextMenuParams.pas b/source/uCEFContextMenuParams.pas similarity index 97% rename from uCEFContextMenuParams.pas rename to source/uCEFContextMenuParams.pas index 702e9be0..903046b2 100644 --- a/uCEFContextMenuParams.pas +++ b/source/uCEFContextMenuParams.pas @@ -1,215 +1,215 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFContextMenuParams; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefContextMenuParamsRef = class(TCefBaseRef, ICefContextMenuParams) - protected - function GetXCoord: Integer; - function GetYCoord: Integer; - function GetTypeFlags: TCefContextMenuTypeFlags; - function GetLinkUrl: ustring; - function GetUnfilteredLinkUrl: ustring; - function GetSourceUrl: ustring; - function HasImageContents: Boolean; - function GetTitleText: ustring; - function GetPageUrl: ustring; - function GetFrameUrl: ustring; - function GetFrameCharset: ustring; - function GetMediaType: TCefContextMenuMediaType; - function GetMediaStateFlags: TCefContextMenuMediaStateFlags; - function GetSelectionText: ustring; - function GetMisspelledWord: ustring; - function GetDictionarySuggestions(const suggestions: TStringList): Boolean; - function IsEditable: Boolean; - function IsSpellCheckEnabled: Boolean; - function GetEditStateFlags: TCefContextMenuEditStateFlags; - function IsCustomMenu: Boolean; - function IsPepperMenu: Boolean; - public - class function UnWrap(data: Pointer): ICefContextMenuParams; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - - -function TCefContextMenuParamsRef.GetDictionarySuggestions( - const suggestions: TStringList): Boolean; -var - list: TCefStringList; - i: Integer; - str: TCefString; -begin - list := cef_string_list_alloc; - try - Result := PCefContextMenuParams(FData).get_dictionary_suggestions(PCefContextMenuParams(FData), list) <> 0; - FillChar(str, SizeOf(str), 0); - for i := 0 to cef_string_list_size(list) - 1 do - begin - FillChar(str, SizeOf(str), 0); - cef_string_list_value(list, i, @str); - suggestions.Add(CefStringClearAndGet(str)); - end; - finally - cef_string_list_free(list); - end; -end; - -function TCefContextMenuParamsRef.GetEditStateFlags: TCefContextMenuEditStateFlags; -begin - Byte(Result) := PCefContextMenuParams(FData).get_edit_state_flags(PCefContextMenuParams(FData)); -end; - -function TCefContextMenuParamsRef.GetFrameCharset: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_frame_charset(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetFrameUrl: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_frame_url(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetLinkUrl: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_link_url(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetMediaStateFlags: TCefContextMenuMediaStateFlags; -begin - Word(Result) := PCefContextMenuParams(FData).get_media_state_flags(PCefContextMenuParams(FData)); -end; - -function TCefContextMenuParamsRef.GetMediaType: TCefContextMenuMediaType; -begin - Result := PCefContextMenuParams(FData).get_media_type(PCefContextMenuParams(FData)); -end; - -function TCefContextMenuParamsRef.GetMisspelledWord: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_misspelled_word(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetTitleText: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_title_text(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetPageUrl: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_page_url(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetSelectionText: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_selection_text(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetSourceUrl: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_source_url(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetTypeFlags: TCefContextMenuTypeFlags; -begin - Byte(Result) := PCefContextMenuParams(FData).get_type_flags(PCefContextMenuParams(FData)); -end; - -function TCefContextMenuParamsRef.GetUnfilteredLinkUrl: ustring; -begin - Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_unfiltered_link_url(PCefContextMenuParams(FData))); -end; - -function TCefContextMenuParamsRef.GetXCoord: Integer; -begin - Result := PCefContextMenuParams(FData).get_xcoord(PCefContextMenuParams(FData)); -end; - -function TCefContextMenuParamsRef.GetYCoord: Integer; -begin - Result := PCefContextMenuParams(FData).get_ycoord(PCefContextMenuParams(FData)); -end; - -function TCefContextMenuParamsRef.IsCustomMenu: Boolean; -begin - Result := PCefContextMenuParams(FData).is_custom_menu(PCefContextMenuParams(FData)) <> 0; -end; - -function TCefContextMenuParamsRef.IsEditable: Boolean; -begin - Result := PCefContextMenuParams(FData).is_editable(PCefContextMenuParams(FData)) <> 0; -end; - -function TCefContextMenuParamsRef.IsPepperMenu: Boolean; -begin - Result := PCefContextMenuParams(FData).is_pepper_menu(PCefContextMenuParams(FData)) <> 0; -end; - -function TCefContextMenuParamsRef.IsSpellCheckEnabled: Boolean; -begin - Result := PCefContextMenuParams(FData).is_spell_check_enabled(PCefContextMenuParams(FData)) <> 0; -end; - -function TCefContextMenuParamsRef.HasImageContents: Boolean; -begin - Result := PCefContextMenuParams(FData).has_image_contents(PCefContextMenuParams(FData)) <> 0; -end; - -class function TCefContextMenuParamsRef.UnWrap( - data: Pointer): ICefContextMenuParams; -begin - if data <> nil then - Result := Create(data) as ICefContextMenuParams else - Result := nil; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFContextMenuParams; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefContextMenuParamsRef = class(TCefBaseRef, ICefContextMenuParams) + protected + function GetXCoord: Integer; + function GetYCoord: Integer; + function GetTypeFlags: TCefContextMenuTypeFlags; + function GetLinkUrl: ustring; + function GetUnfilteredLinkUrl: ustring; + function GetSourceUrl: ustring; + function HasImageContents: Boolean; + function GetTitleText: ustring; + function GetPageUrl: ustring; + function GetFrameUrl: ustring; + function GetFrameCharset: ustring; + function GetMediaType: TCefContextMenuMediaType; + function GetMediaStateFlags: TCefContextMenuMediaStateFlags; + function GetSelectionText: ustring; + function GetMisspelledWord: ustring; + function GetDictionarySuggestions(const suggestions: TStringList): Boolean; + function IsEditable: Boolean; + function IsSpellCheckEnabled: Boolean; + function GetEditStateFlags: TCefContextMenuEditStateFlags; + function IsCustomMenu: Boolean; + function IsPepperMenu: Boolean; + public + class function UnWrap(data: Pointer): ICefContextMenuParams; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + + +function TCefContextMenuParamsRef.GetDictionarySuggestions( + const suggestions: TStringList): Boolean; +var + list: TCefStringList; + i: Integer; + str: TCefString; +begin + list := cef_string_list_alloc; + try + Result := PCefContextMenuParams(FData).get_dictionary_suggestions(PCefContextMenuParams(FData), list) <> 0; + FillChar(str, SizeOf(str), 0); + for i := 0 to cef_string_list_size(list) - 1 do + begin + FillChar(str, SizeOf(str), 0); + cef_string_list_value(list, i, @str); + suggestions.Add(CefStringClearAndGet(str)); + end; + finally + cef_string_list_free(list); + end; +end; + +function TCefContextMenuParamsRef.GetEditStateFlags: TCefContextMenuEditStateFlags; +begin + Byte(Result) := PCefContextMenuParams(FData).get_edit_state_flags(PCefContextMenuParams(FData)); +end; + +function TCefContextMenuParamsRef.GetFrameCharset: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_frame_charset(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetFrameUrl: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_frame_url(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetLinkUrl: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_link_url(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetMediaStateFlags: TCefContextMenuMediaStateFlags; +begin + Word(Result) := PCefContextMenuParams(FData).get_media_state_flags(PCefContextMenuParams(FData)); +end; + +function TCefContextMenuParamsRef.GetMediaType: TCefContextMenuMediaType; +begin + Result := PCefContextMenuParams(FData).get_media_type(PCefContextMenuParams(FData)); +end; + +function TCefContextMenuParamsRef.GetMisspelledWord: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_misspelled_word(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetTitleText: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_title_text(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetPageUrl: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_page_url(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetSelectionText: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_selection_text(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetSourceUrl: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_source_url(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetTypeFlags: TCefContextMenuTypeFlags; +begin + Byte(Result) := PCefContextMenuParams(FData).get_type_flags(PCefContextMenuParams(FData)); +end; + +function TCefContextMenuParamsRef.GetUnfilteredLinkUrl: ustring; +begin + Result := CefStringFreeAndGet(PCefContextMenuParams(FData).get_unfiltered_link_url(PCefContextMenuParams(FData))); +end; + +function TCefContextMenuParamsRef.GetXCoord: Integer; +begin + Result := PCefContextMenuParams(FData).get_xcoord(PCefContextMenuParams(FData)); +end; + +function TCefContextMenuParamsRef.GetYCoord: Integer; +begin + Result := PCefContextMenuParams(FData).get_ycoord(PCefContextMenuParams(FData)); +end; + +function TCefContextMenuParamsRef.IsCustomMenu: Boolean; +begin + Result := PCefContextMenuParams(FData).is_custom_menu(PCefContextMenuParams(FData)) <> 0; +end; + +function TCefContextMenuParamsRef.IsEditable: Boolean; +begin + Result := PCefContextMenuParams(FData).is_editable(PCefContextMenuParams(FData)) <> 0; +end; + +function TCefContextMenuParamsRef.IsPepperMenu: Boolean; +begin + Result := PCefContextMenuParams(FData).is_pepper_menu(PCefContextMenuParams(FData)) <> 0; +end; + +function TCefContextMenuParamsRef.IsSpellCheckEnabled: Boolean; +begin + Result := PCefContextMenuParams(FData).is_spell_check_enabled(PCefContextMenuParams(FData)) <> 0; +end; + +function TCefContextMenuParamsRef.HasImageContents: Boolean; +begin + Result := PCefContextMenuParams(FData).has_image_contents(PCefContextMenuParams(FData)) <> 0; +end; + +class function TCefContextMenuParamsRef.UnWrap( + data: Pointer): ICefContextMenuParams; +begin + if data <> nil then + Result := Create(data) as ICefContextMenuParams else + Result := nil; +end; + +end. diff --git a/uCEFCookieManager.pas b/source/uCEFCookieManager.pas similarity index 97% rename from uCEFCookieManager.pas rename to source/uCEFCookieManager.pas index 9cc9914b..f57a6280 100644 --- a/uCEFCookieManager.pas +++ b/source/uCEFCookieManager.pas @@ -1,256 +1,256 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFCookieManager; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefCookieManagerRef = class(TCefBaseRef, ICefCookieManager) - protected - procedure SetSupportedSchemes(schemes: TStrings; const callback: ICefCompletionCallback); - procedure SetSupportedSchemesProc(schemes: TStrings; const callback: TCefCompletionCallbackProc); - function VisitAllCookies(const visitor: ICefCookieVisitor): Boolean; - function VisitAllCookiesProc(const visitor: TCefCookieVisitorProc): Boolean; - function VisitUrlCookies(const url: ustring; includeHttpOnly: Boolean; const visitor: ICefCookieVisitor): Boolean; - function VisitUrlCookiesProc(const url: ustring; includeHttpOnly: Boolean; const visitor: TCefCookieVisitorProc): Boolean; - function SetCookie(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: ICefSetCookieCallback): Boolean; - function SetCookieProc(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: TCefSetCookieCallbackProc): Boolean; - function DeleteCookies(const url, cookieName: ustring; const callback: ICefDeleteCookiesCallback): Boolean; - function DeleteCookiesProc(const url, cookieName: ustring; const callback: TCefDeleteCookiesCallbackProc): Boolean; - function SetStoragePath(const path: ustring; persistSessionCookies: Boolean; const callback: ICefCompletionCallback): Boolean; - function SetStoragePathProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): Boolean; - function FlushStore(const handler: ICefCompletionCallback): Boolean; - function FlushStoreProc(const proc: TCefCompletionCallbackProc): Boolean; - - public - class function UnWrap(data: Pointer): ICefCookieManager; - class function Global(const callback: ICefCompletionCallback): ICefCookieManager; - class function GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager; - class function New(const path: ustring; persistSessionCookies: Boolean; const callback: ICefCompletionCallback): ICefCookieManager; - class function NewProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): ICefCookieManager; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions, uCEFCompletionCallback, uCEFDeleteCookiesCallback, - uCEFSetCookieCallback, uCEFCookieVisitor; - -class function TCefCookieManagerRef.New(const path: ustring; persistSessionCookies: Boolean; - const callback: ICefCompletionCallback): ICefCookieManager; -var - pth: TCefString; -begin - pth := CefString(path); - Result := UnWrap(cef_cookie_manager_create_manager(@pth, Ord(persistSessionCookies), CefGetData(callback))); -end; - -class function TCefCookieManagerRef.NewProc(const path: ustring; - persistSessionCookies: Boolean; - const callback: TCefCompletionCallbackProc): ICefCookieManager; -begin - Result := New(path, persistSessionCookies, TCefFastCompletionCallback.Create(callback)); -end; - -function TCefCookieManagerRef.DeleteCookies(const url, - cookieName: ustring; const callback: ICefDeleteCookiesCallback): Boolean; -var - u, n: TCefString; -begin - u := CefString(url); - n := CefString(cookieName); - Result := PCefCookieManager(FData).delete_cookies( - PCefCookieManager(FData), @u, @n, CefGetData(callback)) <> 0; -end; - -function TCefCookieManagerRef.DeleteCookiesProc(const url, cookieName: ustring; - const callback: TCefDeleteCookiesCallbackProc): Boolean; -begin - Result := DeleteCookies(url, cookieName, TCefFastDeleteCookiesCallback.Create(callback)); -end; - -function TCefCookieManagerRef.FlushStore( - const handler: ICefCompletionCallback): Boolean; -begin - Result := PCefCookieManager(FData).flush_store(PCefCookieManager(FData), - CefGetData(handler)) <> 0; -end; - -function TCefCookieManagerRef.FlushStoreProc( - const proc: TCefCompletionCallbackProc): Boolean; -begin - Result := FlushStore(TCefFastCompletionCallback.Create(proc)) -end; - -class function TCefCookieManagerRef.Global(const callback: ICefCompletionCallback): ICefCookieManager; -begin - Result := UnWrap(cef_cookie_manager_get_global_manager(CefGetData(callback))); -end; - -class function TCefCookieManagerRef.GlobalProc( - const callback: TCefCompletionCallbackProc): ICefCookieManager; -begin - Result := Global(TCefFastCompletionCallback.Create(callback)); -end; - -function TCefCookieManagerRef.SetCookie(const url, name, value, domain, - path: ustring; secure, httponly, hasExpires: Boolean; const creation, - lastAccess, expires: TDateTime; const callback: ICefSetCookieCallback): Boolean; -var - str: TCefString; - cook: TCefCookie; -begin - str := CefString(url); - cook.name := CefString(name); - cook.value := CefString(value); - cook.domain := CefString(domain); - cook.path := CefString(path); - cook.secure := Ord(secure); - cook.httponly := Ord(httponly); - cook.creation := DateTimeToCefTime(creation); - cook.last_access := DateTimeToCefTime(lastAccess); - cook.has_expires := Ord(hasExpires); - if hasExpires then - cook.expires := DateTimeToCefTime(expires) else - FillChar(cook.expires, SizeOf(TCefTime), 0); - Result := PCefCookieManager(FData).set_cookie( - PCefCookieManager(FData), @str, @cook, CefGetData(callback)) <> 0; -end; - -function TCefCookieManagerRef.SetCookieProc(const url, name, value, domain, - path: ustring; secure, httponly, hasExpires: Boolean; const creation, - lastAccess, expires: TDateTime; - const callback: TCefSetCookieCallbackProc): Boolean; -begin - Result := SetCookie(url, name, value, domain, path, secure, - httponly, hasExpires, creation, lastAccess, expires, - TCefFastSetCookieCallback.Create(callback)); -end; - -function TCefCookieManagerRef.SetStoragePath(const path: ustring; - persistSessionCookies: Boolean; const callback: ICefCompletionCallback): Boolean; -var - p: TCefString; -begin - p := CefString(path); - Result := PCefCookieManager(FData)^.set_storage_path( - PCefCookieManager(FData), @p, Ord(persistSessionCookies), CefGetData(callback)) <> 0; -end; - -function TCefCookieManagerRef.SetStoragePathProc(const path: ustring; - persistSessionCookies: Boolean; - const callback: TCefCompletionCallbackProc): Boolean; -begin - Result := SetStoragePath(path, persistSessionCookies, TCefFastCompletionCallback.Create(callback)); -end; - -procedure TCefCookieManagerRef.SetSupportedSchemes(schemes: TStrings; const callback: ICefCompletionCallback); -var - list: TCefStringList; - i: Integer; - item: TCefString; -begin - list := cef_string_list_alloc(); - try - if (schemes <> nil) then - for i := 0 to schemes.Count - 1 do - begin - item := CefString(schemes[i]); - cef_string_list_append(list, @item); - end; - PCefCookieManager(FData).set_supported_schemes( - PCefCookieManager(FData), list, CefGetData(callback)); - - finally - cef_string_list_free(list); - end; -end; - -procedure TCefCookieManagerRef.SetSupportedSchemesProc(schemes: TStrings; - const callback: TCefCompletionCallbackProc); -begin - SetSupportedSchemes(schemes, TCefFastCompletionCallback.Create(callback)); -end; - -class function TCefCookieManagerRef.UnWrap(data: Pointer): ICefCookieManager; -begin - if data <> nil then - Result := Create(data) as ICefCookieManager else - Result := nil; -end; - -function TCefCookieManagerRef.VisitAllCookies( - const visitor: ICefCookieVisitor): Boolean; -begin - Result := PCefCookieManager(FData).visit_all_cookies( - PCefCookieManager(FData), CefGetData(visitor)) <> 0; -end; - -function TCefCookieManagerRef.VisitAllCookiesProc( - const visitor: TCefCookieVisitorProc): Boolean; -begin - Result := VisitAllCookies( - TCefFastCookieVisitor.Create(visitor) as ICefCookieVisitor); -end; - -function TCefCookieManagerRef.VisitUrlCookies(const url: ustring; - includeHttpOnly: Boolean; const visitor: ICefCookieVisitor): Boolean; -var - str: TCefString; -begin - str := CefString(url); - Result := PCefCookieManager(FData).visit_url_cookies(PCefCookieManager(FData), @str, Ord(includeHttpOnly), CefGetData(visitor)) <> 0; -end; - -function TCefCookieManagerRef.VisitUrlCookiesProc(const url: ustring; - includeHttpOnly: Boolean; const visitor: TCefCookieVisitorProc): Boolean; -begin - Result := VisitUrlCookies(url, includeHttpOnly, - TCefFastCookieVisitor.Create(visitor) as ICefCookieVisitor); -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFCookieManager; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefCookieManagerRef = class(TCefBaseRef, ICefCookieManager) + protected + procedure SetSupportedSchemes(schemes: TStrings; const callback: ICefCompletionCallback); + procedure SetSupportedSchemesProc(schemes: TStrings; const callback: TCefCompletionCallbackProc); + function VisitAllCookies(const visitor: ICefCookieVisitor): Boolean; + function VisitAllCookiesProc(const visitor: TCefCookieVisitorProc): Boolean; + function VisitUrlCookies(const url: ustring; includeHttpOnly: Boolean; const visitor: ICefCookieVisitor): Boolean; + function VisitUrlCookiesProc(const url: ustring; includeHttpOnly: Boolean; const visitor: TCefCookieVisitorProc): Boolean; + function SetCookie(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: ICefSetCookieCallback): Boolean; + function SetCookieProc(const url: ustring; const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; const callback: TCefSetCookieCallbackProc): Boolean; + function DeleteCookies(const url, cookieName: ustring; const callback: ICefDeleteCookiesCallback): Boolean; + function DeleteCookiesProc(const url, cookieName: ustring; const callback: TCefDeleteCookiesCallbackProc): Boolean; + function SetStoragePath(const path: ustring; persistSessionCookies: Boolean; const callback: ICefCompletionCallback): Boolean; + function SetStoragePathProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): Boolean; + function FlushStore(const handler: ICefCompletionCallback): Boolean; + function FlushStoreProc(const proc: TCefCompletionCallbackProc): Boolean; + + public + class function UnWrap(data: Pointer): ICefCookieManager; + class function Global(const callback: ICefCompletionCallback): ICefCookieManager; + class function GlobalProc(const callback: TCefCompletionCallbackProc): ICefCookieManager; + class function New(const path: ustring; persistSessionCookies: Boolean; const callback: ICefCompletionCallback): ICefCookieManager; + class function NewProc(const path: ustring; persistSessionCookies: Boolean; const callback: TCefCompletionCallbackProc): ICefCookieManager; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions, uCEFCompletionCallback, uCEFDeleteCookiesCallback, + uCEFSetCookieCallback, uCEFCookieVisitor; + +class function TCefCookieManagerRef.New(const path: ustring; persistSessionCookies: Boolean; + const callback: ICefCompletionCallback): ICefCookieManager; +var + pth: TCefString; +begin + pth := CefString(path); + Result := UnWrap(cef_cookie_manager_create_manager(@pth, Ord(persistSessionCookies), CefGetData(callback))); +end; + +class function TCefCookieManagerRef.NewProc(const path: ustring; + persistSessionCookies: Boolean; + const callback: TCefCompletionCallbackProc): ICefCookieManager; +begin + Result := New(path, persistSessionCookies, TCefFastCompletionCallback.Create(callback)); +end; + +function TCefCookieManagerRef.DeleteCookies(const url, + cookieName: ustring; const callback: ICefDeleteCookiesCallback): Boolean; +var + u, n: TCefString; +begin + u := CefString(url); + n := CefString(cookieName); + Result := PCefCookieManager(FData).delete_cookies( + PCefCookieManager(FData), @u, @n, CefGetData(callback)) <> 0; +end; + +function TCefCookieManagerRef.DeleteCookiesProc(const url, cookieName: ustring; + const callback: TCefDeleteCookiesCallbackProc): Boolean; +begin + Result := DeleteCookies(url, cookieName, TCefFastDeleteCookiesCallback.Create(callback)); +end; + +function TCefCookieManagerRef.FlushStore( + const handler: ICefCompletionCallback): Boolean; +begin + Result := PCefCookieManager(FData).flush_store(PCefCookieManager(FData), + CefGetData(handler)) <> 0; +end; + +function TCefCookieManagerRef.FlushStoreProc( + const proc: TCefCompletionCallbackProc): Boolean; +begin + Result := FlushStore(TCefFastCompletionCallback.Create(proc)) +end; + +class function TCefCookieManagerRef.Global(const callback: ICefCompletionCallback): ICefCookieManager; +begin + Result := UnWrap(cef_cookie_manager_get_global_manager(CefGetData(callback))); +end; + +class function TCefCookieManagerRef.GlobalProc( + const callback: TCefCompletionCallbackProc): ICefCookieManager; +begin + Result := Global(TCefFastCompletionCallback.Create(callback)); +end; + +function TCefCookieManagerRef.SetCookie(const url, name, value, domain, + path: ustring; secure, httponly, hasExpires: Boolean; const creation, + lastAccess, expires: TDateTime; const callback: ICefSetCookieCallback): Boolean; +var + str: TCefString; + cook: TCefCookie; +begin + str := CefString(url); + cook.name := CefString(name); + cook.value := CefString(value); + cook.domain := CefString(domain); + cook.path := CefString(path); + cook.secure := Ord(secure); + cook.httponly := Ord(httponly); + cook.creation := DateTimeToCefTime(creation); + cook.last_access := DateTimeToCefTime(lastAccess); + cook.has_expires := Ord(hasExpires); + if hasExpires then + cook.expires := DateTimeToCefTime(expires) else + FillChar(cook.expires, SizeOf(TCefTime), 0); + Result := PCefCookieManager(FData).set_cookie( + PCefCookieManager(FData), @str, @cook, CefGetData(callback)) <> 0; +end; + +function TCefCookieManagerRef.SetCookieProc(const url, name, value, domain, + path: ustring; secure, httponly, hasExpires: Boolean; const creation, + lastAccess, expires: TDateTime; + const callback: TCefSetCookieCallbackProc): Boolean; +begin + Result := SetCookie(url, name, value, domain, path, secure, + httponly, hasExpires, creation, lastAccess, expires, + TCefFastSetCookieCallback.Create(callback)); +end; + +function TCefCookieManagerRef.SetStoragePath(const path: ustring; + persistSessionCookies: Boolean; const callback: ICefCompletionCallback): Boolean; +var + p: TCefString; +begin + p := CefString(path); + Result := PCefCookieManager(FData)^.set_storage_path( + PCefCookieManager(FData), @p, Ord(persistSessionCookies), CefGetData(callback)) <> 0; +end; + +function TCefCookieManagerRef.SetStoragePathProc(const path: ustring; + persistSessionCookies: Boolean; + const callback: TCefCompletionCallbackProc): Boolean; +begin + Result := SetStoragePath(path, persistSessionCookies, TCefFastCompletionCallback.Create(callback)); +end; + +procedure TCefCookieManagerRef.SetSupportedSchemes(schemes: TStrings; const callback: ICefCompletionCallback); +var + list: TCefStringList; + i: Integer; + item: TCefString; +begin + list := cef_string_list_alloc(); + try + if (schemes <> nil) then + for i := 0 to schemes.Count - 1 do + begin + item := CefString(schemes[i]); + cef_string_list_append(list, @item); + end; + PCefCookieManager(FData).set_supported_schemes( + PCefCookieManager(FData), list, CefGetData(callback)); + + finally + cef_string_list_free(list); + end; +end; + +procedure TCefCookieManagerRef.SetSupportedSchemesProc(schemes: TStrings; + const callback: TCefCompletionCallbackProc); +begin + SetSupportedSchemes(schemes, TCefFastCompletionCallback.Create(callback)); +end; + +class function TCefCookieManagerRef.UnWrap(data: Pointer): ICefCookieManager; +begin + if data <> nil then + Result := Create(data) as ICefCookieManager else + Result := nil; +end; + +function TCefCookieManagerRef.VisitAllCookies( + const visitor: ICefCookieVisitor): Boolean; +begin + Result := PCefCookieManager(FData).visit_all_cookies( + PCefCookieManager(FData), CefGetData(visitor)) <> 0; +end; + +function TCefCookieManagerRef.VisitAllCookiesProc( + const visitor: TCefCookieVisitorProc): Boolean; +begin + Result := VisitAllCookies( + TCefFastCookieVisitor.Create(visitor) as ICefCookieVisitor); +end; + +function TCefCookieManagerRef.VisitUrlCookies(const url: ustring; + includeHttpOnly: Boolean; const visitor: ICefCookieVisitor): Boolean; +var + str: TCefString; +begin + str := CefString(url); + Result := PCefCookieManager(FData).visit_url_cookies(PCefCookieManager(FData), @str, Ord(includeHttpOnly), CefGetData(visitor)) <> 0; +end; + +function TCefCookieManagerRef.VisitUrlCookiesProc(const url: ustring; + includeHttpOnly: Boolean; const visitor: TCefCookieVisitorProc): Boolean; +begin + Result := VisitUrlCookies(url, includeHttpOnly, + TCefFastCookieVisitor.Create(visitor) as ICefCookieVisitor); +end; + +end. diff --git a/uCEFCookieVisitor.pas b/source/uCEFCookieVisitor.pas similarity index 97% rename from uCEFCookieVisitor.pas rename to source/uCEFCookieVisitor.pas index e6a0d21d..dd0b11a6 100644 --- a/uCEFCookieVisitor.pas +++ b/source/uCEFCookieVisitor.pas @@ -1,124 +1,124 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFCookieVisitor; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefCookieVisitorOwn = class(TCefBaseOwn, ICefCookieVisitor) - protected - function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; virtual; - - public - constructor Create; virtual; - end; - - TCefFastCookieVisitor = class(TCefCookieVisitorOwn) - protected - FVisitor: TCefCookieVisitorProc; - - function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; override; - - public - constructor Create(const visitor: TCefCookieVisitorProc); reintroduce; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -function cef_cookie_visitor_visit(self: PCefCookieVisitor; const cookie: PCefCookie; - count, total: Integer; deleteCookie: PInteger): Integer; stdcall; -var - delete: Boolean; - exp: TDateTime; -begin - delete := False; - if cookie.has_expires <> 0 then - exp := CefTimeToDateTime(cookie.expires) else - exp := 0; - Result := Ord(TCefCookieVisitorOwn(CefGetObject(self)).visit(CefString(@cookie.name), - CefString(@cookie.value), CefString(@cookie.domain), CefString(@cookie.path), - Boolean(cookie.secure), Boolean(cookie.httponly), Boolean(cookie.has_expires), CefTimeToDateTime(cookie.creation), - CefTimeToDateTime(cookie.last_access), exp, count, total, delete)); - deleteCookie^ := Ord(delete); -end; - -// TCefCookieVisitorOwn - -constructor TCefCookieVisitorOwn.Create; -begin - inherited CreateData(SizeOf(TCefCookieVisitor)); - PCefCookieVisitor(FData)^.visit := cef_cookie_visitor_visit; -end; - -function TCefCookieVisitorOwn.visit(const name, value, domain, path: ustring; - secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; - count, total: Integer; out deleteCookie: Boolean): Boolean; -begin - Result := True; -end; - -// TCefFastCookieVisitor - -constructor TCefFastCookieVisitor.Create(const visitor: TCefCookieVisitorProc); -begin - inherited Create; - FVisitor := visitor; -end; - -function TCefFastCookieVisitor.visit(const name, value, domain, path: ustring; - secure, httponly, hasExpires: Boolean; const creation, lastAccess, - expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; -begin - Result := FVisitor(name, value, domain, path, secure, httponly, hasExpires, - creation, lastAccess, expires, count, total, deleteCookie); -end; - - - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFCookieVisitor; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefCookieVisitorOwn = class(TCefBaseOwn, ICefCookieVisitor) + protected + function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; virtual; + + public + constructor Create; virtual; + end; + + TCefFastCookieVisitor = class(TCefCookieVisitorOwn) + protected + FVisitor: TCefCookieVisitorProc; + + function visit(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; override; + + public + constructor Create(const visitor: TCefCookieVisitorProc); reintroduce; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + +function cef_cookie_visitor_visit(self: PCefCookieVisitor; const cookie: PCefCookie; + count, total: Integer; deleteCookie: PInteger): Integer; stdcall; +var + delete: Boolean; + exp: TDateTime; +begin + delete := False; + if cookie.has_expires <> 0 then + exp := CefTimeToDateTime(cookie.expires) else + exp := 0; + Result := Ord(TCefCookieVisitorOwn(CefGetObject(self)).visit(CefString(@cookie.name), + CefString(@cookie.value), CefString(@cookie.domain), CefString(@cookie.path), + Boolean(cookie.secure), Boolean(cookie.httponly), Boolean(cookie.has_expires), CefTimeToDateTime(cookie.creation), + CefTimeToDateTime(cookie.last_access), exp, count, total, delete)); + deleteCookie^ := Ord(delete); +end; + +// TCefCookieVisitorOwn + +constructor TCefCookieVisitorOwn.Create; +begin + inherited CreateData(SizeOf(TCefCookieVisitor)); + PCefCookieVisitor(FData)^.visit := cef_cookie_visitor_visit; +end; + +function TCefCookieVisitorOwn.visit(const name, value, domain, path: ustring; + secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires: TDateTime; + count, total: Integer; out deleteCookie: Boolean): Boolean; +begin + Result := True; +end; + +// TCefFastCookieVisitor + +constructor TCefFastCookieVisitor.Create(const visitor: TCefCookieVisitorProc); +begin + inherited Create; + FVisitor := visitor; +end; + +function TCefFastCookieVisitor.visit(const name, value, domain, path: ustring; + secure, httponly, hasExpires: Boolean; const creation, lastAccess, + expires: TDateTime; count, total: Integer; out deleteCookie: Boolean): Boolean; +begin + Result := FVisitor(name, value, domain, path, secure, httponly, hasExpires, + creation, lastAccess, expires, count, total, deleteCookie); +end; + + + +end. diff --git a/uCEFCustomStreamReader.pas b/source/uCEFCustomStreamReader.pas similarity index 96% rename from uCEFCustomStreamReader.pas rename to source/uCEFCustomStreamReader.pas index c7d20375..ae74c6e3 100644 --- a/uCEFCustomStreamReader.pas +++ b/source/uCEFCustomStreamReader.pas @@ -1,157 +1,157 @@ -// ************************************************************************ -// ***************************** CEF4Delphi ******************************* -// ************************************************************************ -// -// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based -// browser in Delphi applications. -// -// The original license of DCEF3 still applies to CEF4Delphi. -// -// For more information about CEF4Delphi visit : -// https://www.briskbard.com/index.php?lang=en&pageid=cef -// -// Copyright © 2017 Salvador Díaz Fau. All rights reserved. -// -// ************************************************************************ -// ************ vvvv Original license and comments below vvvv ************* -// ************************************************************************ -(* - * Delphi Chromium Embedded 3 - * - * Usage allowed under the restrictions of the Lesser GNU General Public License - * or alternatively the restrictions of the Mozilla Public License 1.1 - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for - * the specific language governing rights and limitations under the License. - * - * Unit owner : Henri Gourvest - * Web site : http://www.progdigy.com - * Repository : http://code.google.com/p/delphichromiumembedded/ - * Group : http://groups.google.com/group/delphichromiumembedded - * - * Embarcadero Technologies, Inc is not permitted to use or redistribute - * this source code without explicit permission. - * - *) - -unit uCEFCustomStreamReader; - -{$IFNDEF CPUX64} - {$ALIGN ON} - {$MINENUMSIZE 4} -{$ENDIF} - -interface - -uses - System.Classes, System.SysUtils, - uCEFBase, uCEFInterfaces, uCEFTypes; - -type - TCefCustomStreamReader = class(TCefBaseOwn, ICefCustomStreamReader) - protected - FStream: TStream; - FOwned: Boolean; - - function Read(ptr: Pointer; size, n: NativeUInt): NativeUInt; virtual; - function Seek(offset: Int64; whence: Integer): Integer; virtual; - function Tell: Int64; virtual; - function Eof: Boolean; virtual; - function MayBlock: Boolean; virtual; - - public - constructor Create(Stream: TStream; Owned: Boolean); overload; virtual; - constructor Create(const filename: string); overload; virtual; - destructor Destroy; override; - end; - -implementation - -uses - uCEFMiscFunctions, uCEFLibFunctions; - -function cef_stream_reader_read(self: PCefReadHandler; ptr: Pointer; size, n: NativeUInt): NativeUInt; stdcall; -begin - with TCefCustomStreamReader(CefGetObject(self)) do - Result := Read(ptr, size, n); -end; - -function cef_stream_reader_seek(self: PCefReadHandler; offset: Int64; whence: Integer): Integer; stdcall; -begin - with TCefCustomStreamReader(CefGetObject(self)) do - Result := Seek(offset, whence); -end; - -function cef_stream_reader_tell(self: PCefReadHandler): Int64; stdcall; -begin - with TCefCustomStreamReader(CefGetObject(self)) do - Result := Tell; -end; - -function cef_stream_reader_eof(self: PCefReadHandler): Integer; stdcall; -begin - with TCefCustomStreamReader(CefGetObject(self)) do - Result := Ord(Eof); -end; - -function cef_stream_reader_may_block(self: PCefReadHandler): Integer; stdcall; -begin - with TCefCustomStreamReader(CefGetObject(self)) do - Result := Ord(MayBlock); -end; - - -constructor TCefCustomStreamReader.Create(Stream: TStream; Owned: Boolean); -begin - inherited CreateData(SizeOf(TCefReadHandler)); - FStream := stream; - FOwned := Owned; - with PCefReadHandler(FData)^ do - begin - read := cef_stream_reader_read; - seek := cef_stream_reader_seek; - tell := cef_stream_reader_tell; - eof := cef_stream_reader_eof; - may_block := cef_stream_reader_may_block; - end; -end; - -constructor TCefCustomStreamReader.Create(const filename: string); -begin - Create(TFileStream.Create(filename, fmOpenRead or fmShareDenyWrite), True); -end; - -destructor TCefCustomStreamReader.Destroy; -begin - if FOwned then - FStream.Free; - inherited; -end; - -function TCefCustomStreamReader.Eof: Boolean; -begin - Result := FStream.Position = FStream.size; -end; - -function TCefCustomStreamReader.MayBlock: Boolean; -begin - Result := False; -end; - -function TCefCustomStreamReader.Read(ptr: Pointer; size, n: NativeUInt): NativeUInt; -begin - result := NativeUInt(FStream.Read(ptr^, n * size)) div size; -end; - -function TCefCustomStreamReader.Seek(offset: Int64; whence: Integer): Integer; -begin - Result := FStream.Seek(offset, TSeekOrigin(whence)); -end; - -function TCefCustomStreamReader.Tell: Int64; -begin - Result := FStream.Position; -end; - -end. +// ************************************************************************ +// ***************************** CEF4Delphi ******************************* +// ************************************************************************ +// +// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based +// browser in Delphi applications. +// +// The original license of DCEF3 still applies to CEF4Delphi. +// +// For more information about CEF4Delphi visit : +// https://www.briskbard.com/index.php?lang=en&pageid=cef +// +// Copyright © 2017 Salvador Díaz Fau. All rights reserved. +// +// ************************************************************************ +// ************ vvvv Original license and comments below vvvv ************* +// ************************************************************************ +(* + * Delphi Chromium Embedded 3 + * + * Usage allowed under the restrictions of the Lesser GNU General Public License + * or alternatively the restrictions of the Mozilla Public License 1.1 + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for + * the specific language governing rights and limitations under the License. + * + * Unit owner : Henri Gourvest + * Web site : http://www.progdigy.com + * Repository : http://code.google.com/p/delphichromiumembedded/ + * Group : http://groups.google.com/group/delphichromiumembedded + * + * Embarcadero Technologies, Inc is not permitted to use or redistribute + * this source code without explicit permission. + * + *) + +unit uCEFCustomStreamReader; + +{$IFNDEF CPUX64} + {$ALIGN ON} + {$MINENUMSIZE 4} +{$ENDIF} + +interface + +uses + System.Classes, System.SysUtils, + uCEFBase, uCEFInterfaces, uCEFTypes; + +type + TCefCustomStreamReader = class(TCefBaseOwn, ICefCustomStreamReader) + protected + FStream: TStream; + FOwned: Boolean; + + function Read(ptr: Pointer; size, n: NativeUInt): NativeUInt; virtual; + function Seek(offset: Int64; whence: Integer): Integer; virtual; + function Tell: Int64; virtual; + function Eof: Boolean; virtual; + function MayBlock: Boolean; virtual; + + public + constructor Create(Stream: TStream; Owned: Boolean); overload; virtual; + constructor Create(const filename: string); overload; virtual; + destructor Destroy; override; + end; + +implementation + +uses + uCEFMiscFunctions, uCEFLibFunctions; + +function cef_stream_reader_read(self: PCefReadHandler; ptr: Pointer; size, n: NativeUInt): NativeUInt; stdcall; +begin + with TCefCustomStreamReader(CefGetObject(self)) do + Result := Read(ptr, size, n); +end; + +function cef_stream_reader_seek(self: PCefReadHandler; offset: Int64; whence: Integer): Integer; stdcall; +begin + with TCefCustomStreamReader(CefGetObject(self)) do + Result := Seek(offset, whence); +end; + +function cef_stream_reader_tell(self: PCefReadHandler): Int64; stdcall; +begin + with TCefCustomStreamReader(CefGetObject(self)) do + Result := Tell; +end; + +function cef_stream_reader_eof(self: PCefReadHandler): Integer; stdcall; +begin + with TCefCustomStreamReader(CefGetObject(self)) do + Result := Ord(Eof); +end; + +function cef_stream_reader_may_block(self: PCefReadHandler): Integer; stdcall; +begin + with TCefCustomStreamReader(CefGetObject(self)) do + Result := Ord(MayBlock); +end; + + +constructor TCefCustomStreamReader.Create(Stream: TStream; Owned: Boolean); +begin + inherited CreateData(SizeOf(TCefReadHandler)); + FStream := stream; + FOwned := Owned; + with PCefReadHandler(FData)^ do + begin + read := cef_stream_reader_read; + seek := cef_stream_reader_seek; + tell := cef_stream_reader_tell; + eof := cef_stream_reader_eof; + may_block := cef_stream_reader_may_block; + end; +end; + +constructor TCefCustomStreamReader.Create(const filename: string); +begin + Create(TFileStream.Create(filename, fmOpenRead or fmShareDenyWrite), True); +end; + +destructor TCefCustomStreamReader.Destroy; +begin + if FOwned then + FStream.Free; + inherited; +end; + +function TCefCustomStreamReader.Eof: Boolean; +begin + Result := FStream.Position = FStream.size; +end; + +function TCefCustomStreamReader.MayBlock: Boolean; +begin + Result := False; +end; + +function TCefCustomStreamReader.Read(ptr: Pointer; size, n: NativeUInt): NativeUInt; +begin + result := NativeUInt(FStream.Read(ptr^, n * size)) div size; +end; + +function TCefCustomStreamReader.Seek(offset: Int64; whence: Integer): Integer; +begin + Result := FStream.Seek(offset, TSeekOrigin(whence)); +end; + +function TCefCustomStreamReader.Tell: Int64; +begin + Result := FStream.Position; +end; + +end. diff --git a/uCEFDeleteCookiesCallback.pas b/source/uCEFDeleteCookiesCallback.pas similarity index 100% rename from uCEFDeleteCookiesCallback.pas rename to source/uCEFDeleteCookiesCallback.pas diff --git a/uCEFDialogHandler.pas b/source/uCEFDialogHandler.pas similarity index 100% rename from uCEFDialogHandler.pas rename to source/uCEFDialogHandler.pas diff --git a/uCEFDictionaryValue.pas b/source/uCEFDictionaryValue.pas similarity index 100% rename from uCEFDictionaryValue.pas rename to source/uCEFDictionaryValue.pas diff --git a/uCEFDisplayHandler.pas b/source/uCEFDisplayHandler.pas similarity index 100% rename from uCEFDisplayHandler.pas rename to source/uCEFDisplayHandler.pas diff --git a/uCEFDomDocument.pas b/source/uCEFDomDocument.pas similarity index 100% rename from uCEFDomDocument.pas rename to source/uCEFDomDocument.pas diff --git a/uCEFDomNode.pas b/source/uCEFDomNode.pas similarity index 100% rename from uCEFDomNode.pas rename to source/uCEFDomNode.pas diff --git a/uCEFDomVisitor.pas b/source/uCEFDomVisitor.pas similarity index 100% rename from uCEFDomVisitor.pas rename to source/uCEFDomVisitor.pas diff --git a/uCEFDownLoadItem.pas b/source/uCEFDownLoadItem.pas similarity index 100% rename from uCEFDownLoadItem.pas rename to source/uCEFDownLoadItem.pas diff --git a/uCEFDownloadHandler.pas b/source/uCEFDownloadHandler.pas similarity index 100% rename from uCEFDownloadHandler.pas rename to source/uCEFDownloadHandler.pas diff --git a/uCEFDownloadImageCallBack.pas b/source/uCEFDownloadImageCallBack.pas similarity index 100% rename from uCEFDownloadImageCallBack.pas rename to source/uCEFDownloadImageCallBack.pas diff --git a/uCEFDownloadItemCallback.pas b/source/uCEFDownloadItemCallback.pas similarity index 100% rename from uCEFDownloadItemCallback.pas rename to source/uCEFDownloadItemCallback.pas diff --git a/uCEFDragData.pas b/source/uCEFDragData.pas similarity index 100% rename from uCEFDragData.pas rename to source/uCEFDragData.pas diff --git a/uCEFDragHandler.pas b/source/uCEFDragHandler.pas similarity index 100% rename from uCEFDragHandler.pas rename to source/uCEFDragHandler.pas diff --git a/uCEFEndTracingCallback.pas b/source/uCEFEndTracingCallback.pas similarity index 100% rename from uCEFEndTracingCallback.pas rename to source/uCEFEndTracingCallback.pas diff --git a/uCEFFileDialogCallback.pas b/source/uCEFFileDialogCallback.pas similarity index 100% rename from uCEFFileDialogCallback.pas rename to source/uCEFFileDialogCallback.pas diff --git a/uCEFFindHandler.pas b/source/uCEFFindHandler.pas similarity index 100% rename from uCEFFindHandler.pas rename to source/uCEFFindHandler.pas diff --git a/uCEFFocusHandler.pas b/source/uCEFFocusHandler.pas similarity index 100% rename from uCEFFocusHandler.pas rename to source/uCEFFocusHandler.pas diff --git a/uCEFFrame.pas b/source/uCEFFrame.pas similarity index 100% rename from uCEFFrame.pas rename to source/uCEFFrame.pas diff --git a/uCEFGeolocationCallback.pas b/source/uCEFGeolocationCallback.pas similarity index 100% rename from uCEFGeolocationCallback.pas rename to source/uCEFGeolocationCallback.pas diff --git a/uCEFGeolocationHandler.pas b/source/uCEFGeolocationHandler.pas similarity index 100% rename from uCEFGeolocationHandler.pas rename to source/uCEFGeolocationHandler.pas diff --git a/uCEFGetGeolocationCallback.pas b/source/uCEFGetGeolocationCallback.pas similarity index 100% rename from uCEFGetGeolocationCallback.pas rename to source/uCEFGetGeolocationCallback.pas diff --git a/uCEFImage.pas b/source/uCEFImage.pas similarity index 100% rename from uCEFImage.pas rename to source/uCEFImage.pas diff --git a/uCEFInterfaces.pas b/source/uCEFInterfaces.pas similarity index 100% rename from uCEFInterfaces.pas rename to source/uCEFInterfaces.pas diff --git a/uCEFJsDialogCallback.pas b/source/uCEFJsDialogCallback.pas similarity index 100% rename from uCEFJsDialogCallback.pas rename to source/uCEFJsDialogCallback.pas diff --git a/uCEFJsDialogHandler.pas b/source/uCEFJsDialogHandler.pas similarity index 100% rename from uCEFJsDialogHandler.pas rename to source/uCEFJsDialogHandler.pas diff --git a/uCEFKeyboardHandler.pas b/source/uCEFKeyboardHandler.pas similarity index 100% rename from uCEFKeyboardHandler.pas rename to source/uCEFKeyboardHandler.pas diff --git a/uCEFLibFunctions.pas b/source/uCEFLibFunctions.pas similarity index 100% rename from uCEFLibFunctions.pas rename to source/uCEFLibFunctions.pas diff --git a/uCEFLifeSpanHandler.pas b/source/uCEFLifeSpanHandler.pas similarity index 100% rename from uCEFLifeSpanHandler.pas rename to source/uCEFLifeSpanHandler.pas diff --git a/uCEFListValue.pas b/source/uCEFListValue.pas similarity index 100% rename from uCEFListValue.pas rename to source/uCEFListValue.pas diff --git a/uCEFLoadHandler.pas b/source/uCEFLoadHandler.pas similarity index 100% rename from uCEFLoadHandler.pas rename to source/uCEFLoadHandler.pas diff --git a/uCEFMenuModel.pas b/source/uCEFMenuModel.pas similarity index 100% rename from uCEFMenuModel.pas rename to source/uCEFMenuModel.pas diff --git a/uCEFMenuModelDelegate.pas b/source/uCEFMenuModelDelegate.pas similarity index 100% rename from uCEFMenuModelDelegate.pas rename to source/uCEFMenuModelDelegate.pas diff --git a/uCEFMiscFunctions.pas b/source/uCEFMiscFunctions.pas similarity index 100% rename from uCEFMiscFunctions.pas rename to source/uCEFMiscFunctions.pas diff --git a/uCEFNavigationEntry.pas b/source/uCEFNavigationEntry.pas similarity index 100% rename from uCEFNavigationEntry.pas rename to source/uCEFNavigationEntry.pas diff --git a/uCEFNavigationEntryVisitor.pas b/source/uCEFNavigationEntryVisitor.pas similarity index 100% rename from uCEFNavigationEntryVisitor.pas rename to source/uCEFNavigationEntryVisitor.pas diff --git a/uCEFPDFPrintCallback.pas b/source/uCEFPDFPrintCallback.pas similarity index 100% rename from uCEFPDFPrintCallback.pas rename to source/uCEFPDFPrintCallback.pas diff --git a/uCEFPDFPrintOptions.pas b/source/uCEFPDFPrintOptions.pas similarity index 100% rename from uCEFPDFPrintOptions.pas rename to source/uCEFPDFPrintOptions.pas diff --git a/uCEFPostData.pas b/source/uCEFPostData.pas similarity index 100% rename from uCEFPostData.pas rename to source/uCEFPostData.pas diff --git a/uCEFPostDataElement.pas b/source/uCEFPostDataElement.pas similarity index 100% rename from uCEFPostDataElement.pas rename to source/uCEFPostDataElement.pas diff --git a/uCEFPrintSettings.pas b/source/uCEFPrintSettings.pas similarity index 100% rename from uCEFPrintSettings.pas rename to source/uCEFPrintSettings.pas diff --git a/uCEFProcessMessage.pas b/source/uCEFProcessMessage.pas similarity index 100% rename from uCEFProcessMessage.pas rename to source/uCEFProcessMessage.pas diff --git a/uCEFRegisterCDMCallback.pas b/source/uCEFRegisterCDMCallback.pas similarity index 100% rename from uCEFRegisterCDMCallback.pas rename to source/uCEFRegisterCDMCallback.pas diff --git a/uCEFRegisterComponents.pas b/source/uCEFRegisterComponents.pas similarity index 100% rename from uCEFRegisterComponents.pas rename to source/uCEFRegisterComponents.pas diff --git a/uCEFRenderHandler.pas b/source/uCEFRenderHandler.pas similarity index 100% rename from uCEFRenderHandler.pas rename to source/uCEFRenderHandler.pas diff --git a/uCEFRenderProcessHandler.pas b/source/uCEFRenderProcessHandler.pas similarity index 100% rename from uCEFRenderProcessHandler.pas rename to source/uCEFRenderProcessHandler.pas diff --git a/uCEFRequest.pas b/source/uCEFRequest.pas similarity index 100% rename from uCEFRequest.pas rename to source/uCEFRequest.pas diff --git a/uCEFRequestCallback.pas b/source/uCEFRequestCallback.pas similarity index 100% rename from uCEFRequestCallback.pas rename to source/uCEFRequestCallback.pas diff --git a/uCEFRequestContext.pas b/source/uCEFRequestContext.pas similarity index 100% rename from uCEFRequestContext.pas rename to source/uCEFRequestContext.pas diff --git a/uCEFRequestContextHandler.pas b/source/uCEFRequestContextHandler.pas similarity index 100% rename from uCEFRequestContextHandler.pas rename to source/uCEFRequestContextHandler.pas diff --git a/uCEFRequestHandler.pas b/source/uCEFRequestHandler.pas similarity index 100% rename from uCEFRequestHandler.pas rename to source/uCEFRequestHandler.pas diff --git a/uCEFResolveCallback.pas b/source/uCEFResolveCallback.pas similarity index 100% rename from uCEFResolveCallback.pas rename to source/uCEFResolveCallback.pas diff --git a/uCEFResourceBundle.pas b/source/uCEFResourceBundle.pas similarity index 100% rename from uCEFResourceBundle.pas rename to source/uCEFResourceBundle.pas diff --git a/uCEFResourceBundleHandler.pas b/source/uCEFResourceBundleHandler.pas similarity index 100% rename from uCEFResourceBundleHandler.pas rename to source/uCEFResourceBundleHandler.pas diff --git a/uCEFResourceHandler.pas b/source/uCEFResourceHandler.pas similarity index 100% rename from uCEFResourceHandler.pas rename to source/uCEFResourceHandler.pas diff --git a/uCEFResponse.pas b/source/uCEFResponse.pas similarity index 100% rename from uCEFResponse.pas rename to source/uCEFResponse.pas diff --git a/uCEFResponseFilter.pas b/source/uCEFResponseFilter.pas similarity index 100% rename from uCEFResponseFilter.pas rename to source/uCEFResponseFilter.pas diff --git a/uCEFRunContextMenuCallback.pas b/source/uCEFRunContextMenuCallback.pas similarity index 100% rename from uCEFRunContextMenuCallback.pas rename to source/uCEFRunContextMenuCallback.pas diff --git a/uCEFRunFileDialogCallback.pas b/source/uCEFRunFileDialogCallback.pas similarity index 100% rename from uCEFRunFileDialogCallback.pas rename to source/uCEFRunFileDialogCallback.pas diff --git a/uCEFSSLStatus.pas b/source/uCEFSSLStatus.pas similarity index 100% rename from uCEFSSLStatus.pas rename to source/uCEFSSLStatus.pas diff --git a/uCEFSchemeHandlerFactory.pas b/source/uCEFSchemeHandlerFactory.pas similarity index 100% rename from uCEFSchemeHandlerFactory.pas rename to source/uCEFSchemeHandlerFactory.pas diff --git a/uCEFSchemeRegistrar.pas b/source/uCEFSchemeRegistrar.pas similarity index 100% rename from uCEFSchemeRegistrar.pas rename to source/uCEFSchemeRegistrar.pas diff --git a/uCEFSelectClientCertificateCallback.pas b/source/uCEFSelectClientCertificateCallback.pas similarity index 100% rename from uCEFSelectClientCertificateCallback.pas rename to source/uCEFSelectClientCertificateCallback.pas diff --git a/uCEFSetCookieCallback.pas b/source/uCEFSetCookieCallback.pas similarity index 100% rename from uCEFSetCookieCallback.pas rename to source/uCEFSetCookieCallback.pas diff --git a/uCEFSslInfo.pas b/source/uCEFSslInfo.pas similarity index 100% rename from uCEFSslInfo.pas rename to source/uCEFSslInfo.pas diff --git a/uCEFStreamReader.pas b/source/uCEFStreamReader.pas similarity index 100% rename from uCEFStreamReader.pas rename to source/uCEFStreamReader.pas diff --git a/uCEFStreamWriter.pas b/source/uCEFStreamWriter.pas similarity index 100% rename from uCEFStreamWriter.pas rename to source/uCEFStreamWriter.pas diff --git a/uCEFStringMap.pas b/source/uCEFStringMap.pas similarity index 100% rename from uCEFStringMap.pas rename to source/uCEFStringMap.pas diff --git a/uCEFStringMultimap.pas b/source/uCEFStringMultimap.pas similarity index 100% rename from uCEFStringMultimap.pas rename to source/uCEFStringMultimap.pas diff --git a/uCEFStringVisitor.pas b/source/uCEFStringVisitor.pas similarity index 100% rename from uCEFStringVisitor.pas rename to source/uCEFStringVisitor.pas diff --git a/uCEFTask.pas b/source/uCEFTask.pas similarity index 100% rename from uCEFTask.pas rename to source/uCEFTask.pas diff --git a/uCEFTaskRunner.pas b/source/uCEFTaskRunner.pas similarity index 100% rename from uCEFTaskRunner.pas rename to source/uCEFTaskRunner.pas diff --git a/uCEFThread.pas b/source/uCEFThread.pas similarity index 100% rename from uCEFThread.pas rename to source/uCEFThread.pas diff --git a/uCEFTypes.pas b/source/uCEFTypes.pas similarity index 100% rename from uCEFTypes.pas rename to source/uCEFTypes.pas diff --git a/uCEFUrlRequest.pas b/source/uCEFUrlRequest.pas similarity index 100% rename from uCEFUrlRequest.pas rename to source/uCEFUrlRequest.pas diff --git a/uCEFUrlrequestClient.pas b/source/uCEFUrlrequestClient.pas similarity index 100% rename from uCEFUrlrequestClient.pas rename to source/uCEFUrlrequestClient.pas diff --git a/uCEFV8Exception.pas b/source/uCEFV8Exception.pas similarity index 100% rename from uCEFV8Exception.pas rename to source/uCEFV8Exception.pas diff --git a/uCEFValue.pas b/source/uCEFValue.pas similarity index 100% rename from uCEFValue.pas rename to source/uCEFValue.pas diff --git a/uCEFWaitableEvent.pas b/source/uCEFWaitableEvent.pas similarity index 100% rename from uCEFWaitableEvent.pas rename to source/uCEFWaitableEvent.pas diff --git a/uCEFWebPluginInfo.pas b/source/uCEFWebPluginInfo.pas similarity index 100% rename from uCEFWebPluginInfo.pas rename to source/uCEFWebPluginInfo.pas diff --git a/uCEFWebPluginInfoVisitor.pas b/source/uCEFWebPluginInfoVisitor.pas similarity index 100% rename from uCEFWebPluginInfoVisitor.pas rename to source/uCEFWebPluginInfoVisitor.pas diff --git a/uCEFWebPluginUnstableCallback.pas b/source/uCEFWebPluginUnstableCallback.pas similarity index 100% rename from uCEFWebPluginUnstableCallback.pas rename to source/uCEFWebPluginUnstableCallback.pas diff --git a/uCEFWindowParent.pas b/source/uCEFWindowParent.pas similarity index 100% rename from uCEFWindowParent.pas rename to source/uCEFWindowParent.pas diff --git a/uCEFWriteHandler.pas b/source/uCEFWriteHandler.pas similarity index 100% rename from uCEFWriteHandler.pas rename to source/uCEFWriteHandler.pas diff --git a/uCEFX509CertPrincipal.pas b/source/uCEFX509CertPrincipal.pas similarity index 100% rename from uCEFX509CertPrincipal.pas rename to source/uCEFX509CertPrincipal.pas diff --git a/uCEFX509Certificate.pas b/source/uCEFX509Certificate.pas similarity index 100% rename from uCEFX509Certificate.pas rename to source/uCEFX509Certificate.pas diff --git a/uCEFXmlReader.pas b/source/uCEFXmlReader.pas similarity index 100% rename from uCEFXmlReader.pas rename to source/uCEFXmlReader.pas diff --git a/uCEFZipReader.pas b/source/uCEFZipReader.pas similarity index 100% rename from uCEFZipReader.pas rename to source/uCEFZipReader.pas diff --git a/uCEFv8Accessor.pas b/source/uCEFv8Accessor.pas similarity index 100% rename from uCEFv8Accessor.pas rename to source/uCEFv8Accessor.pas diff --git a/uCEFv8Context.pas b/source/uCEFv8Context.pas similarity index 100% rename from uCEFv8Context.pas rename to source/uCEFv8Context.pas diff --git a/uCEFv8Handler.pas b/source/uCEFv8Handler.pas similarity index 100% rename from uCEFv8Handler.pas rename to source/uCEFv8Handler.pas diff --git a/uCEFv8Interceptor.pas b/source/uCEFv8Interceptor.pas similarity index 100% rename from uCEFv8Interceptor.pas rename to source/uCEFv8Interceptor.pas diff --git a/uCEFv8StackFrame.pas b/source/uCEFv8StackFrame.pas similarity index 100% rename from uCEFv8StackFrame.pas rename to source/uCEFv8StackFrame.pas diff --git a/uCEFv8StackTrace.pas b/source/uCEFv8StackTrace.pas similarity index 100% rename from uCEFv8StackTrace.pas rename to source/uCEFv8StackTrace.pas diff --git a/uCEFv8Types.pas b/source/uCEFv8Types.pas similarity index 100% rename from uCEFv8Types.pas rename to source/uCEFv8Types.pas diff --git a/uCEFv8Value.pas b/source/uCEFv8Value.pas similarity index 100% rename from uCEFv8Value.pas rename to source/uCEFv8Value.pas