You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-22 22:17:48 +02:00
Added ConsoleBrowser2 and WebpageSnapshot demos
- Split the Lazarus demos directory into "Lazarus_Windows" and "Lazarus_Linux". - Added OSRExternalPumpBrowser and TinyBrowser2 demos to "Lazarus_Linux". - Set TBufferPanel.GetScreenScale as virtual. - Added DevTools to the SchemeRegistrationBrowser demo. - Modified the SchemeRegistrationBrowser demo to receive XMLHttpRequest requests from JavaScript.
This commit is contained in:
bin
demos
Delphi_VCL
ConsoleBrowser
ConsoleBrowser2
00-DeleteDCUs.batConsoleBrowser2.dprConsoleBrowser2.dprojConsoleBrowser2Grp.groupprojConsoleBrowser2_sp.dprConsoleBrowser2_sp.dprojcef.incuCEFBrowserThread.pasuEncapsulatedBrowser.pas
KioskOSRBrowser
OSRExternalPumpBrowser
PopupBrowser
SchemeRegistrationBrowser
SimpleOSRBrowser
WebpageSnapshot
Lazarus
Linux
SimpleOSRBrowser
Lazarus_Linux
OSRExternalPumpBrowser
00-Delete.batOSRExternalPumpBrowser.lpiOSRExternalPumpBrowser.lprOSRExternalPumpBrowser.lpscef.incuOSRExternalPumpBrowser.lfmuOSRExternalPumpBrowser.pas
SimpleBrowser2
00-Delete.batSimpleBrowser2.icoSimpleBrowser2.lpiSimpleBrowser2.lprSimpleBrowser2.lpsSimpleBrowser2.rescef.incusimplebrowser2.lfmusimplebrowser2.pas
SimpleOSRBrowser
00-Delete.batSimpleOSRBrowser.icoSimpleOSRBrowser.lpiSimpleOSRBrowser.lprSimpleOSRBrowser.lpsSimpleOSRBrowser.rescef.incusimpleosrbrowser.lfmusimpleosrbrowser.pas
TinyBrowser2
Lazarus_Windows
ConsoleBrowser2
00-Delete.batConsoleBrowser2.lpiConsoleBrowser2.lprConsoleBrowser2.lpsConsoleBrowser2_sp.lpiConsoleBrowser2_sp.lprConsoleBrowser2_sp.lpscef.incuCEFBrowserThread.pasuEncapsulatedBrowser.pas
CookieVisitor
00-Delete.batCookieVisitor.lpiCookieVisitor.lprCookieVisitor.lpscef.incuCookieVisitor.lfmuCookieVisitor.pasuSimpleTextViewer.lfmuSimpleTextViewer.pas
CustomResourceBrowser
00-Delete.batCRBrowser.lpiCRBrowser.lprCRBrowser.lpscef.incuCustomResourceHandler.pasuMainForm.lfmuMainForm.pas
DOMVisitor
EditorBrowser
00-Delete.batEditorBrowser.dprEditorBrowser.lpiEditorBrowser.lpscef.incuEditorBrowser.lfmuEditorBrowser.pas
ExternalPumpBrowser
00-Delete.batExternalPumpBrowser.lpiExternalPumpBrowser.lprExternalPumpBrowser.lpscef.incuExternalPumpBrowser.lfmuExternalPumpBrowser.pas
FullScreenBrowser
00-Delete.batFullScreenBrowser.lpiFullScreenBrowser.lprFullScreenBrowser.lpscef.incuMainForm.lfmuMainForm.pas
JavaScript
JSDialog
00-Delete.batJSDialogBrowser.lpiJSDialogBrowser.lprJSDialogBrowser.lpscef.incuJSDialogBrowser.lfmuJSDialogBrowser.pas
JSEval
00-Delete.batJSEval.lpiJSEval.lprJSEval.lpscef.incuJSEval.lfmuJSEval.pasuSimpleTextViewer.lfmuSimpleTextViewer.pas
JSExecutingFunctions
00-Delete.batJSExecutingFunctions.lpiJSExecutingFunctions.lprJSExecutingFunctions.lpscef.incuJSExecutingFunctions.lfmuJSExecutingFunctions.pasuMyV8Handler.pas
JSExtension
00-Delete.batJSExtension.lpiJSExtension.lprJSExtension.lpscef.incuJSExtension.lfmuJSExtension.pasuSimpleTextViewer.lfmuSimpleTextViewer.pasuTestExtensionHandler.pas
JSExtensionWithFunction
00-Delete.batJSExtensionWithFunction.lpiJSExtensionWithFunction.lprJSExtensionWithFunction.lpscef.incuJSExtensionWithFunction.lfmuJSExtensionWithFunction.pasuMyV8Handler.pas
JSExtensionWithObjectParameter
00-Delete.batJSExtensionWithObjectParameter.lpiJSExtensionWithObjectParameter.lprJSExtensionWithObjectParameter.lpscef.incuJSExtensionWithObjectParameter.lfmuJSExtensionWithObjectParameter.pasuMyV8Handler.pas
JSSimpleExtension
00-Delete.batJSSimpleExtension.lpiJSSimpleExtension.lprJSSimpleExtension.lpscef.incuJSSimpleExtension.lfmuJSSimpleExtension.pas
JSSimpleWindowBinding
00-Delete.batJSSimpleWindowBinding.lpiJSSimpleWindowBinding.lprJSSimpleWindowBinding.lpscef.incuJSSimpleWindowBinding.lfmuJSSimpleWindowBinding.pas
JSWindowBindingSubProcess
00-Delete.batJSSimpleWindowBinding.lpiJSSimpleWindowBinding.lprJSSimpleWindowBinding.lpsSubProcess.lpiSubProcess.lprSubProcess.lpscef.incuJSSimpleWindowBinding.lfmuJSSimpleWindowBinding.pas
JSWindowBindingWithArrayBuffer
00-Delete.batJSWindowBindingWithArrayBuffer.dprojJSWindowBindingWithArrayBuffer.lpiJSWindowBindingWithArrayBuffer.lprJSWindowBindingWithArrayBuffer.lpscef.incuJSWindowBindingWithArrayBuffer.lfmuJSWindowBindingWithArrayBuffer.pas
JSWindowBindingWithFunction
00-Delete.batJSWindowBindingWithFunction.lpiJSWindowBindingWithFunction.lprJSWindowBindingWithFunction.lpscef.incuJSWindowBindingWithFunction.lfmuJSWindowBindingWithFunction.pasuMyV8Handler.pas
JSWindowBindingWithObject
MediaRouter
00-Delete.batMediaRouter.lpiMediaRouter.lprMediaRouter.lpscef.incuMediaRouterFrm.lfmuMediaRouterFrm.pas
MiniBrowser
00-Delete.batMiniBrowser.lpiMiniBrowser.lprMiniBrowser.lpscef.incuMiniBrowser.lfmuMiniBrowser.pasuPreferences.lfmuPreferences.pasuSimpleTextViewer.lfmuSimpleTextViewer.pas
OAuth2Tester
00-Delete.batOAuth2Tester.dprojOAuth2Tester.lpiOAuth2Tester.lprOAuth2Tester.lpscef.incuOAuth2TesterFrm.lfmuOAuth2TesterFrm.pas
OSRExternalPumpBrowser
00-Delete.batOSRExternalPumpBrowser.lpiOSRExternalPumpBrowser.lprOSRExternalPumpBrowser.lpscef.incuOSRExternalPumpBrowser.lfmuOSRExternalPumpBrowser.pas
PopupBrowser
00-Delete.batPopupBrowser.lpiPopupBrowser.lprPopupBrowser.lpscef.incuChildForm.lfmuChildForm.pasuMainForm.lfmuMainForm.pas
PopupBrowser2
00-Delete.batPopupBrowser2.lpiPopupBrowser2.lprPopupBrowser2.lpscef.incuChildForm.dfmuChildForm.pasuMainForm.lfmuMainForm.pas
PostInspectorBrowser
00-Delete.batPostInspectorBrowser.lpiPostInspectorBrowser.lprPostInspectorBrowser.lpscef.incuPostInspectorBrowser.lfmuPostInspectorBrowser.pas
SchemeRegistrationBrowser
00-Delete.batSchemeRegistrationBrowser.lpiSchemeRegistrationBrowser.lprSchemeRegistrationBrowser.lpscef.incuHelloScheme.pasuSchemeRegistrationBrowser.lfmuSchemeRegistrationBrowser.pas
SimpleBrowser
00-Delete.batSimpleBrowser.lpiSimpleBrowser.lprSimpleBrowser.lpscef.incuSimpleBrowser.lfmuSimpleBrowser.pas
SimpleBrowser2
00-Delete.batSimpleBrowser2.icoSimpleBrowser2.lpiSimpleBrowser2.lprSimpleBrowser2.lpsSimpleBrowser2.rescef.incusimplelazarusbrowser.lfmusimplelazarusbrowser.pas
SimpleExternalPumpBrowser
00-Delete.batSimpleExternalPumpBrowser.dprojSimpleExternalPumpBrowser.lpiSimpleExternalPumpBrowser.lprSimpleExternalPumpBrowser.lpscef.incuSimpleExternalPumpBrowser.lfmuSimpleExternalPumpBrowser.pas
SimpleOSRBrowser
00-Delete.batSimpleOSRBrowser.icoSimpleOSRBrowser.lpiSimpleOSRBrowser.lprSimpleOSRBrowser.lpsSimpleOSRBrowser.rescef.incusimplelazosrbrowser.lfmusimplelazosrbrowser.pas
SimpleServer
00-Delete.batSimpleServer.lpiSimpleServer.lprSimpleServer.lpscef.incuSimpleServer.lfmuSimpleServer.pas
SubProcess
00-Delete.batSimpleBrowser.lpiSimpleBrowser.lprSimpleBrowser.lpsSubProcess.lpiSubProcess.lprSubProcess.lpscef.incuCEFLoader.pasuSimpleBrowser.lfmuSimpleBrowser.pas
TabbedBrowser
TabbedBrowser2
00-Delete.batTabbedBrowser2.dprojTabbedBrowser2.lpiTabbedBrowser2.lprTabbedBrowser2.lpscef.incuBrowserFrame.lfmuBrowserFrame.pasuBrowserTab.pasuMainForm.lfmuMainForm.pas
TinyBrowser
TinyBrowser2
ToolBoxBrowser
00-Delete.batToolBoxBrowser.lpiToolBoxBrowser.lprToolBoxBrowser.lpscef.incuChildForm.lfmuChildForm.pasuMainForm.lfmuMainForm.pas
ToolBoxBrowser2
00-Delete.batToolBoxBrowser2.lpiToolBoxBrowser2.lprToolBoxBrowser2.lpscef.incuMainForm.lfmuMainForm.pas
URLRequest
WebpageSnapshot
source
update_CEF4Delphi.json
77
demos/Lazarus_Windows/JavaScript/JSWindowBindingWithFunction/JSWindowBindingWithFunction.lpr
Normal file
77
demos/Lazarus_Windows/JavaScript/JSWindowBindingWithFunction/JSWindowBindingWithFunction.lpr
Normal file
@ -0,0 +1,77 @@
|
||||
// ************************************************************************
|
||||
// ***************************** 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 © 2018 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 <hgourvest@gmail.com>
|
||||
* 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 JSWindowBindingWithFunction;
|
||||
|
||||
{$MODE Delphi}
|
||||
|
||||
{$I cef.inc}
|
||||
|
||||
uses
|
||||
{$IFDEF DELPHI16_UP}
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
LCLIntf, LCLType, LMessages, Interfaces,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uJSWindowBindingWithFunction in 'uJSWindowBindingWithFunction.pas' {JSWindowBindingWithFunctionFrm},
|
||||
uMyV8Handler in 'uMyV8Handler.pas';
|
||||
|
||||
{.$R *.res}
|
||||
|
||||
// CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.
|
||||
{$SetPEFlags $20}
|
||||
|
||||
begin
|
||||
// GlobalCEFApp creation and initialization moved to a different unit to fix the memory leak described in the bug #89
|
||||
// https://github.com/salvadordf/CEF4Delphi/issues/89
|
||||
CreateGlobalCEFApp;
|
||||
|
||||
if GlobalCEFApp.StartMainProcess then
|
||||
begin
|
||||
Application.Initialize;
|
||||
{$IFDEF DELPHI11_UP}
|
||||
Application.MainFormOnTaskbar := True;
|
||||
{$ENDIF}
|
||||
Application.CreateForm(TJSWindowBindingWithFunctionFrm, JSWindowBindingWithFunctionFrm);
|
||||
Application.Run;
|
||||
end;
|
||||
|
||||
DestroyGlobalCEFApp;
|
||||
end.
|
Reference in New Issue
Block a user