You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
Update to CEF 75.0.8
- Restored the GlobalCEFApp.DeleteCookies property - Fixed the issue with the arrow keys in OSR demos - Fixed the default return values for TCustomCookieAccessFilter.CanSendCookie and TCustomCookieAccessFilter.CandSaveCookie - TCustomResourceRequestHandler and TCustomCookieAccessFilterwill only be created if needed by the TChromium events.
This commit is contained in:
@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador D
|
|||||||
|
|
||||||
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
|
||||||
|
|
||||||
CEF4Delphi uses CEF 75.0.7 which includes Chromium 75.0.3770.80.
|
CEF4Delphi uses CEF 75.0.8 which includes Chromium 75.0.3770.80.
|
||||||
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
The CEF binaries used by CEF4Delphi are available for download at spotify :
|
||||||
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_75.0.7%2Bg19229b6%2Bchromium-75.0.3770.80_windows32.tar.bz2)
|
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_75.0.8%2Bg5da93a1%2Bchromium-75.0.3770.80_windows32.tar.bz2)
|
||||||
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_75.0.7%2Bg19229b6%2Bchromium-75.0.3770.80_windows64.tar.bz2)
|
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_75.0.8%2Bg5da93a1%2Bchromium-75.0.3770.80_windows64.tar.bz2)
|
||||||
|
|
||||||
|
|
||||||
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.2/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.2/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.
|
||||||
|
@ -319,6 +319,8 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
|
||||||
|
if (Key in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]) then Key := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -219,7 +219,7 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
Handled := (Msg.wParam = VK_TAB);
|
Handled := (Msg.wParam in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WM_KEYUP :
|
WM_KEYUP :
|
||||||
|
@ -56,14 +56,19 @@ uses
|
|||||||
const
|
const
|
||||||
MINIBROWSER_VISITDOM_PARTIAL = WM_APP + $101;
|
MINIBROWSER_VISITDOM_PARTIAL = WM_APP + $101;
|
||||||
MINIBROWSER_VISITDOM_FULL = WM_APP + $102;
|
MINIBROWSER_VISITDOM_FULL = WM_APP + $102;
|
||||||
|
MINIBROWSER_COPYFRAMEIDS_1 = WM_APP + $103;
|
||||||
|
MINIBROWSER_COPYFRAMEIDS_2 = WM_APP + $104;
|
||||||
|
|
||||||
MINIBROWSER_CONTEXTMENU_VISITDOM_PARTIAL = MENU_ID_USER_FIRST + 1;
|
MINIBROWSER_CONTEXTMENU_VISITDOM_PARTIAL = MENU_ID_USER_FIRST + 1;
|
||||||
MINIBROWSER_CONTEXTMENU_VISITDOM_FULL = MENU_ID_USER_FIRST + 2;
|
MINIBROWSER_CONTEXTMENU_VISITDOM_FULL = MENU_ID_USER_FIRST + 2;
|
||||||
|
MINIBROWSER_CONTEXTMENU_COPYFRAMEIDS_1 = MENU_ID_USER_FIRST + 3;
|
||||||
|
MINIBROWSER_CONTEXTMENU_COPYFRAMEIDS_2 = MENU_ID_USER_FIRST + 4;
|
||||||
|
|
||||||
DOMVISITOR_MSGNAME_PARTIAL = 'domvisitorpartial';
|
DOMVISITOR_MSGNAME_PARTIAL = 'domvisitorpartial';
|
||||||
DOMVISITOR_MSGNAME_FULL = 'domvisitorfull';
|
DOMVISITOR_MSGNAME_FULL = 'domvisitorfull';
|
||||||
RETRIEVEDOM_MSGNAME_PARTIAL = 'retrievedompartial';
|
RETRIEVEDOM_MSGNAME_PARTIAL = 'retrievedompartial';
|
||||||
RETRIEVEDOM_MSGNAME_FULL = 'retrievedomfull';
|
RETRIEVEDOM_MSGNAME_FULL = 'retrievedomfull';
|
||||||
|
FRAMEIDS_MSGNAME = 'getframeids';
|
||||||
|
|
||||||
type
|
type
|
||||||
TDOMVisitorFrm = class(TForm)
|
TDOMVisitorFrm = class(TForm)
|
||||||
@ -117,6 +122,8 @@ type
|
|||||||
procedure BrowserDestroyMsg(var aMessage : TMessage); message CEF_DESTROY;
|
procedure BrowserDestroyMsg(var aMessage : TMessage); message CEF_DESTROY;
|
||||||
procedure VisitDOMMsg(var aMessage : TMessage); message MINIBROWSER_VISITDOM_PARTIAL;
|
procedure VisitDOMMsg(var aMessage : TMessage); message MINIBROWSER_VISITDOM_PARTIAL;
|
||||||
procedure VisitDOM2Msg(var aMessage : TMessage); message MINIBROWSER_VISITDOM_FULL;
|
procedure VisitDOM2Msg(var aMessage : TMessage); message MINIBROWSER_VISITDOM_FULL;
|
||||||
|
procedure CopyFrameIDs1(var aMessage : TMessage); message MINIBROWSER_COPYFRAMEIDS_1;
|
||||||
|
procedure CopyFrameIDs2(var aMessage : TMessage); message MINIBROWSER_COPYFRAMEIDS_2;
|
||||||
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
procedure WMMove(var aMessage : TWMMove); message WM_MOVE;
|
||||||
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
|
procedure WMMoving(var aMessage : TMessage); message WM_MOVING;
|
||||||
|
|
||||||
@ -257,6 +264,33 @@ begin
|
|||||||
frame.SendProcessMessage(PID_BROWSER, msg);
|
frame.SendProcessMessage(PID_BROWSER, msg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure DOMVisitor_GetFrameIDs(const browser: ICefBrowser; const frame : ICefFrame);
|
||||||
|
var
|
||||||
|
i : NativeUInt;
|
||||||
|
TempCount : NativeUInt;
|
||||||
|
TempArray : TCefFrameIdentifierArray;
|
||||||
|
TempString : string;
|
||||||
|
TempMsg : ICefProcessMessage;
|
||||||
|
begin
|
||||||
|
TempCount := browser.FrameCount;
|
||||||
|
|
||||||
|
if browser.GetFrameIdentifiers(TempCount, TempArray) then
|
||||||
|
begin
|
||||||
|
TempString := '';
|
||||||
|
i := 0;
|
||||||
|
|
||||||
|
while (i < TempCount) do
|
||||||
|
begin
|
||||||
|
TempString := TempString + inttostr(TempArray[i]) + CRLF;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
|
||||||
|
TempMsg := TCefProcessMessageRef.New(FRAMEIDS_MSGNAME);
|
||||||
|
TempMsg.ArgumentList.SetString(0, TempString);
|
||||||
|
frame.SendProcessMessage(PID_BROWSER, TempMsg);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure GlobalCEFApp_OnProcessMessageReceived(const browser : ICefBrowser;
|
procedure GlobalCEFApp_OnProcessMessageReceived(const browser : ICefBrowser;
|
||||||
const frame : ICefFrame;
|
const frame : ICefFrame;
|
||||||
sourceProcess : TCefProcessId;
|
sourceProcess : TCefProcessId;
|
||||||
@ -294,7 +328,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
aHandled := True;
|
aHandled := True;
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
if (message.name = FRAMEIDS_MSGNAME) then
|
||||||
|
begin
|
||||||
|
DOMVisitor_GetFrameIDs(browser, frame);
|
||||||
|
aHandled := True;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -303,6 +343,7 @@ begin
|
|||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
GlobalCEFApp.RemoteDebuggingPort := 9000;
|
GlobalCEFApp.RemoteDebuggingPort := 9000;
|
||||||
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
|
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
|
||||||
// Enabling the debug log file for then DOM visitor demo.
|
// Enabling the debug log file for then DOM visitor demo.
|
||||||
// This adds lots of warnings to the console, specially if you run this inside VirtualBox.
|
// This adds lots of warnings to the console, specially if you run this inside VirtualBox.
|
||||||
@ -329,6 +370,8 @@ procedure TDOMVisitorFrm.Chromium1BeforeContextMenu(Sender: TObject;
|
|||||||
begin
|
begin
|
||||||
model.AddItem(MINIBROWSER_CONTEXTMENU_VISITDOM_PARTIAL, 'Visit DOM in CEF (only Title)');
|
model.AddItem(MINIBROWSER_CONTEXTMENU_VISITDOM_PARTIAL, 'Visit DOM in CEF (only Title)');
|
||||||
model.AddItem(MINIBROWSER_CONTEXTMENU_VISITDOM_FULL, 'Visit DOM in CEF (BODY HTML)');
|
model.AddItem(MINIBROWSER_CONTEXTMENU_VISITDOM_FULL, 'Visit DOM in CEF (BODY HTML)');
|
||||||
|
model.AddItem(MINIBROWSER_CONTEXTMENU_COPYFRAMEIDS_1, 'Copy frame IDs in the browser process');
|
||||||
|
model.AddItem(MINIBROWSER_CONTEXTMENU_COPYFRAMEIDS_2, 'Copy frame IDs in the render process');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDOMVisitorFrm.Chromium1BeforePopup(Sender: TObject;
|
procedure TDOMVisitorFrm.Chromium1BeforePopup(Sender: TObject;
|
||||||
@ -365,6 +408,12 @@ begin
|
|||||||
|
|
||||||
MINIBROWSER_CONTEXTMENU_VISITDOM_FULL :
|
MINIBROWSER_CONTEXTMENU_VISITDOM_FULL :
|
||||||
PostMessage(Handle, MINIBROWSER_VISITDOM_FULL, 0, 0);
|
PostMessage(Handle, MINIBROWSER_VISITDOM_FULL, 0, 0);
|
||||||
|
|
||||||
|
MINIBROWSER_CONTEXTMENU_COPYFRAMEIDS_1 :
|
||||||
|
PostMessage(Handle, MINIBROWSER_COPYFRAMEIDS_1, 0, 0);
|
||||||
|
|
||||||
|
MINIBROWSER_CONTEXTMENU_COPYFRAMEIDS_2 :
|
||||||
|
PostMessage(Handle, MINIBROWSER_COPYFRAMEIDS_2, 0, 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -389,7 +438,14 @@ begin
|
|||||||
Clipboard.AsText := message.ArgumentList.GetString(0);
|
Clipboard.AsText := message.ArgumentList.GetString(0);
|
||||||
ShowStatusText('HTML copied to the clipboard');
|
ShowStatusText('HTML copied to the clipboard');
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end
|
||||||
|
else
|
||||||
|
if (message.Name = FRAMEIDS_MSGNAME) then
|
||||||
|
begin
|
||||||
|
Clipboard.AsText := message.ArgumentList.GetString(0);
|
||||||
|
ShowStatusText('Frame IDs copied to the clipboard in the render process.');
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDOMVisitorFrm.FormCloseQuery(Sender: TObject;
|
procedure TDOMVisitorFrm.FormCloseQuery(Sender: TObject;
|
||||||
@ -458,6 +514,39 @@ begin
|
|||||||
Chromium1.SendProcessMessage(PID_RENDERER, TempMsg);
|
Chromium1.SendProcessMessage(PID_RENDERER, TempMsg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TDOMVisitorFrm.CopyFrameIDs1(var aMessage : TMessage);
|
||||||
|
var
|
||||||
|
i : NativeUInt;
|
||||||
|
TempCount : NativeUInt;
|
||||||
|
TempArray : TCefFrameIdentifierArray;
|
||||||
|
TempString : string;
|
||||||
|
begin
|
||||||
|
TempCount := Chromium1.FrameCount;
|
||||||
|
|
||||||
|
if Chromium1.GetFrameIdentifiers(TempCount, TempArray) then
|
||||||
|
begin
|
||||||
|
TempString := '';
|
||||||
|
i := 0;
|
||||||
|
|
||||||
|
while (i < TempCount) do
|
||||||
|
begin
|
||||||
|
TempString := TempString + inttostr(TempArray[i]) + CRLF;
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
|
||||||
|
clipboard.AsText := TempString;
|
||||||
|
ShowStatusText('Frame IDs copied to the clipboard in the browser process (' + inttostr(TempCount) + ')');
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDOMVisitorFrm.CopyFrameIDs2(var aMessage : TMessage);
|
||||||
|
var
|
||||||
|
TempMsg : ICefProcessMessage;
|
||||||
|
begin
|
||||||
|
TempMsg := TCefProcessMessageRef.New(FRAMEIDS_MSGNAME);
|
||||||
|
Chromium1.SendProcessMessage(PID_RENDERER, TempMsg);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDOMVisitorFrm.WMMove(var aMessage : TWMMove);
|
procedure TDOMVisitorFrm.WMMove(var aMessage : TWMMove);
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
@ -250,7 +250,7 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
Handled := (Msg.wParam = VK_TAB);
|
Handled := (Msg.wParam in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WM_KEYUP :
|
WM_KEYUP :
|
||||||
|
@ -286,9 +286,9 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
OnAfterCreated = Chromium1AfterCreated
|
OnAfterCreated = Chromium1AfterCreated
|
||||||
OnBeforeClose = Chromium1BeforeClose
|
OnBeforeClose = Chromium1BeforeClose
|
||||||
OnClose = Chromium1Close
|
OnClose = Chromium1Close
|
||||||
|
OnCertificateError = Chromium1CertificateError
|
||||||
OnBeforeResourceLoad = Chromium1BeforeResourceLoad
|
OnBeforeResourceLoad = Chromium1BeforeResourceLoad
|
||||||
OnResourceResponse = Chromium1ResourceResponse
|
OnResourceResponse = Chromium1ResourceResponse
|
||||||
OnCertificateError = Chromium1CertificateError
|
|
||||||
Left = 32
|
Left = 32
|
||||||
Top = 224
|
Top = 224
|
||||||
end
|
end
|
||||||
|
@ -257,7 +257,7 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
Handled := (Msg.wParam = VK_TAB);
|
Handled := (Msg.wParam in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WM_KEYUP :
|
WM_KEYUP :
|
||||||
|
@ -192,7 +192,7 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
Chromium1.SendKeyEvent(@TempKeyEvent);
|
Chromium1.SendKeyEvent(@TempKeyEvent);
|
||||||
Handled := True;
|
Handled := (Msg.wParam in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Handled := False;
|
Handled := False;
|
||||||
|
@ -79,6 +79,7 @@ type
|
|||||||
procedure Panel1Exit(Sender: TObject);
|
procedure Panel1Exit(Sender: TObject);
|
||||||
procedure Panel1Resize(Sender: TObject);
|
procedure Panel1Resize(Sender: TObject);
|
||||||
procedure Panel1Click(Sender: TObject);
|
procedure Panel1Click(Sender: TObject);
|
||||||
|
procedure Panel1PaintParentBkg(Sender: TObject);
|
||||||
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
|
||||||
@ -108,10 +109,10 @@ type
|
|||||||
procedure chrmosrIMECompositionRangeChanged(Sender: TObject; const browser: ICefBrowser; const selected_range: PCefRange; character_boundsCount: NativeUInt; const character_bounds: PCefRect);
|
procedure chrmosrIMECompositionRangeChanged(Sender: TObject; const browser: ICefBrowser; const selected_range: PCefRange; character_boundsCount: NativeUInt; const character_bounds: PCefRect);
|
||||||
|
|
||||||
procedure SnapshotBtnClick(Sender: TObject);
|
procedure SnapshotBtnClick(Sender: TObject);
|
||||||
procedure Timer1Timer(Sender: TObject);
|
|
||||||
procedure SnapshotBtnEnter(Sender: TObject);
|
procedure SnapshotBtnEnter(Sender: TObject);
|
||||||
|
|
||||||
|
procedure Timer1Timer(Sender: TObject);
|
||||||
procedure ComboBox1Enter(Sender: TObject);
|
procedure ComboBox1Enter(Sender: TObject);
|
||||||
procedure Panel1PaintParentBkg(Sender: TObject);
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
FPopUpBitmap : TBitmap;
|
FPopUpBitmap : TBitmap;
|
||||||
@ -256,7 +257,7 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
Handled := (Msg.wParam = VK_TAB);
|
Handled := (Msg.wParam in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WM_KEYUP :
|
WM_KEYUP :
|
||||||
|
@ -59,7 +59,7 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
@ -72,6 +72,5 @@ begin
|
|||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
@ -4,13 +4,12 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="3">
|
<Units Count="4">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="CookieVisitor.lpr"/>
|
<Filename Value="CookieVisitor.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<TopLine Value="44"/>
|
||||||
<TopLine Value="53"/>
|
<CursorPos X="25" Y="74"/>
|
||||||
<CursorPos Y="63"/>
|
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -21,9 +20,10 @@
|
|||||||
<ComponentName Value="CookieVisitorFrm"/>
|
<ComponentName Value="CookieVisitorFrm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="244"/>
|
<TopLine Value="124"/>
|
||||||
<CursorPos X="45" Y="263"/>
|
<CursorPos X="38" Y="130"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -35,14 +35,18 @@
|
|||||||
<ComponentName Value="SimpleTextViewerFrm"/>
|
<ComponentName Value="SimpleTextViewerFrm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="7"/>
|
|
||||||
<CursorPos X="8" Y="29"/>
|
<CursorPos X="8" Y="29"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
<LoadedDesigner Value="True"/>
|
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="C:\lazarus\lcl\interfaces\win32\win32object.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="395"/>
|
||||||
|
<CursorPos X="61" Y="409"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit3>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="11" HistoryIndex="10">
|
<JumpHistory Count="11" HistoryIndex="10">
|
||||||
<Position1>
|
<Position1>
|
||||||
@ -81,12 +85,12 @@
|
|||||||
<Caret Line="58" Column="31" TopLine="36"/>
|
<Caret Line="58" Column="31" TopLine="36"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="uSimpleTextViewer.pas"/>
|
<Filename Value="uCookieVisitor.pas"/>
|
||||||
<Caret Line="31"/>
|
<Caret Line="86" Column="26" TopLine="72"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="uCookieVisitor.pas"/>
|
<Filename Value="uCookieVisitor.pas"/>
|
||||||
<Caret Line="86" Column="26" TopLine="72"/>
|
<Caret Line="125" Column="11" TopLine="115"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
|
@ -122,6 +122,8 @@ type
|
|||||||
var
|
var
|
||||||
CookieVisitorFrm: TCookieVisitorFrm;
|
CookieVisitorFrm: TCookieVisitorFrm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -141,6 +143,12 @@ uses
|
|||||||
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
||||||
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
// This function is called in the IO thread.
|
// This function is called in the IO thread.
|
||||||
function CookieVisitorProc(const name, value, domain, path: ustring;
|
function CookieVisitorProc(const name, value, domain, path: ustring;
|
||||||
secure, httponly, hasExpires: Boolean;
|
secure, httponly, hasExpires: Boolean;
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="CRBrowser.lpr"/>
|
<Filename Value="CRBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<TopLine Value="48"/>
|
<IsVisibleTab Value="True"/>
|
||||||
|
<TopLine Value="40"/>
|
||||||
<CursorPos X="10" Y="71"/>
|
<CursorPos X="10" Y="71"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -20,7 +21,6 @@
|
|||||||
<ComponentName Value="MainForm"/>
|
<ComponentName Value="MainForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="89"/>
|
<TopLine Value="89"/>
|
||||||
<CursorPos Y="106"/>
|
<CursorPos Y="106"/>
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="243"/>
|
<TopLine Value="294"/>
|
||||||
<CursorPos X="11" Y="259"/>
|
<CursorPos X="39" Y="305"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="29" HistoryIndex="28">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="DOMVisitor.lpr"/>
|
<Filename Value="DOMVisitor.lpr"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -176,10 +176,6 @@
|
|||||||
<Filename Value="DOMVisitor.lpr"/>
|
<Filename Value="DOMVisitor.lpr"/>
|
||||||
<Caret Line="44" Column="13" TopLine="38"/>
|
<Caret Line="44" Column="13" TopLine="38"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
|
||||||
<Filename Value="uDOMVisitor.pas"/>
|
|
||||||
<Caret Line="130" Column="11" TopLine="290"/>
|
|
||||||
</Position30>
|
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -301,7 +301,8 @@ procedure CreateGlobalCEFApp;
|
|||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
GlobalCEFApp.RemoteDebuggingPort := 9000;
|
GlobalCEFApp.RemoteDebuggingPort := 9000;
|
||||||
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
|
GlobalCEFApp.OnProcessMessageReceived := GlobalCEFApp_OnProcessMessageReceived;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
|
||||||
// Enabling the debug log file for then DOM visitor demo.
|
// Enabling the debug log file for then DOM visitor demo.
|
||||||
// This adds lots of warnings to the console, specially if you run this inside VirtualBox.
|
// This adds lots of warnings to the console, specially if you run this inside VirtualBox.
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="174"/>
|
<TopLine Value="106"/>
|
||||||
<CursorPos X="39" Y="180"/>
|
<CursorPos X="41" Y="134"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
|
@ -130,7 +130,8 @@ begin
|
|||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
GlobalCEFApp.FlashEnabled := False;
|
GlobalCEFApp.FlashEnabled := False;
|
||||||
GlobalCEFApp.ExternalMessagePump := True;
|
GlobalCEFApp.ExternalMessagePump := True;
|
||||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
|
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ uses
|
|||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<Filename Value="FullScreenBrowser.lpr"/>
|
<Filename Value="FullScreenBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="39"/>
|
<TopLine Value="38"/>
|
||||||
<CursorPos X="3" Y="61"/>
|
<CursorPos X="22" Y="60"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -22,15 +22,15 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="87"/>
|
<TopLine Value="90"/>
|
||||||
<CursorPos X="113" Y="252"/>
|
<CursorPos X="11" Y="108"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="5" HistoryIndex="4">
|
<JumpHistory Count="4" HistoryIndex="3">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uMainForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -43,13 +43,9 @@
|
|||||||
<Caret Line="77" Column="43" TopLine="52"/>
|
<Caret Line="77" Column="43" TopLine="52"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="54" Column="3" TopLine="219"/>
|
|
||||||
</Position4>
|
|
||||||
<Position5>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="246" Column="3" TopLine="219"/>
|
<Caret Line="246" Column="3" TopLine="219"/>
|
||||||
</Position5>
|
</Position4>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -105,12 +105,20 @@ type
|
|||||||
var
|
var
|
||||||
MainForm: TMainForm;
|
MainForm: TMainForm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFApplication;
|
uCEFApplication;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.HandleKeyUp(const aMsg : TMsg; var aHandled : boolean);
|
procedure TMainForm.HandleKeyUp(const aMsg : TMsg; var aHandled : boolean);
|
||||||
var
|
var
|
||||||
|
@ -55,8 +55,7 @@ uses
|
|||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
@ -68,6 +67,5 @@ begin
|
|||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="JSDialogBrowser.lpr"/>
|
<Filename Value="JSDialogBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<TopLine Value="40"/>
|
<TopLine Value="39"/>
|
||||||
<CursorPos X="32" Y="58"/>
|
<CursorPos X="23" Y="58"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="254"/>
|
<TopLine Value="107"/>
|
||||||
<CursorPos X="39" Y="261"/>
|
<CursorPos X="40" Y="105"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
|
@ -98,6 +98,8 @@ type
|
|||||||
var
|
var
|
||||||
JSDialogBrowserFrm: TJSDialogBrowserFrm;
|
JSDialogBrowserFrm: TJSDialogBrowserFrm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -112,6 +114,13 @@ uses
|
|||||||
// 1. The FormCloseQuery event sets CanClose to False and calls TChromiumWindow.CloseBrowser, which triggers the TChromiumWindow.OnClose event.
|
// 1. The FormCloseQuery event sets CanClose to False and calls TChromiumWindow.CloseBrowser, which triggers the TChromiumWindow.OnClose event.
|
||||||
// 2. The TChromiumWindow.OnClose event calls TChromiumWindow.DestroyChildWindow which triggers the TChromiumWindow.OnBeforeClose event.
|
// 2. The TChromiumWindow.OnClose event calls TChromiumWindow.DestroyChildWindow which triggers the TChromiumWindow.OnBeforeClose event.
|
||||||
// 3. TChromiumWindow.OnBeforeClose sets FCanClose to True and closes the form.
|
// 3. TChromiumWindow.OnBeforeClose sets FCanClose to True and closes the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TJSDialogBrowserFrm.FormCreate(Sender: TObject);
|
procedure TJSDialogBrowserFrm.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="513"/>
|
<TopLine Value="538"/>
|
||||||
<CursorPos X="42" Y="533"/>
|
<CursorPos X="3" Y="540"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="21"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 X="85" Y="477" ID="1"/>
|
<Item0 X="85" Y="477" ID="1"/>
|
||||||
@ -118,123 +118,123 @@
|
|||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="199" Column="51" TopLine="162"/>
|
<Caret Line="30" Column="122" TopLine="21"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="228" Column="95" TopLine="196"/>
|
<Caret Line="55" Column="25" TopLine="21"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="30" Column="122" TopLine="21"/>
|
<Caret Line="115" Column="25" TopLine="79"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="55" Column="25" TopLine="21"/>
|
<Caret Line="15" Column="103"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="115" Column="25" TopLine="79"/>
|
<Caret Line="64" Column="90" TopLine="26"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="15" Column="103"/>
|
<Caret Line="373" Column="76" TopLine="336"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="64" Column="90" TopLine="26"/>
|
<Caret Line="470" Column="70" TopLine="433"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="373" Column="76" TopLine="336"/>
|
<Caret Line="524" Column="40" TopLine="487"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="470" Column="70" TopLine="433"/>
|
<Caret Line="555" Column="39" TopLine="518"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="524" Column="40" TopLine="487"/>
|
<Caret Line="63" Column="18" TopLine="41"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="555" Column="39" TopLine="518"/>
|
<Caret Line="373" Column="76" TopLine="336"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="JSEval.lpr"/>
|
||||||
<Caret Line="63" Column="18" TopLine="41"/>
|
<Caret Line="60" Column="76" TopLine="44"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="373" Column="76" TopLine="336"/>
|
<Caret Line="125" Column="29" TopLine="114"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="JSEval.lpr"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="60" Column="76" TopLine="44"/>
|
<Caret Line="536" Column="38" TopLine="518"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="125" Column="29" TopLine="114"/>
|
<Caret Line="511" Column="75" TopLine="499"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="536" Column="38" TopLine="518"/>
|
<Caret Line="463" Column="50" TopLine="452"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="511" Column="75" TopLine="499"/>
|
<Caret Line="372" TopLine="360"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="463" Column="50" TopLine="452"/>
|
<Caret Line="54" Column="73" TopLine="24"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="372" TopLine="360"/>
|
<Caret Line="51" Column="90" TopLine="24"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="54" Column="73" TopLine="24"/>
|
<Caret Line="59" Column="37" TopLine="24"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="51" Column="90" TopLine="24"/>
|
<Caret Line="181" Column="63" TopLine="162"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="JSEval.lpr"/>
|
||||||
<Caret Line="59" Column="37" TopLine="24"/>
|
<Caret Line="60" Column="76" TopLine="41"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="181" Column="63" TopLine="162"/>
|
<Caret Line="125" Column="11" TopLine="121"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="JSEval.lpr"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="60" Column="76" TopLine="41"/>
|
<Caret Line="542" Column="86" TopLine="533"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="125" Column="11" TopLine="121"/>
|
<Caret Line="94" Column="43" TopLine="77"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="542" Column="86" TopLine="533"/>
|
<Caret Line="210" Column="39" TopLine="203"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="94" Column="43" TopLine="77"/>
|
<Caret Line="86" Column="71" TopLine="76"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="210" Column="39" TopLine="203"/>
|
<Caret Line="510" Column="62" TopLine="492"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="JSEval.lpr"/>
|
||||||
<Caret Line="86" Column="71" TopLine="76"/>
|
<Caret Line="60" Column="76" TopLine="41"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="uJSEval.pas"/>
|
<Filename Value="uJSEval.pas"/>
|
||||||
<Caret Line="510" Column="62" TopLine="492"/>
|
<Caret Line="126" Column="11" TopLine="109"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="206"/>
|
<TopLine Value="174"/>
|
||||||
<CursorPos X="39" Y="213"/>
|
<CursorPos X="3" Y="176"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="7" HistoryIndex="6">
|
<JumpHistory Count="9" HistoryIndex="8">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uJSExecutingFunctions.pas"/>
|
<Filename Value="uJSExecutingFunctions.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -81,6 +81,14 @@
|
|||||||
<Filename Value="uJSExecutingFunctions.pas"/>
|
<Filename Value="uJSExecutingFunctions.pas"/>
|
||||||
<Caret Line="87" Column="43" TopLine="84"/>
|
<Caret Line="87" Column="43" TopLine="84"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="JSExecutingFunctions.lpr"/>
|
||||||
|
<Caret Line="59" Column="17" TopLine="41"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="uJSExecutingFunctions.pas"/>
|
||||||
|
<Caret Line="116" Column="11" TopLine="100"/>
|
||||||
|
</Position9>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="134"/>
|
<TopLine Value="220"/>
|
||||||
<CursorPos X="59" Y="88"/>
|
<CursorPos X="3" Y="222"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="7" HistoryIndex="6">
|
<JumpHistory Count="9" HistoryIndex="8">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uJSExtension.pas"/>
|
<Filename Value="uJSExtension.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -78,6 +78,14 @@
|
|||||||
<Filename Value="uJSExtension.pas"/>
|
<Filename Value="uJSExtension.pas"/>
|
||||||
<Caret Line="312" Column="54" TopLine="301"/>
|
<Caret Line="312" Column="54" TopLine="301"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="JSExtension.lpr"/>
|
||||||
|
<Caret Line="60" Column="17" TopLine="42"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="uJSExtension.pas"/>
|
||||||
|
<Caret Line="126" TopLine="111"/>
|
||||||
|
</Position9>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
<ComponentName Value="JSExtensionWithFunctionFrm"/>
|
<ComponentName Value="JSExtensionWithFunctionFrm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="63"/>
|
<TopLine Value="149"/>
|
||||||
<CursorPos X="15" Y="78"/>
|
<CursorPos X="3" Y="151"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -31,7 +32,6 @@
|
|||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="uMyV8Handler.pas"/>
|
<Filename Value="uMyV8Handler.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="50"/>
|
<TopLine Value="50"/>
|
||||||
<CursorPos X="74" Y="69"/>
|
<CursorPos X="74" Y="69"/>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="10" HistoryIndex="9">
|
<JumpHistory Count="12" HistoryIndex="11">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uJSExtensionWithFunction.pas"/>
|
<Filename Value="uJSExtensionWithFunction.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -96,6 +96,14 @@
|
|||||||
<Filename Value="uJSExtensionWithFunction.pas"/>
|
<Filename Value="uJSExtensionWithFunction.pas"/>
|
||||||
<Caret Line="78" Column="15" TopLine="63"/>
|
<Caret Line="78" Column="15" TopLine="63"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
|
<Position11>
|
||||||
|
<Filename Value="JSExtensionWithFunction.lpr"/>
|
||||||
|
<Caret Line="59" Column="17" TopLine="45"/>
|
||||||
|
</Position11>
|
||||||
|
<Position12>
|
||||||
|
<Filename Value="uJSExtensionWithFunction.pas"/>
|
||||||
|
<Caret Line="105" Column="11" TopLine="89"/>
|
||||||
|
</Position12>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -51,8 +51,6 @@ uses
|
|||||||
LCLIntf, LCLType, LMessages, Interfaces,
|
LCLIntf, LCLType, LMessages, Interfaces,
|
||||||
{$ENDIF }
|
{$ENDIF }
|
||||||
uCEFApplication,
|
uCEFApplication,
|
||||||
uCEFTypes,
|
|
||||||
uCEFConstants,
|
|
||||||
uMiniBrowser in 'uMiniBrowser.pas' {MiniBrowserFrm},
|
uMiniBrowser in 'uMiniBrowser.pas' {MiniBrowserFrm},
|
||||||
uPreferences in 'uPreferences.pas' {PreferencesFrm},
|
uPreferences in 'uPreferences.pas' {PreferencesFrm},
|
||||||
uSimpleTextViewer in 'uSimpleTextViewer.pas' {SimpleTextViewerFrm};
|
uSimpleTextViewer in 'uSimpleTextViewer.pas' {SimpleTextViewerFrm};
|
||||||
@ -62,10 +60,7 @@ uses
|
|||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
|
|
||||||
GlobalCEFApp.LogFile := 'debug.log';
|
|
||||||
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="MiniBrowser.lpr"/>
|
<Filename Value="MiniBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<TopLine Value="47"/>
|
<TopLine Value="46"/>
|
||||||
<CursorPos X="18" Y="50"/>
|
<CursorPos Y="54"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="191"/>
|
<TopLine Value="277"/>
|
||||||
<CursorPos X="78" Y="204"/>
|
<CursorPos X="3" Y="279"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="23" HistoryIndex="22">
|
<JumpHistory Count="25" HistoryIndex="24">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uMiniBrowser.pas"/>
|
<Filename Value="uMiniBrowser.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -156,6 +156,14 @@
|
|||||||
<Filename Value="uMiniBrowser.pas"/>
|
<Filename Value="uMiniBrowser.pas"/>
|
||||||
<Caret Line="590" Column="20" TopLine="573"/>
|
<Caret Line="590" Column="20" TopLine="573"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="MiniBrowser.lpr"/>
|
||||||
|
<Caret Line="54" TopLine="46"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="uMiniBrowser.pas"/>
|
||||||
|
<Caret Line="261" Column="11" TopLine="245"/>
|
||||||
|
</Position25>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -258,6 +258,8 @@ type
|
|||||||
var
|
var
|
||||||
MiniBrowserFrm : TMiniBrowserFrm;
|
MiniBrowserFrm : TMiniBrowserFrm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -270,6 +272,15 @@ uses
|
|||||||
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
||||||
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
||||||
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.LogFile := 'debug.log';
|
||||||
|
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="5">
|
<Units Count="6">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="OSRExternalPumpBrowser.lpr"/>
|
<Filename Value="OSRExternalPumpBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="102"/>
|
<TopLine Value="939"/>
|
||||||
<CursorPos X="382" Y="102"/>
|
<CursorPos X="68" Y="957"/>
|
||||||
<UsageCount Value="26"/>
|
<UsageCount Value="26"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -51,127 +51,135 @@
|
|||||||
<CursorPos X="32" Y="68"/>
|
<CursorPos X="32" Y="68"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
|
<Unit5>
|
||||||
|
<Filename Value="C:\lazarus\lcl\include\wincontrol.inc"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="5667"/>
|
||||||
|
<CursorPos Y="5683"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit5>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="92" Column="51" TopLine="81"/>
|
<Caret Line="316" Column="66" TopLine="313"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="629" Column="55" TopLine="604"/>
|
<Caret Line="101" Column="84" TopLine="90"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="92" Column="27" TopLine="71"/>
|
<Caret Line="346" TopLine="343"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="313" Column="19" TopLine="289"/>
|
<Caret Line="192" Column="54" TopLine="173"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="93" Column="87" TopLine="82"/>
|
<Caret Line="194" Column="47" TopLine="173"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="237" Column="71" TopLine="234"/>
|
<Caret Line="199" Column="13" TopLine="187"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="97" Column="82" TopLine="86"/>
|
<Caret Line="120" Column="5" TopLine="109"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="316" Column="66" TopLine="313"/>
|
<Caret Line="47" Column="39" TopLine="42"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="101" Column="84" TopLine="90"/>
|
<Caret Line="311" Column="51" TopLine="294"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="346" TopLine="343"/>
|
<Caret Line="97" Column="43" TopLine="84"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="192" Column="54" TopLine="173"/>
|
<Caret Line="284" Column="57" TopLine="273"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="194" Column="47" TopLine="173"/>
|
<Caret Line="323" Column="23" TopLine="299"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="199" Column="13" TopLine="187"/>
|
<Caret Line="95" Column="36" TopLine="84"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="120" Column="5" TopLine="109"/>
|
<Caret Line="271" TopLine="270"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="47" Column="39" TopLine="42"/>
|
<Caret Line="286" Column="70" TopLine="270"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="311" Column="51" TopLine="294"/>
|
<Caret Line="307" Column="11" TopLine="295"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="97" Column="43" TopLine="84"/>
|
<Caret Line="322" TopLine="313"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="284" Column="57" TopLine="273"/>
|
<Caret Line="503" Column="53" TopLine="488"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="323" Column="23" TopLine="299"/>
|
<Caret Line="92" Column="27" TopLine="92"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="95" Column="36" TopLine="84"/>
|
<Caret Line="503" Column="11" TopLine="499"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="271" TopLine="270"/>
|
<Caret Line="201" Column="11" TopLine="166"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="286" Column="70" TopLine="270"/>
|
<Caret Line="982" Column="68" TopLine="963"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="307" Column="11" TopLine="295"/>
|
<Caret Line="307" Column="39" TopLine="301"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="322" TopLine="313"/>
|
<Caret Line="82" Column="44" TopLine="77"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="503" Column="53" TopLine="488"/>
|
<Caret Line="957" TopLine="939"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="92" Column="27" TopLine="92"/>
|
<Caret Line="958" TopLine="939"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="503" Column="11" TopLine="499"/>
|
<Caret Line="957" TopLine="939"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="201" Column="11" TopLine="166"/>
|
<Caret Line="958" TopLine="939"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="982" Column="68" TopLine="963"/>
|
<Caret Line="960" TopLine="939"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
<Filename Value="C:\lazarus\lcl\include\wincontrol.inc"/>
|
||||||
<Caret Line="307" Column="39" TopLine="301"/>
|
<Caret Line="5683" TopLine="5667"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
|
@ -194,7 +194,8 @@ begin
|
|||||||
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
||||||
GlobalCEFApp.EnableHighDPISupport := True;
|
GlobalCEFApp.EnableHighDPISupport := True;
|
||||||
GlobalCEFApp.ExternalMessagePump := True;
|
GlobalCEFApp.ExternalMessagePump := True;
|
||||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||||
|
//GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
GlobalCEFApp.OnScheduleMessagePumpWork := @GlobalCEFApp_OnScheduleMessagePumpWork;
|
GlobalCEFApp.OnScheduleMessagePumpWork := @GlobalCEFApp_OnScheduleMessagePumpWork;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -952,6 +953,8 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
|
||||||
|
if (Key in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]) then Key := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -58,10 +58,7 @@ uses
|
|||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
|
||||||
GlobalCEFApp.EnableHighDPISupport := True;
|
|
||||||
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
@ -73,6 +70,5 @@ begin
|
|||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
@ -8,10 +8,9 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="PopupBrowser.lpr"/>
|
<Filename Value="PopupBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="2"/>
|
||||||
<EditorIndex Value="1"/>
|
<TopLine Value="33"/>
|
||||||
<TopLine Value="42"/>
|
<CursorPos X="54" Y="47"/>
|
||||||
<CursorPos X="40" Y="64"/>
|
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -22,8 +21,8 @@
|
|||||||
<ComponentName Value="MainForm"/>
|
<ComponentName Value="MainForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<TopLine Value="198"/>
|
<TopLine Value="42"/>
|
||||||
<CursorPos X="3" Y="209"/>
|
<CursorPos X="39" Y="189"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -35,16 +34,16 @@
|
|||||||
<ComponentName Value="ChildForm"/>
|
<ComponentName Value="ChildForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="2"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="272"/>
|
<EditorIndex Value="1"/>
|
||||||
<CursorPos X="72" Y="287"/>
|
<TopLine Value="888"/>
|
||||||
|
<CursorPos X="78" Y="906"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Bookmarks Count="2">
|
<Bookmarks Count="2">
|
||||||
<Item0 X="64" Y="173" ID="2"/>
|
<Item0 X="64" Y="173" ID="2"/>
|
||||||
<Item1 Y="704" ID="1"/>
|
<Item1 Y="704" ID="1"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
@ -56,127 +55,63 @@
|
|||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="14" HistoryIndex="13">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="149" Column="74" TopLine="137"/>
|
<Caret Line="81" Column="34" TopLine="68"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="84" Column="24" TopLine="73"/>
|
<Caret Line="126" Column="69" TopLine="106"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="942" Column="31" TopLine="922"/>
|
<Caret Line="127" Column="44" TopLine="107"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="107" Column="47" TopLine="104"/>
|
<Caret Line="248" Column="33" TopLine="241"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="109" Column="23" TopLine="104"/>
|
<Caret Line="249" Column="20" TopLine="241"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="145" Column="68" TopLine="125"/>
|
<Caret Line="269" Column="33" TopLine="262"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="174" Column="21" TopLine="154"/>
|
<Caret Line="270" Column="20" TopLine="262"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="175" Column="43" TopLine="155"/>
|
<Caret Line="271" Column="24" TopLine="262"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="688" Column="24" TopLine="668"/>
|
<Caret Line="272" Column="31" TopLine="262"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="109" Column="51" TopLine="102"/>
|
<Caret Line="280" Column="35" TopLine="261"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="9" Column="72"/>
|
<Caret Line="205" Column="39" TopLine="199"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="84" Column="52" TopLine="64"/>
|
<Caret Line="76" Column="384" TopLine="76"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="943" Column="59" TopLine="923"/>
|
<Caret Line="189" Column="39" TopLine="42"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uChildForm.pas"/>
|
||||||
<Caret Line="945" Column="9" TopLine="925"/>
|
<Caret Line="75" Column="33" TopLine="62"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
|
||||||
<Filename Value="uChildForm.pas"/>
|
|
||||||
<Caret Line="84" Column="47" TopLine="73"/>
|
|
||||||
</Position15>
|
|
||||||
<Position16>
|
|
||||||
<Filename Value="uChildForm.pas"/>
|
|
||||||
<Caret Line="945" Column="4" TopLine="923"/>
|
|
||||||
</Position16>
|
|
||||||
<Position17>
|
|
||||||
<Filename Value="uChildForm.pas"/>
|
|
||||||
<Caret Line="114" Column="44" TopLine="96"/>
|
|
||||||
</Position17>
|
|
||||||
<Position18>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="81" Column="34" TopLine="68"/>
|
|
||||||
</Position18>
|
|
||||||
<Position19>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="126" Column="69" TopLine="106"/>
|
|
||||||
</Position19>
|
|
||||||
<Position20>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="127" Column="44" TopLine="107"/>
|
|
||||||
</Position20>
|
|
||||||
<Position21>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="248" Column="33" TopLine="241"/>
|
|
||||||
</Position21>
|
|
||||||
<Position22>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="249" Column="20" TopLine="241"/>
|
|
||||||
</Position22>
|
|
||||||
<Position23>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="269" Column="33" TopLine="262"/>
|
|
||||||
</Position23>
|
|
||||||
<Position24>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="270" Column="20" TopLine="262"/>
|
|
||||||
</Position24>
|
|
||||||
<Position25>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="271" Column="24" TopLine="262"/>
|
|
||||||
</Position25>
|
|
||||||
<Position26>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="272" Column="31" TopLine="262"/>
|
|
||||||
</Position26>
|
|
||||||
<Position27>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="280" Column="35" TopLine="261"/>
|
|
||||||
</Position27>
|
|
||||||
<Position28>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="205" Column="39" TopLine="199"/>
|
|
||||||
</Position28>
|
|
||||||
<Position29>
|
|
||||||
<Filename Value="uMainForm.pas"/>
|
|
||||||
<Caret Line="76" Column="384" TopLine="76"/>
|
|
||||||
</Position29>
|
|
||||||
<Position30>
|
|
||||||
<Filename Value="uChildForm.pas"/>
|
|
||||||
<Caret Line="96" Column="382" TopLine="77"/>
|
|
||||||
</Position30>
|
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -902,6 +902,8 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
|
||||||
|
if (Key in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]) then Key := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -107,6 +107,8 @@ type
|
|||||||
var
|
var
|
||||||
MainForm: TMainForm;
|
MainForm: TMainForm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -138,7 +140,15 @@ uses
|
|||||||
// 2. When all the child forms are closed then FormCloseQuery is triggered again, sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
// 2. When all the child forms are closed then FormCloseQuery is triggered again, sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
||||||
// 3. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
// 3. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
||||||
// 4. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
// 4. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
||||||
|
GlobalCEFApp.EnableHighDPISupport := True;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
begin
|
begin
|
||||||
|
@ -58,9 +58,7 @@ uses
|
|||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.EnableHighDPISupport := True;
|
|
||||||
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
@ -72,6 +70,5 @@ begin
|
|||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
@ -8,9 +8,8 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="PopupBrowser2.lpr"/>
|
<Filename Value="PopupBrowser2.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<TopLine Value="42"/>
|
<TopLine Value="42"/>
|
||||||
<CursorPos X="35" Y="63"/>
|
<CursorPos X="61" Y="64"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -21,9 +20,10 @@
|
|||||||
<ComponentName Value="MainForm"/>
|
<ComponentName Value="MainForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="198"/>
|
<TopLine Value="141"/>
|
||||||
<CursorPos X="39" Y="205"/>
|
<CursorPos X="11" Y="110"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
|
@ -107,6 +107,8 @@ type
|
|||||||
var
|
var
|
||||||
MainForm: TMainForm;
|
MainForm: TMainForm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -138,7 +140,14 @@ uses
|
|||||||
// 2. When all the child forms are closed then FormCloseQuery is triggered again, sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
// 2. When all the child forms are closed then FormCloseQuery is triggered again, sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
||||||
// 3. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
// 3. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
||||||
// 4. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
// 4. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.EnableHighDPISupport := True;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
begin
|
begin
|
||||||
|
@ -47,7 +47,7 @@ uses
|
|||||||
Forms, Interfaces,
|
Forms, Interfaces,
|
||||||
Windows,
|
Windows,
|
||||||
{$ENDIF }
|
{$ENDIF }
|
||||||
uCEFApplication, uCEFConstants,
|
uCEFApplication,
|
||||||
uPostInspectorBrowser in 'uPostInspectorBrowser.pas' {Form1};
|
uPostInspectorBrowser in 'uPostInspectorBrowser.pas' {Form1};
|
||||||
|
|
||||||
//{$R *.res}
|
//{$R *.res}
|
||||||
@ -57,7 +57,7 @@ uses
|
|||||||
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
@ -69,6 +69,5 @@ begin
|
|||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
@ -8,8 +8,9 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="PostInspectorBrowser.lpr"/>
|
<Filename Value="PostInspectorBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<TopLine Value="38"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<CursorPos X="3" Y="53"/>
|
<TopLine Value="41"/>
|
||||||
|
<CursorPos Y="73"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -20,10 +21,9 @@
|
|||||||
<ComponentName Value="Form1"/>
|
<ComponentName Value="Form1"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="361"/>
|
<TopLine Value="109"/>
|
||||||
<CursorPos X="39" Y="368"/>
|
<CursorPos X="11" Y="121"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
|
@ -118,6 +118,8 @@ type
|
|||||||
var
|
var
|
||||||
Form1: TForm1;
|
Form1: TForm1;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -140,6 +142,13 @@ uses
|
|||||||
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
|
||||||
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
|
||||||
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
begin
|
begin
|
||||||
|
@ -51,18 +51,7 @@ uses
|
|||||||
{$SetPEFlags $20}
|
{$SetPEFlags $20}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
|
||||||
|
|
||||||
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.
|
|
||||||
|
|
||||||
{
|
|
||||||
GlobalCEFApp.FrameworkDirPath := 'cef';
|
|
||||||
GlobalCEFApp.ResourcesDirPath := 'cef';
|
|
||||||
GlobalCEFApp.LocalesDirPath := 'cef\locales';
|
|
||||||
GlobalCEFApp.cache := 'cef\cache';
|
|
||||||
GlobalCEFApp.UserDataPath := 'cef\User Data';
|
|
||||||
}
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
@ -71,6 +60,5 @@ begin
|
|||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
@ -8,10 +8,9 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="SimpleBrowser.lpr"/>
|
<Filename Value="SimpleBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="40"/>
|
<TopLine Value="32"/>
|
||||||
<CursorPos X="32" Y="55"/>
|
<CursorPos X="101" Y="63"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -22,8 +21,9 @@
|
|||||||
<ComponentName Value="Form1"/>
|
<ComponentName Value="Form1"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<TopLine Value="165"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<CursorPos X="53" Y="177"/>
|
<TopLine Value="135"/>
|
||||||
|
<CursorPos X="64" Y="129"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="2" HistoryIndex="1">
|
<JumpHistory Count="4" HistoryIndex="3">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uSimpleBrowser.pas"/>
|
<Filename Value="uSimpleBrowser.pas"/>
|
||||||
<Caret Line="4" Column="8"/>
|
<Caret Line="4" Column="8"/>
|
||||||
@ -47,6 +47,14 @@
|
|||||||
<Filename Value="uSimpleBrowser.pas"/>
|
<Filename Value="uSimpleBrowser.pas"/>
|
||||||
<Caret Line="83" Column="386" TopLine="59"/>
|
<Caret Line="83" Column="386" TopLine="59"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="SimpleBrowser.lpr"/>
|
||||||
|
<Caret Line="63" Column="101" TopLine="32"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="uSimpleBrowser.pas"/>
|
||||||
|
<Caret Line="92" Column="11" TopLine="91"/>
|
||||||
|
</Position4>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -89,6 +89,8 @@ type
|
|||||||
var
|
var
|
||||||
Form1: TForm1;
|
Form1: TForm1;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -113,7 +115,22 @@ uses
|
|||||||
// 1. The FormCloseQuery event sets CanClose to False and calls TChromiumWindow.CloseBrowser, which triggers the TChromiumWindow.OnClose event.
|
// 1. The FormCloseQuery event sets CanClose to False and calls TChromiumWindow.CloseBrowser, which triggers the TChromiumWindow.OnClose event.
|
||||||
// 2. The TChromiumWindow.OnClose event calls TChromiumWindow.DestroyChildWindow which triggers the TChromiumWindow.OnBeforeClose event.
|
// 2. The TChromiumWindow.OnClose event calls TChromiumWindow.DestroyChildWindow which triggers the TChromiumWindow.OnBeforeClose event.
|
||||||
// 3. TChromiumWindow.OnBeforeClose sets FCanClose to True and closes the form.
|
// 3. TChromiumWindow.OnBeforeClose sets FCanClose to True and closes the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
|
||||||
|
// In case you want to use custom directories for the CEF3 binaries, cache, cookies and user data.
|
||||||
|
{
|
||||||
|
GlobalCEFApp.FrameworkDirPath := 'cef';
|
||||||
|
GlobalCEFApp.ResourcesDirPath := 'cef';
|
||||||
|
GlobalCEFApp.LocalesDirPath := 'cef\locales';
|
||||||
|
GlobalCEFApp.cache := 'cef\cache';
|
||||||
|
GlobalCEFApp.UserDataPath := 'cef\User Data';
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||||
begin
|
begin
|
||||||
|
@ -19,17 +19,16 @@ uses
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
RequireDerivedFormResource:=True;
|
RequireDerivedFormResource := True;
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TForm1, Form1);
|
Application.CreateForm(TForm1, Form1);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GlobalCEFApp.Free;
|
DestroyGlobalCEFApp;
|
||||||
GlobalCEFApp := nil;
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -8,7 +8,11 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="SimpleBrowser2.lpr"/>
|
<Filename Value="SimpleBrowser2.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<CursorPos X="34" Y="26"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="uSimpleBrowser2.pas"/>
|
<Filename Value="uSimpleBrowser2.pas"/>
|
||||||
@ -31,9 +35,8 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="uSimpleLazarusBrowser"/>
|
<UnitName Value="uSimpleLazarusBrowser"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<TopLine Value="69"/>
|
||||||
<TopLine Value="148"/>
|
<CursorPos X="11" Y="96"/>
|
||||||
<CursorPos X="39" Y="155"/>
|
|
||||||
<UsageCount Value="43"/>
|
<UsageCount Value="43"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
|
@ -93,6 +93,8 @@ type
|
|||||||
var
|
var
|
||||||
Form1 : TForm1;
|
Form1 : TForm1;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -115,6 +117,13 @@ uses
|
|||||||
uCEFApplication;
|
uCEFApplication;
|
||||||
|
|
||||||
{ TForm1 }
|
{ TForm1 }
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.FormCreate(Sender: TObject);
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
@ -22,15 +22,15 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="154"/>
|
<TopLine Value="111"/>
|
||||||
<CursorPos X="39" Y="160"/>
|
<CursorPos X="41" Y="122"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="5" HistoryIndex="4">
|
<JumpHistory Count="7" HistoryIndex="6">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="SimpleExternalPumpBrowser.lpr"/>
|
<Filename Value="SimpleExternalPumpBrowser.lpr"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -50,6 +50,14 @@
|
|||||||
<Filename Value="uSimpleExternalPumpBrowser.pas"/>
|
<Filename Value="uSimpleExternalPumpBrowser.pas"/>
|
||||||
<Caret Line="74" Column="386" TopLine="52"/>
|
<Caret Line="74" Column="386" TopLine="52"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="SimpleExternalPumpBrowser.lpr"/>
|
||||||
|
<Caret Line="54" Column="3" TopLine="50"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="uSimpleExternalPumpBrowser.pas"/>
|
||||||
|
<Caret Line="89" Column="11" TopLine="73"/>
|
||||||
|
</Position7>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -118,7 +118,8 @@ begin
|
|||||||
|
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
GlobalCEFApp.ExternalMessagePump := True;
|
GlobalCEFApp.ExternalMessagePump := True;
|
||||||
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
GlobalCEFApp.MultiThreadedMessageLoop := False;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
|
GlobalCEFApp.OnScheduleMessagePumpWork := GlobalCEFApp_OnScheduleMessagePumpWork;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -53,9 +53,7 @@ uses
|
|||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
|
||||||
GlobalCEFApp.EnableHighDPISupport := True;
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
|
@ -8,7 +8,11 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="SimpleOSRBrowser.lpr"/>
|
<Filename Value="SimpleOSRBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="34"/>
|
||||||
|
<CursorPos X="22" Y="56"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -34,11 +38,11 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="269"/>
|
<TopLine Value="919"/>
|
||||||
<CursorPos X="39" Y="276"/>
|
<CursorPos X="78" Y="936"/>
|
||||||
<UsageCount Value="42"/>
|
<UsageCount Value="42"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 X="40" Y="251" ID="4"/>
|
<Item0 X="40" Y="262" ID="4"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -225,7 +229,7 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit26>
|
</Unit26>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="4" HistoryIndex="3">
|
<JumpHistory Count="5" HistoryIndex="4">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||||
<Caret Line="204" Column="63" TopLine="19"/>
|
<Caret Line="204" Column="63" TopLine="19"/>
|
||||||
@ -242,6 +246,10 @@
|
|||||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||||
<Caret Line="99" Column="382" TopLine="73"/>
|
<Caret Line="99" Column="382" TopLine="73"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||||
|
<Caret Line="155" Column="11" TopLine="140"/>
|
||||||
|
</Position5>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -152,6 +152,8 @@ type
|
|||||||
var
|
var
|
||||||
Form1: TForm1;
|
Form1: TForm1;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -166,6 +168,15 @@ uses
|
|||||||
// set "Result" to false and CEF3 will destroy the internal browser immediately.
|
// set "Result" to false and CEF3 will destroy the internal browser immediately.
|
||||||
// 3- chrmosr.OnBeforeClose is triggered because the internal browser was destroyed.
|
// 3- chrmosr.OnBeforeClose is triggered because the internal browser was destroyed.
|
||||||
// Now we set FCanClose to True and send WM_CLOSE to the form.
|
// Now we set FCanClose to True and send WM_CLOSE to the form.
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.WindowlessRenderingEnabled := True;
|
||||||
|
GlobalCEFApp.EnableHighDPISupport := True;
|
||||||
|
//GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TForm1.GoBtnClick(Sender: TObject);
|
procedure TForm1.GoBtnClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@ -921,6 +932,8 @@ begin
|
|||||||
TempKeyEvent.focus_on_editable_field := ord(False);
|
TempKeyEvent.focus_on_editable_field := ord(False);
|
||||||
|
|
||||||
chrmosr.SendKeyEvent(@TempKeyEvent);
|
chrmosr.SendKeyEvent(@TempKeyEvent);
|
||||||
|
|
||||||
|
if (Key in [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN, VK_TAB]) then Key := 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="SimpleBrowser.lpr"/>
|
<Filename Value="SimpleBrowser.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<TopLine Value="21"/>
|
<TopLine Value="36"/>
|
||||||
<CursorPos X="14" Y="44"/>
|
<CursorPos X="14" Y="44"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -20,9 +20,8 @@
|
|||||||
<ComponentName Value="Form1"/>
|
<ComponentName Value="Form1"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="162"/>
|
<TopLine Value="75"/>
|
||||||
<CursorPos X="39" Y="169"/>
|
<CursorPos X="39" Y="169"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -32,6 +31,7 @@
|
|||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="uCEFLoader.pas"/>
|
<Filename Value="uCEFLoader.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="51"/>
|
<TopLine Value="51"/>
|
||||||
<CursorPos Y="65"/>
|
<CursorPos Y="65"/>
|
||||||
|
@ -22,15 +22,15 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="436"/>
|
<TopLine Value="137"/>
|
||||||
<CursorPos X="39" Y="444"/>
|
<CursorPos X="11" Y="123"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="4" HistoryIndex="3">
|
<JumpHistory Count="5" HistoryIndex="4">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="TabBrowser.lpr"/>
|
<Filename Value="TabBrowser.lpr"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -46,6 +46,10 @@
|
|||||||
<Filename Value="uMainForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
<Caret Line="97" Column="386" TopLine="91"/>
|
<Caret Line="97" Column="386" TopLine="91"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="TabBrowser.lpr"/>
|
||||||
|
<Caret Line="53" Column="3" TopLine="41"/>
|
||||||
|
</Position5>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="67"/>
|
<TopLine Value="113"/>
|
||||||
<CursorPos Y="65"/>
|
<CursorPos X="35" Y="117"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="2" HistoryIndex="1">
|
<JumpHistory Count="3" HistoryIndex="2">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uMainForm.pas"/>
|
<Filename Value="uMainForm.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -52,6 +52,10 @@
|
|||||||
<Filename Value="uChildForm.pas"/>
|
<Filename Value="uChildForm.pas"/>
|
||||||
<Caret Line="85" Column="43" TopLine="55"/>
|
<Caret Line="85" Column="43" TopLine="55"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="uMainForm.pas"/>
|
||||||
|
<Caret Line="93" Column="25" TopLine="66"/>
|
||||||
|
</Position3>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -113,7 +113,8 @@ end;
|
|||||||
procedure CreateGlobalCEFApp;
|
procedure CreateGlobalCEFApp;
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
|
GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.CreateToolboxChild(const ChildCaption, URL: string);
|
procedure TMainForm.CreateToolboxChild(const ChildCaption, URL: string);
|
||||||
|
@ -59,8 +59,7 @@ uses
|
|||||||
{$SetPEFlags $20}
|
{$SetPEFlags $20}
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GlobalCEFApp := TCefApplication.Create;
|
CreateGlobalCEFApp;
|
||||||
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
|
||||||
|
|
||||||
if GlobalCEFApp.StartMainProcess then
|
if GlobalCEFApp.StartMainProcess then
|
||||||
begin
|
begin
|
||||||
|
@ -8,9 +8,8 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="URLRequest.lpr"/>
|
<Filename Value="URLRequest.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<TopLine Value="43"/>
|
<TopLine Value="43"/>
|
||||||
<CursorPos X="32" Y="62"/>
|
<CursorPos X="18" Y="52"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<DefaultSyntaxHighlighter Value="Delphi"/>
|
<DefaultSyntaxHighlighter Value="Delphi"/>
|
||||||
@ -21,9 +20,10 @@
|
|||||||
<ComponentName Value="URLRequestFrm"/>
|
<ComponentName Value="URLRequestFrm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="101"/>
|
<TopLine Value="104"/>
|
||||||
<CursorPos X="47" Y="115"/>
|
<CursorPos X="20" Y="115"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="21" HistoryIndex="20">
|
<JumpHistory Count="24" HistoryIndex="23">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="uURLRequest.pas"/>
|
<Filename Value="uURLRequest.pas"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
@ -136,6 +136,18 @@
|
|||||||
<Filename Value="uURLRequest.pas"/>
|
<Filename Value="uURLRequest.pas"/>
|
||||||
<Caret Line="150" Column="54" TopLine="47"/>
|
<Caret Line="150" Column="54" TopLine="47"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
|
<Position22>
|
||||||
|
<Filename Value="URLRequest.lpr"/>
|
||||||
|
<Caret Line="62" Column="22" TopLine="43"/>
|
||||||
|
</Position22>
|
||||||
|
<Position23>
|
||||||
|
<Filename Value="uURLRequest.pas"/>
|
||||||
|
<Caret Line="91" Column="29" TopLine="75"/>
|
||||||
|
</Position23>
|
||||||
|
<Position24>
|
||||||
|
<Filename Value="uURLRequest.pas"/>
|
||||||
|
<Caret Line="120" Column="3" TopLine="118"/>
|
||||||
|
</Position24>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
|
@ -88,6 +88,8 @@ type
|
|||||||
var
|
var
|
||||||
URLRequestFrm: TURLRequestFrm;
|
URLRequestFrm: TURLRequestFrm;
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
@ -110,7 +112,14 @@ implementation
|
|||||||
// 3- in the TCEFUrlRequestClientComponent.OnRequestComplete event we set FCanClose to TRUE and send WM_CLOSE to the form.
|
// 3- in the TCEFUrlRequestClientComponent.OnRequestComplete event we set FCanClose to TRUE and send WM_CLOSE to the form.
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uCEFMiscFunctions, uCEFTypes, uCEFPostData, uCEFPostDataElement, uCEFConstants;
|
uCEFApplication, uCEFMiscFunctions, uCEFTypes, uCEFPostData, uCEFPostDataElement, uCEFConstants;
|
||||||
|
|
||||||
|
|
||||||
|
procedure CreateGlobalCEFApp;
|
||||||
|
begin
|
||||||
|
GlobalCEFApp := TCefApplication.Create;
|
||||||
|
GlobalCEFApp.DisableFeatures := 'NetworkService';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TURLRequestFrm.DownloadBtnClick(Sender: TObject);
|
procedure TURLRequestFrm.DownloadBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
|
||||||
<License Value="MPL 1.1"/>
|
<License Value="MPL 1.1"/>
|
||||||
<Version Major="75" Release="7"/>
|
<Version Major="75" Release="8"/>
|
||||||
<Files Count="143">
|
<Files Count="143">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/>
|
||||||
|
@ -62,7 +62,7 @@ uses
|
|||||||
const
|
const
|
||||||
CEF_SUPPORTED_VERSION_MAJOR = 75;
|
CEF_SUPPORTED_VERSION_MAJOR = 75;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 0;
|
CEF_SUPPORTED_VERSION_MINOR = 0;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 7;
|
CEF_SUPPORTED_VERSION_RELEASE = 8;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = 75;
|
CEF_CHROMEELF_VERSION_MAJOR = 75;
|
||||||
@ -114,6 +114,7 @@ type
|
|||||||
FMultiThreadedMessageLoop : boolean;
|
FMultiThreadedMessageLoop : boolean;
|
||||||
FExternalMessagePump : boolean;
|
FExternalMessagePump : boolean;
|
||||||
FDeleteCache : boolean;
|
FDeleteCache : boolean;
|
||||||
|
FDeleteCookies : boolean;
|
||||||
FCustomCommandLines : TStringList;
|
FCustomCommandLines : TStringList;
|
||||||
FCustomCommandLineValues : TStringList;
|
FCustomCommandLineValues : TStringList;
|
||||||
FFlashEnabled : boolean;
|
FFlashEnabled : boolean;
|
||||||
@ -280,7 +281,10 @@ type
|
|||||||
function ExecuteProcess(const aApp : ICefApp) : integer;
|
function ExecuteProcess(const aApp : ICefApp) : integer;
|
||||||
procedure InitializeSettings(var aSettings : TCefSettings);
|
procedure InitializeSettings(var aSettings : TCefSettings);
|
||||||
function InitializeLibrary(const aApp : ICefApp) : boolean;
|
function InitializeLibrary(const aApp : ICefApp) : boolean;
|
||||||
procedure RenameAndDeleteDir(const aDirectory : string);
|
procedure RenameAndDeleteDir(const aDirectory : string; aKeepCookies : boolean = False);
|
||||||
|
procedure DeleteCacheContents(const aDirectory : string);
|
||||||
|
procedure DeleteCookiesDB(const aDirectory : string);
|
||||||
|
procedure MoveCookiesDB(const aSrcDirectory, aDstDirectory : string);
|
||||||
function MultiExeProcessing : boolean;
|
function MultiExeProcessing : boolean;
|
||||||
function SingleExeProcessing : boolean;
|
function SingleExeProcessing : boolean;
|
||||||
function CheckCEFLibrary : boolean;
|
function CheckCEFLibrary : boolean;
|
||||||
@ -362,6 +366,7 @@ type
|
|||||||
property MultiThreadedMessageLoop : boolean read FMultiThreadedMessageLoop write FMultiThreadedMessageLoop;
|
property MultiThreadedMessageLoop : boolean read FMultiThreadedMessageLoop write FMultiThreadedMessageLoop;
|
||||||
property ExternalMessagePump : boolean read FExternalMessagePump write FExternalMessagePump;
|
property ExternalMessagePump : boolean read FExternalMessagePump write FExternalMessagePump;
|
||||||
property DeleteCache : boolean read FDeleteCache write FDeleteCache;
|
property DeleteCache : boolean read FDeleteCache write FDeleteCache;
|
||||||
|
property DeleteCookies : boolean read FDeleteCookies write FDeleteCookies;
|
||||||
property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled;
|
property FlashEnabled : boolean read FFlashEnabled write FFlashEnabled;
|
||||||
property EnableMediaStream : boolean read FEnableMediaStream write FEnableMediaStream;
|
property EnableMediaStream : boolean read FEnableMediaStream write FEnableMediaStream;
|
||||||
property EnableSpeechInput : boolean read FEnableSpeechInput write FEnableSpeechInput;
|
property EnableSpeechInput : boolean read FEnableSpeechInput write FEnableSpeechInput;
|
||||||
@ -531,6 +536,7 @@ begin
|
|||||||
FMultiThreadedMessageLoop := True;
|
FMultiThreadedMessageLoop := True;
|
||||||
FExternalMessagePump := False;
|
FExternalMessagePump := False;
|
||||||
FDeleteCache := False;
|
FDeleteCache := False;
|
||||||
|
FDeleteCookies := False;
|
||||||
FFlashEnabled := True;
|
FFlashEnabled := True;
|
||||||
FEnableMediaStream := True;
|
FEnableMediaStream := True;
|
||||||
FEnableSpeechInput := True;
|
FEnableSpeechInput := True;
|
||||||
@ -544,7 +550,7 @@ begin
|
|||||||
FOnRegisterCustomSchemes := nil;
|
FOnRegisterCustomSchemes := nil;
|
||||||
FEnableHighDPISupport := False;
|
FEnableHighDPISupport := False;
|
||||||
FMuteAudio := False;
|
FMuteAudio := False;
|
||||||
FSitePerProcess := True;
|
FSitePerProcess := False;
|
||||||
FDisableWebSecurity := False;
|
FDisableWebSecurity := False;
|
||||||
FDisablePDFExtension := False;
|
FDisablePDFExtension := False;
|
||||||
FLogProcessInfo := False;
|
FLogProcessInfo := False;
|
||||||
@ -1148,7 +1154,14 @@ begin
|
|||||||
try
|
try
|
||||||
if (aApp <> nil) then
|
if (aApp <> nil) then
|
||||||
begin
|
begin
|
||||||
if FDeleteCache then RenameAndDeleteDir(FCache);
|
if FDeleteCache and FDeleteCookies then
|
||||||
|
RenameAndDeleteDir(FCache)
|
||||||
|
else
|
||||||
|
if FDeleteCookies then
|
||||||
|
DeleteCookiesDB(FCache)
|
||||||
|
else
|
||||||
|
if FDeleteCache then
|
||||||
|
RenameAndDeleteDir(FCache, True);
|
||||||
|
|
||||||
RegisterWidevineCDM;
|
RegisterWidevineCDM;
|
||||||
|
|
||||||
@ -1176,7 +1189,55 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefApplication.RenameAndDeleteDir(const aDirectory : string);
|
procedure TCefApplication.DeleteCacheContents(const aDirectory : string);
|
||||||
|
var
|
||||||
|
TempFiles : TStringList;
|
||||||
|
begin
|
||||||
|
TempFiles := TStringList.Create;
|
||||||
|
|
||||||
|
try
|
||||||
|
TempFiles.Add('Cookies');
|
||||||
|
TempFiles.Add('Cookies-journal');
|
||||||
|
|
||||||
|
DeleteDirContents(aDirectory, TempFiles);
|
||||||
|
finally
|
||||||
|
FreeAndNil(TempFiles);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCefApplication.DeleteCookiesDB(const aDirectory : string);
|
||||||
|
var
|
||||||
|
TempFiles : TStringList;
|
||||||
|
begin
|
||||||
|
TempFiles := TStringList.Create;
|
||||||
|
|
||||||
|
try
|
||||||
|
TempFiles.Add(IncludeTrailingPathDelimiter(aDirectory) + 'Cookies');
|
||||||
|
TempFiles.Add(IncludeTrailingPathDelimiter(aDirectory) + 'Cookies-journal');
|
||||||
|
|
||||||
|
DeleteFileList(TempFiles);
|
||||||
|
finally
|
||||||
|
FreeAndNil(TempFiles);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCefApplication.MoveCookiesDB(const aSrcDirectory, aDstDirectory : string);
|
||||||
|
var
|
||||||
|
TempFiles : TStringList;
|
||||||
|
begin
|
||||||
|
TempFiles := TStringList.Create;
|
||||||
|
|
||||||
|
try
|
||||||
|
TempFiles.Add('Cookies');
|
||||||
|
TempFiles.Add('Cookies-journal');
|
||||||
|
|
||||||
|
MoveFileList(TempFiles, aSrcDirectory, aDstDirectory);
|
||||||
|
finally
|
||||||
|
FreeAndNil(TempFiles);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCefApplication.RenameAndDeleteDir(const aDirectory : string; aKeepCookies : boolean);
|
||||||
var
|
var
|
||||||
TempOldDir, TempNewDir : string;
|
TempOldDir, TempNewDir : string;
|
||||||
i : integer;
|
i : integer;
|
||||||
@ -1197,12 +1258,10 @@ begin
|
|||||||
TempNewDir := TempOldDir + '(' + inttostr(i) + ')';
|
TempNewDir := TempOldDir + '(' + inttostr(i) + ')';
|
||||||
until not(DirectoryExists(TempNewDir));
|
until not(DirectoryExists(TempNewDir));
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
|
||||||
if MoveFileW(PWideChar(TempOldDir + chr(0)), PWideChar(TempNewDir + chr(0))) then
|
|
||||||
{$ELSE}
|
|
||||||
if RenameFile(TempOldDir, TempNewDir) then
|
if RenameFile(TempOldDir, TempNewDir) then
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
|
if aKeepCookies then MoveCookiesDB(TempNewDir, TempOldDir);
|
||||||
|
|
||||||
TempThread := TCEFDirectoryDeleterThread.Create(TempNewDir);
|
TempThread := TCEFDirectoryDeleterThread.Create(TempNewDir);
|
||||||
{$IFDEF DELPHI14_UP}
|
{$IFDEF DELPHI14_UP}
|
||||||
TempThread.Start;
|
TempThread.Start;
|
||||||
@ -1211,10 +1270,16 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
DeleteDirContents(aDirectory);
|
if aKeepCookies then
|
||||||
|
DeleteCacheContents(aDirectory)
|
||||||
|
else
|
||||||
|
DeleteDirContents(aDirectory);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
DeleteDirContents(aDirectory);
|
if aKeepCookies then
|
||||||
|
DeleteCacheContents(aDirectory)
|
||||||
|
else
|
||||||
|
DeleteDirContents(aDirectory);
|
||||||
except
|
except
|
||||||
on e : exception do
|
on e : exception do
|
||||||
if CustomExceptionHandler('TCefApplication.RenameAndDeleteDir', e) then raise;
|
if CustomExceptionHandler('TCefApplication.RenameAndDeleteDir', e) then raise;
|
||||||
|
@ -75,7 +75,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -187,11 +187,11 @@ end;
|
|||||||
|
|
||||||
// TCustomAudioHandler
|
// TCustomAudioHandler
|
||||||
|
|
||||||
constructor TCustomAudioHandler.Create(const events: Pointer);
|
constructor TCustomAudioHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomAudioHandler.Destroy;
|
destructor TCustomAudioHandler.Destroy;
|
||||||
|
@ -336,18 +336,6 @@ type
|
|||||||
procedure HandleList(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 HandleInvalid(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string);
|
||||||
|
|
||||||
function MustCreateLoadHandler : boolean; virtual;
|
|
||||||
function MustCreateFocusHandler : boolean; virtual;
|
|
||||||
function MustCreateContextMenuHandler : boolean; virtual;
|
|
||||||
function MustCreateDialogHandler : boolean; virtual;
|
|
||||||
function MustCreateKeyboardHandler : boolean; virtual;
|
|
||||||
function MustCreateDisplayHandler : boolean; virtual;
|
|
||||||
function MustCreateDownloadHandler : boolean; virtual;
|
|
||||||
function MustCreateJsDialogHandler : boolean; virtual;
|
|
||||||
function MustCreateDragHandler : boolean; virtual;
|
|
||||||
function MustCreateFindHandler : boolean; virtual;
|
|
||||||
function MustCreateAudioHandler : boolean; virtual;
|
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure PrefsAvailableMsg(var aMessage : TMessage);
|
procedure PrefsAvailableMsg(var aMessage : TMessage);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -498,6 +486,22 @@ type
|
|||||||
procedure doResolvedHostAvailable(result: TCefErrorCode; const resolvedIps: TStrings); virtual;
|
procedure doResolvedHostAvailable(result: TCefErrorCode; const resolvedIps: TStrings); virtual;
|
||||||
function doNavigationVisitorResultAvailable(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer) : boolean; virtual;
|
function doNavigationVisitorResultAvailable(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer) : boolean; virtual;
|
||||||
procedure doDownloadImageFinished(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage); virtual;
|
procedure doDownloadImageFinished(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage); virtual;
|
||||||
|
function MustCreateLoadHandler : boolean; virtual;
|
||||||
|
function MustCreateFocusHandler : boolean; virtual;
|
||||||
|
function MustCreateContextMenuHandler : boolean; virtual;
|
||||||
|
function MustCreateDialogHandler : boolean; virtual;
|
||||||
|
function MustCreateKeyboardHandler : boolean; virtual;
|
||||||
|
function MustCreateDisplayHandler : boolean; virtual;
|
||||||
|
function MustCreateDownloadHandler : boolean; virtual;
|
||||||
|
function MustCreateJsDialogHandler : boolean; virtual;
|
||||||
|
function MustCreateLifeSpanHandler : boolean; virtual;
|
||||||
|
function MustCreateRenderHandler : boolean; virtual;
|
||||||
|
function MustCreateRequestHandler : boolean; virtual;
|
||||||
|
function MustCreateDragHandler : boolean; virtual;
|
||||||
|
function MustCreateFindHandler : boolean; virtual;
|
||||||
|
function MustCreateAudioHandler : boolean; virtual;
|
||||||
|
function MustCreateResourceRequestHandler : boolean; virtual;
|
||||||
|
function MustCreateCookieAccessFilter : boolean; virtual;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -1024,22 +1028,7 @@ begin
|
|||||||
if (FHandler = nil) then
|
if (FHandler = nil) then
|
||||||
begin
|
begin
|
||||||
FIsOSR := aIsOsr;
|
FIsOSR := aIsOsr;
|
||||||
FHandler := TCustomClientHandler.Create(Self,
|
FHandler := TCustomClientHandler.Create(Self);
|
||||||
MustCreateLoadHandler,
|
|
||||||
MustCreateFocusHandler,
|
|
||||||
MustCreateContextMenuHandler,
|
|
||||||
MustCreateDialogHandler,
|
|
||||||
MustCreateKeyboardHandler,
|
|
||||||
MustCreateDisplayHandler,
|
|
||||||
MustCreateDownloadHandler,
|
|
||||||
MustCreateJsDialogHandler,
|
|
||||||
True,
|
|
||||||
FIsOSR, // Create the Render Handler in OSR mode only
|
|
||||||
True,
|
|
||||||
MustCreateDragHandler,
|
|
||||||
MustCreateFindHandler,
|
|
||||||
MustCreateAudioHandler);
|
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
@ -3059,6 +3048,21 @@ begin
|
|||||||
assigned(FOnDialogClosed);
|
assigned(FOnDialogClosed);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TChromium.MustCreateLifeSpanHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TChromium.MustCreateRenderHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := FIsOSR;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TChromium.MustCreateRequestHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
function TChromium.MustCreateDragHandler : boolean;
|
function TChromium.MustCreateDragHandler : boolean;
|
||||||
begin
|
begin
|
||||||
Result := assigned(FOnDragEnter) or
|
Result := assigned(FOnDragEnter) or
|
||||||
@ -3077,6 +3081,23 @@ begin
|
|||||||
assigned(FOnAudioStreamStopped);
|
assigned(FOnAudioStreamStopped);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TChromium.MustCreateResourceRequestHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := assigned(FOnBeforeResourceLoad) or
|
||||||
|
assigned(FOnGetResourceHandler) or
|
||||||
|
assigned(FOnResourceRedirect) or
|
||||||
|
assigned(FOnResourceResponse) or
|
||||||
|
assigned(FOnGetResourceResponseFilter) or
|
||||||
|
assigned(FOnResourceLoadComplete) or
|
||||||
|
assigned(FOnProtocolExecution);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TChromium.MustCreateCookieAccessFilter : boolean;
|
||||||
|
begin
|
||||||
|
Result := assigned(FOnCanSendCookie) or
|
||||||
|
assigned(FOnCanSaveCookie);
|
||||||
|
end;
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
procedure TChromium.PrefsAvailableMsg(var aMessage : TMessage);
|
procedure TChromium.PrefsAvailableMsg(var aMessage : TMessage);
|
||||||
begin
|
begin
|
||||||
@ -3170,14 +3191,7 @@ begin
|
|||||||
InitializeSettings(FDevBrowserSettings);
|
InitializeSettings(FDevBrowserSettings);
|
||||||
InitializeDevToolsWindowInfo(aDevTools);
|
InitializeDevToolsWindowInfo(aDevTools);
|
||||||
|
|
||||||
TempClient := TCustomClientHandler.Create(Self, False, False,
|
TempClient := TCustomClientHandler.Create(Self, True);
|
||||||
False, False,
|
|
||||||
MustCreateKeyboardHandler,
|
|
||||||
False, False,
|
|
||||||
False, False,
|
|
||||||
False, False,
|
|
||||||
False, False,
|
|
||||||
False);
|
|
||||||
|
|
||||||
if (inspectElementAt.x <> low(integer)) and
|
if (inspectElementAt.x <> low(integer)) and
|
||||||
(inspectElementAt.y <> low(integer)) then
|
(inspectElementAt.y <> low(integer)) then
|
||||||
|
@ -137,11 +137,7 @@ type
|
|||||||
procedure InitializeVars;
|
procedure InitializeVars;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: IChromiumEvents;
|
constructor Create(const events: IChromiumEvents; aDevToolsClient : boolean = False); reintroduce; virtual;
|
||||||
aCreateLoadHandler, aCreateFocusHandler, aCreateContextMenuHandler, aCreateDialogHandler,
|
|
||||||
aCreateKeyboardHandler, aCreateDisplayHandler, aCreateDownloadHandler, aCreateJsDialogHandler,
|
|
||||||
aCreateLifeSpanHandler, aCreateRenderHandler, aCreateRequestHandler, aCreateDragHandler,
|
|
||||||
aCreateFindHandler, aCreateAudioHandler : boolean); reintroduce; virtual;
|
|
||||||
procedure BeforeDestruction; override;
|
procedure BeforeDestruction; override;
|
||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
end;
|
end;
|
||||||
@ -628,21 +624,7 @@ end;
|
|||||||
// ******************************************************
|
// ******************************************************
|
||||||
|
|
||||||
|
|
||||||
constructor TCustomClientHandler.Create(const events : IChromiumEvents;
|
constructor TCustomClientHandler.Create(const events : IChromiumEvents; aDevToolsClient : boolean);
|
||||||
aCreateLoadHandler : boolean;
|
|
||||||
aCreateFocusHandler : boolean;
|
|
||||||
aCreateContextMenuHandler : boolean;
|
|
||||||
aCreateDialogHandler : boolean;
|
|
||||||
aCreateKeyboardHandler : boolean;
|
|
||||||
aCreateDisplayHandler : boolean;
|
|
||||||
aCreateDownloadHandler : boolean;
|
|
||||||
aCreateJsDialogHandler : boolean;
|
|
||||||
aCreateLifeSpanHandler : boolean;
|
|
||||||
aCreateRenderHandler : boolean;
|
|
||||||
aCreateRequestHandler : boolean;
|
|
||||||
aCreateDragHandler : boolean;
|
|
||||||
aCreateFindHandler : boolean;
|
|
||||||
aCreateAudioHandler : boolean);
|
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
@ -650,22 +632,29 @@ begin
|
|||||||
|
|
||||||
FEvents := Pointer(events);
|
FEvents := Pointer(events);
|
||||||
|
|
||||||
if (FEvents <> nil) then
|
if (events <> nil) then
|
||||||
begin
|
begin
|
||||||
if aCreateLoadHandler then FLoadHandler := TCustomLoadHandler.Create(FEvents);
|
if aDevToolsClient then
|
||||||
if aCreateFocusHandler then FFocusHandler := TCustomFocusHandler.Create(FEvents);
|
begin
|
||||||
if aCreateContextMenuHandler then FContextMenuHandler := TCustomContextMenuHandler.Create(FEvents);
|
if events.MustCreateKeyboardHandler then FKeyboardHandler := TCustomKeyboardHandler.Create(events);
|
||||||
if aCreateDialogHandler then FDialogHandler := TCustomDialogHandler.Create(FEvents);
|
end
|
||||||
if aCreateKeyboardHandler then FKeyboardHandler := TCustomKeyboardHandler.Create(FEvents);
|
else
|
||||||
if aCreateDisplayHandler then FDisplayHandler := TCustomDisplayHandler.Create(FEvents);
|
begin
|
||||||
if aCreateDownloadHandler then FDownloadHandler := TCustomDownloadHandler.Create(FEvents);
|
if events.MustCreateLoadHandler then FLoadHandler := TCustomLoadHandler.Create(events);
|
||||||
if aCreateJsDialogHandler then FJsDialogHandler := TCustomJsDialogHandler.Create(FEvents);
|
if events.MustCreateFocusHandler then FFocusHandler := TCustomFocusHandler.Create(events);
|
||||||
if aCreateLifeSpanHandler then FLifeSpanHandler := TCustomLifeSpanHandler.Create(FEvents);
|
if events.MustCreateContextMenuHandler then FContextMenuHandler := TCustomContextMenuHandler.Create(events);
|
||||||
if aCreateRenderHandler then FRenderHandler := TCustomRenderHandler.Create(FEvents);
|
if events.MustCreateDialogHandler then FDialogHandler := TCustomDialogHandler.Create(events);
|
||||||
if aCreateRequestHandler then FRequestHandler := TCustomRequestHandler.Create(FEvents);
|
if events.MustCreateKeyboardHandler then FKeyboardHandler := TCustomKeyboardHandler.Create(events);
|
||||||
if aCreateDragHandler then FDragHandler := TCustomDragHandler.Create(FEvents);
|
if events.MustCreateDisplayHandler then FDisplayHandler := TCustomDisplayHandler.Create(events);
|
||||||
if aCreateFindHandler then FFindHandler := TCustomFindHandler.Create(FEvents);
|
if events.MustCreateDownloadHandler then FDownloadHandler := TCustomDownloadHandler.Create(events);
|
||||||
if aCreateAudioHandler then FAudioHandler := TCustomAudioHandler.Create(FEvents);
|
if events.MustCreateJsDialogHandler then FJsDialogHandler := TCustomJsDialogHandler.Create(events);
|
||||||
|
if events.MustCreateLifeSpanHandler then FLifeSpanHandler := TCustomLifeSpanHandler.Create(events);
|
||||||
|
if events.MustCreateRenderHandler then FRenderHandler := TCustomRenderHandler.Create(events);
|
||||||
|
if events.MustCreateRequestHandler then FRequestHandler := TCustomRequestHandler.Create(events);
|
||||||
|
if events.MustCreateDragHandler then FDragHandler := TCustomDragHandler.Create(events);
|
||||||
|
if events.MustCreateFindHandler then FFindHandler := TCustomFindHandler.Create(events);
|
||||||
|
if events.MustCreateAudioHandler then FAudioHandler := TCustomAudioHandler.Create(events);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -214,11 +214,11 @@ end;
|
|||||||
|
|
||||||
// TCustomContextMenuHandler
|
// TCustomContextMenuHandler
|
||||||
|
|
||||||
constructor TCustomContextMenuHandler.Create(const events: Pointer);
|
constructor TCustomContextMenuHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomContextMenuHandler.Destroy;
|
destructor TCustomContextMenuHandler.Destroy;
|
||||||
|
@ -82,7 +82,7 @@ type
|
|||||||
function CanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean; override;
|
function CanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce;
|
constructor Create(const events : IChromiumEvents); reintroduce;
|
||||||
procedure BeforeDestruction; override;
|
procedure BeforeDestruction; override;
|
||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
end;
|
end;
|
||||||
@ -150,12 +150,12 @@ end;
|
|||||||
|
|
||||||
function TCefCookieAccessFilterOwn.CanSendCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const cookie: PCefCookie): boolean;
|
function TCefCookieAccessFilterOwn.CanSendCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const cookie: PCefCookie): boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCefCookieAccessFilterOwn.CanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean;
|
function TCefCookieAccessFilterOwn.CanSaveCookie(const browser: ICefBrowser; const frame: ICefFrame; const request: ICefRequest; const response: ICefResponse; const cookie: PCefCookie): boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCefCookieAccessFilterOwn.RemoveReferences;
|
procedure TCefCookieAccessFilterOwn.RemoveReferences;
|
||||||
@ -202,11 +202,11 @@ end;
|
|||||||
// TCustomCookieAccessFilter
|
// TCustomCookieAccessFilter
|
||||||
|
|
||||||
|
|
||||||
constructor TCustomCookieAccessFilter.Create(const events: Pointer);
|
constructor TCustomCookieAccessFilter.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomCookieAccessFilter.BeforeDestruction;
|
procedure TCustomCookieAccessFilter.BeforeDestruction;
|
||||||
|
@ -76,7 +76,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -158,11 +158,11 @@ end;
|
|||||||
|
|
||||||
// TCustomDialogHandler
|
// TCustomDialogHandler
|
||||||
|
|
||||||
constructor TCustomDialogHandler.Create(const events: Pointer);
|
constructor TCustomDialogHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomDialogHandler.Destroy;
|
destructor TCustomDialogHandler.Destroy;
|
||||||
|
@ -92,7 +92,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -330,11 +330,11 @@ end;
|
|||||||
|
|
||||||
// TCustomDisplayHandler
|
// TCustomDisplayHandler
|
||||||
|
|
||||||
constructor TCustomDisplayHandler.Create(const events: Pointer);
|
constructor TCustomDisplayHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomDisplayHandler.Destroy;
|
destructor TCustomDisplayHandler.Destroy;
|
||||||
|
@ -73,7 +73,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -148,11 +148,11 @@ end;
|
|||||||
|
|
||||||
// TCustomDownloadHandler
|
// TCustomDownloadHandler
|
||||||
|
|
||||||
constructor TCustomDownloadHandler.Create(const events: Pointer);
|
constructor TCustomDownloadHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomDownloadHandler.Destroy;
|
destructor TCustomDownloadHandler.Destroy;
|
||||||
|
@ -73,7 +73,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -153,11 +153,11 @@ end;
|
|||||||
|
|
||||||
// TCustomDragHandler
|
// TCustomDragHandler
|
||||||
|
|
||||||
constructor TCustomDragHandler.Create(const events: Pointer);
|
constructor TCustomDragHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomDragHandler.Destroy;
|
destructor TCustomDragHandler.Destroy;
|
||||||
|
@ -319,18 +319,6 @@ type
|
|||||||
procedure HandleList(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 HandleInvalid(const aValue : ICefValue; var aResultSL : TStringList; const aRoot, aKey : string);
|
||||||
|
|
||||||
function MustCreateLoadHandler : boolean; virtual;
|
|
||||||
function MustCreateFocusHandler : boolean; virtual;
|
|
||||||
function MustCreateContextMenuHandler : boolean; virtual;
|
|
||||||
function MustCreateDialogHandler : boolean; virtual;
|
|
||||||
function MustCreateKeyboardHandler : boolean; virtual;
|
|
||||||
function MustCreateDisplayHandler : boolean; virtual;
|
|
||||||
function MustCreateDownloadHandler : boolean; virtual;
|
|
||||||
function MustCreateJsDialogHandler : boolean; virtual;
|
|
||||||
function MustCreateDragHandler : boolean; virtual;
|
|
||||||
function MustCreateFindHandler : boolean; virtual;
|
|
||||||
function MustCreateAudioHandler : boolean; virtual;
|
|
||||||
|
|
||||||
procedure ApplyZoomStep;
|
procedure ApplyZoomStep;
|
||||||
function GetParentForm : TCustomForm;
|
function GetParentForm : TCustomForm;
|
||||||
|
|
||||||
@ -465,6 +453,22 @@ type
|
|||||||
procedure doResolvedHostAvailable(result: TCefErrorCode; const resolvedIps: TStrings); virtual;
|
procedure doResolvedHostAvailable(result: TCefErrorCode; const resolvedIps: TStrings); virtual;
|
||||||
function doNavigationVisitorResultAvailable(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer) : boolean; virtual;
|
function doNavigationVisitorResultAvailable(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer) : boolean; virtual;
|
||||||
procedure doDownloadImageFinished(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage); virtual;
|
procedure doDownloadImageFinished(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage); virtual;
|
||||||
|
function MustCreateLoadHandler : boolean; virtual;
|
||||||
|
function MustCreateFocusHandler : boolean; virtual;
|
||||||
|
function MustCreateContextMenuHandler : boolean; virtual;
|
||||||
|
function MustCreateDialogHandler : boolean; virtual;
|
||||||
|
function MustCreateKeyboardHandler : boolean; virtual;
|
||||||
|
function MustCreateDisplayHandler : boolean; virtual;
|
||||||
|
function MustCreateDownloadHandler : boolean; virtual;
|
||||||
|
function MustCreateJsDialogHandler : boolean; virtual;
|
||||||
|
function MustCreateLifeSpanHandler : boolean; virtual;
|
||||||
|
function MustCreateRenderHandler : boolean; virtual;
|
||||||
|
function MustCreateRequestHandler : boolean; virtual;
|
||||||
|
function MustCreateDragHandler : boolean; virtual;
|
||||||
|
function MustCreateFindHandler : boolean; virtual;
|
||||||
|
function MustCreateAudioHandler : boolean; virtual;
|
||||||
|
function MustCreateResourceRequestHandler : boolean; virtual;
|
||||||
|
function MustCreateCookieAccessFilter : boolean; virtual;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -928,22 +932,7 @@ begin
|
|||||||
if (FHandler = nil) then
|
if (FHandler = nil) then
|
||||||
begin
|
begin
|
||||||
FIsOSR := aIsOsr;
|
FIsOSR := aIsOsr;
|
||||||
FHandler := TCustomClientHandler.Create(Self,
|
FHandler := TCustomClientHandler.Create(Self);
|
||||||
MustCreateLoadHandler,
|
|
||||||
MustCreateFocusHandler,
|
|
||||||
MustCreateContextMenuHandler,
|
|
||||||
MustCreateDialogHandler,
|
|
||||||
MustCreateKeyboardHandler,
|
|
||||||
MustCreateDisplayHandler,
|
|
||||||
MustCreateDownloadHandler,
|
|
||||||
MustCreateJsDialogHandler,
|
|
||||||
True,
|
|
||||||
FIsOSR,
|
|
||||||
True,
|
|
||||||
MustCreateDragHandler,
|
|
||||||
MustCreateFindHandler,
|
|
||||||
MustCreateAudioHandler);
|
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
@ -2778,6 +2767,21 @@ begin
|
|||||||
assigned(FOnDialogClosed);
|
assigned(FOnDialogClosed);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TFMXChromium.MustCreateLifeSpanHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TFMXChromium.MustCreateRenderHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := FIsOSR;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TFMXChromium.MustCreateRequestHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
function TFMXChromium.MustCreateDragHandler : boolean;
|
function TFMXChromium.MustCreateDragHandler : boolean;
|
||||||
begin
|
begin
|
||||||
Result := assigned(FOnDragEnter) or
|
Result := assigned(FOnDragEnter) or
|
||||||
@ -2796,6 +2800,23 @@ begin
|
|||||||
assigned(FOnAudioStreamStopped);
|
assigned(FOnAudioStreamStopped);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TFMXChromium.MustCreateResourceRequestHandler : boolean;
|
||||||
|
begin
|
||||||
|
Result := assigned(FOnBeforeResourceLoad) or
|
||||||
|
assigned(FOnGetResourceHandler) or
|
||||||
|
assigned(FOnResourceRedirect) or
|
||||||
|
assigned(FOnResourceResponse) or
|
||||||
|
assigned(FOnGetResourceResponseFilter) or
|
||||||
|
assigned(FOnResourceLoadComplete) or
|
||||||
|
assigned(FOnProtocolExecution);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TFMXChromium.MustCreateCookieAccessFilter : boolean;
|
||||||
|
begin
|
||||||
|
Result := assigned(FOnCanSendCookie) or
|
||||||
|
assigned(FOnCanSaveCookie);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFMXChromium.doTextResultAvailable(const aText : ustring);
|
procedure TFMXChromium.doTextResultAvailable(const aText : ustring);
|
||||||
begin
|
begin
|
||||||
if assigned(FOnTextResultAvailable) then FOnTextResultAvailable(self, aText);
|
if assigned(FOnTextResultAvailable) then FOnTextResultAvailable(self, aText);
|
||||||
|
@ -71,7 +71,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -120,11 +120,11 @@ end;
|
|||||||
|
|
||||||
// TCustomFindHandler
|
// TCustomFindHandler
|
||||||
|
|
||||||
constructor TCustomFindHandler.Create(const events: Pointer);
|
constructor TCustomFindHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomFindHandler.Destroy;
|
destructor TCustomFindHandler.Destroy;
|
||||||
|
@ -75,7 +75,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events : Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -161,11 +161,11 @@ end;
|
|||||||
|
|
||||||
// TCustomFocusHandler
|
// TCustomFocusHandler
|
||||||
|
|
||||||
constructor TCustomFocusHandler.Create(const events: Pointer);
|
constructor TCustomFocusHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomFocusHandler.Destroy;
|
destructor TCustomFocusHandler.Destroy;
|
||||||
|
@ -388,7 +388,22 @@ type
|
|||||||
procedure doResolvedHostAvailable(result: TCefErrorCode; const resolvedIps: TStrings);
|
procedure doResolvedHostAvailable(result: TCefErrorCode; const resolvedIps: TStrings);
|
||||||
function doNavigationVisitorResultAvailable(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer) : boolean;
|
function doNavigationVisitorResultAvailable(const entry: ICefNavigationEntry; current: Boolean; index, total: Integer) : boolean;
|
||||||
procedure doDownloadImageFinished(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage);
|
procedure doDownloadImageFinished(const imageUrl: ustring; httpStatusCode: Integer; const image: ICefImage);
|
||||||
|
function MustCreateLoadHandler : boolean;
|
||||||
|
function MustCreateFocusHandler : boolean;
|
||||||
|
function MustCreateContextMenuHandler : boolean;
|
||||||
|
function MustCreateDialogHandler : boolean;
|
||||||
|
function MustCreateKeyboardHandler : boolean;
|
||||||
|
function MustCreateDisplayHandler : boolean;
|
||||||
|
function MustCreateDownloadHandler : boolean;
|
||||||
|
function MustCreateJsDialogHandler : boolean;
|
||||||
|
function MustCreateLifeSpanHandler : boolean;
|
||||||
|
function MustCreateRenderHandler : boolean;
|
||||||
|
function MustCreateRequestHandler : boolean;
|
||||||
|
function MustCreateDragHandler : boolean;
|
||||||
|
function MustCreateFindHandler : boolean;
|
||||||
|
function MustCreateAudioHandler : boolean;
|
||||||
|
function MustCreateResourceRequestHandler : boolean;
|
||||||
|
function MustCreateCookieAccessFilter : boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
IServerEvents = interface
|
IServerEvents = interface
|
||||||
|
@ -77,7 +77,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -209,11 +209,11 @@ end;
|
|||||||
|
|
||||||
// TCustomJsDialogHandler
|
// TCustomJsDialogHandler
|
||||||
|
|
||||||
constructor TCustomJsDialogHandler.Create(const events: Pointer);
|
constructor TCustomJsDialogHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomJsDialogHandler.Destroy;
|
destructor TCustomJsDialogHandler.Destroy;
|
||||||
|
@ -73,7 +73,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -153,11 +153,11 @@ end;
|
|||||||
|
|
||||||
// TCustomKeyboardHandler
|
// TCustomKeyboardHandler
|
||||||
|
|
||||||
constructor TCustomKeyboardHandler.Create(const events: Pointer);
|
constructor TCustomKeyboardHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomKeyboardHandler.Destroy;
|
destructor TCustomKeyboardHandler.Destroy;
|
||||||
|
@ -77,7 +77,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -238,11 +238,11 @@ end;
|
|||||||
|
|
||||||
// TCustomLifeSpanHandler
|
// TCustomLifeSpanHandler
|
||||||
|
|
||||||
constructor TCustomLifeSpanHandler.Create(const events: Pointer);
|
constructor TCustomLifeSpanHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomLifeSpanHandler.Destroy;
|
destructor TCustomLifeSpanHandler.Destroy;
|
||||||
|
@ -77,7 +77,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -211,11 +211,11 @@ end;
|
|||||||
|
|
||||||
// TCustomLoadHandler
|
// TCustomLoadHandler
|
||||||
|
|
||||||
constructor TCustomLoadHandler.Create(const events : Pointer);
|
constructor TCustomLoadHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomLoadHandler.Destroy;
|
destructor TCustomLoadHandler.Destroy;
|
||||||
|
@ -228,7 +228,9 @@ procedure LogicalToDevice(var aRect : TCEFRect; const aDeviceScaleFactor : doubl
|
|||||||
function GetScreenDPI : integer;
|
function GetScreenDPI : integer;
|
||||||
function GetDeviceScaleFactor : single;
|
function GetDeviceScaleFactor : single;
|
||||||
|
|
||||||
function DeleteDirContents(const aDirectory : string) : boolean;
|
function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList = nil) : boolean;
|
||||||
|
function DeleteFileList(const aFileList : TStringList) : boolean;
|
||||||
|
function MoveFileList(const aFileList : TStringList; const aSrcDirectory, aDstDirectory : string) : boolean;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -1938,10 +1940,11 @@ begin
|
|||||||
Result := GetScreenDPI / 96;
|
Result := GetScreenDPI / 96;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function DeleteDirContents(const aDirectory : string) : boolean;
|
function DeleteDirContents(const aDirectory : string; const aExcludeFiles : TStringList) : boolean;
|
||||||
var
|
var
|
||||||
TempRec : TSearchRec;
|
TempRec : TSearchRec;
|
||||||
TempPath : string;
|
TempPath : string;
|
||||||
|
TempIdx : integer;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
|
|
||||||
@ -1957,14 +1960,23 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (TempRec.Name <> '.') and (TempRec.Name <> '..') then
|
if (TempRec.Name <> '.') and (TempRec.Name <> '..') then
|
||||||
begin
|
begin
|
||||||
if DeleteDirContents(TempPath) then
|
if DeleteDirContents(TempPath, aExcludeFiles) then
|
||||||
Result := RemoveDir(TempPath) and Result
|
Result := RemoveDir(TempPath) and Result
|
||||||
else
|
else
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := DeleteFile(TempPath) and Result;
|
if (aExcludeFiles <> nil) then
|
||||||
|
begin
|
||||||
|
TempIdx := aExcludeFiles.IndexOf(TempRec.Name);
|
||||||
|
Result := ((TempIdx >= 0) or
|
||||||
|
((TempIdx < 0) and DeleteFile(TempPath))) and
|
||||||
|
Result;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := DeleteFile(TempPath) and Result;
|
||||||
|
|
||||||
until (FindNext(TempRec) <> 0) or not(Result);
|
until (FindNext(TempRec) <> 0) or not(Result);
|
||||||
finally
|
finally
|
||||||
FindClose(TempRec);
|
FindClose(TempRec);
|
||||||
@ -1975,4 +1987,65 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function DeleteFileList(const aFileList : TStringList) : boolean;
|
||||||
|
var
|
||||||
|
i, TempCount : integer;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
try
|
||||||
|
if (aFileList <> nil) then
|
||||||
|
begin
|
||||||
|
i := 0;
|
||||||
|
TempCount := 0;
|
||||||
|
|
||||||
|
while (i < aFileList.Count) do
|
||||||
|
begin
|
||||||
|
if FileExists(aFileList[i]) and DeleteFile(aFileList[i]) then inc(TempCount);
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Result := (aFileList.Count = TempCount);
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
on e : exception do
|
||||||
|
if CustomExceptionHandler('DeleteFileList', e) then raise;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function MoveFileList(const aFileList : TStringList; const aSrcDirectory, aDstDirectory : string) : boolean;
|
||||||
|
var
|
||||||
|
i, TempCount : integer;
|
||||||
|
TempSrcPath, TempDstPath : string;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
|
||||||
|
try
|
||||||
|
if (aFileList <> nil) and
|
||||||
|
(length(aSrcDirectory) > 0) and
|
||||||
|
(length(aDstDirectory) > 0) and
|
||||||
|
DirectoryExists(aSrcDirectory) and
|
||||||
|
(DirectoryExists(aDstDirectory) or CreateDir(aDstDirectory)) then
|
||||||
|
begin
|
||||||
|
i := 0;
|
||||||
|
TempCount := 0;
|
||||||
|
|
||||||
|
while (i < aFileList.Count) do
|
||||||
|
begin
|
||||||
|
TempSrcPath := IncludeTrailingPathDelimiter(aSrcDirectory) + aFileList[i];
|
||||||
|
TempDstPath := IncludeTrailingPathDelimiter(aDstDirectory) + aFileList[i];
|
||||||
|
|
||||||
|
if FileExists(TempSrcPath) and RenameFile(TempSrcPath, TempDstPath) then inc(TempCount);
|
||||||
|
|
||||||
|
inc(i);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Result := (aFileList.Count = TempCount);
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
on e : exception do
|
||||||
|
if CustomExceptionHandler('MoveFileList', e) then raise;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -101,7 +101,7 @@ type
|
|||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -491,11 +491,11 @@ end;
|
|||||||
|
|
||||||
// TCustomRenderHandler
|
// TCustomRenderHandler
|
||||||
|
|
||||||
constructor TCustomRenderHandler.Create(const events: Pointer);
|
constructor TCustomRenderHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomRenderHandler.Destroy;
|
destructor TCustomRenderHandler.Destroy;
|
||||||
|
@ -90,7 +90,7 @@ type
|
|||||||
procedure InitializeVars;
|
procedure InitializeVars;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce; virtual;
|
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
|
||||||
procedure BeforeDestruction; override;
|
procedure BeforeDestruction; override;
|
||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
end;
|
end;
|
||||||
@ -457,14 +457,16 @@ end;
|
|||||||
|
|
||||||
// TCustomRequestHandler
|
// TCustomRequestHandler
|
||||||
|
|
||||||
constructor TCustomRequestHandler.Create(const events: Pointer);
|
constructor TCustomRequestHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
InitializeVars;
|
InitializeVars;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
FResourceRequestHandler := TCustomResourceRequestHandler.Create(FEvents);
|
|
||||||
|
if (events <> nil) and events.MustCreateResourceRequestHandler then
|
||||||
|
FResourceRequestHandler := TCustomResourceRequestHandler.Create(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomRequestHandler.BeforeDestruction;
|
procedure TCustomRequestHandler.BeforeDestruction;
|
||||||
|
@ -102,7 +102,7 @@ type
|
|||||||
procedure InitializeVars;
|
procedure InitializeVars;
|
||||||
|
|
||||||
public
|
public
|
||||||
constructor Create(const events: Pointer); reintroduce;
|
constructor Create(const events : IChromiumEvents); reintroduce;
|
||||||
procedure BeforeDestruction; override;
|
procedure BeforeDestruction; override;
|
||||||
procedure RemoveReferences; override;
|
procedure RemoveReferences; override;
|
||||||
end;
|
end;
|
||||||
@ -534,14 +534,16 @@ end;
|
|||||||
|
|
||||||
// TCustomResourceRequestHandler
|
// TCustomResourceRequestHandler
|
||||||
|
|
||||||
constructor TCustomResourceRequestHandler.Create(const events: Pointer);
|
constructor TCustomResourceRequestHandler.Create(const events : IChromiumEvents);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
|
|
||||||
InitializeVars;
|
InitializeVars;
|
||||||
|
|
||||||
FEvents := events;
|
FEvents := Pointer(events);
|
||||||
FCookieAccessFilter := TCustomCookieAccessFilter.Create(FEvents);
|
|
||||||
|
if (events <> nil) and events.MustCreateCookieAccessFilter then
|
||||||
|
FCookieAccessFilter := TCustomCookieAccessFilter.Create(events);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomResourceRequestHandler.BeforeDestruction;
|
procedure TCustomResourceRequestHandler.BeforeDestruction;
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
"UpdateLazPackages" : [
|
"UpdateLazPackages" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : false,
|
"ForceNotify" : false,
|
||||||
"InternalVersion" : 11,
|
"InternalVersion" : 12,
|
||||||
"Name" : "cef4delphi_lazarus.lpk",
|
"Name" : "cef4delphi_lazarus.lpk",
|
||||||
"Version" : "75.0.7.0"
|
"Version" : "75.0.8.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"UpdatePackageData" : {
|
"UpdatePackageData" : {
|
||||||
|
Reference in New Issue
Block a user