1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Update to CEF 75.0.7

This commit is contained in:
Salvador Díaz Fau
2019-06-16 10:31:13 +02:00
parent 22f4a1d6d8
commit 52fca97884
186 changed files with 4104 additions and 1826 deletions

View File

@@ -8,8 +8,7 @@
<Unit0>
<Filename Value="JSExtensionWithFunction.lpr"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<TopLine Value="41"/>
<TopLine Value="45"/>
<CursorPos X="17" Y="59"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
@@ -22,8 +21,8 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="1"/>
<TopLine Value="107"/>
<CursorPos X="11" Y="125"/>
<TopLine Value="63"/>
<CursorPos X="15" Y="78"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@@ -32,8 +31,12 @@
<Unit2>
<Filename Value="uMyV8Handler.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="2"/>
<TopLine Value="50"/>
<CursorPos X="74" Y="69"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit2>
<Unit3>
@@ -53,7 +56,7 @@
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit4>
</Units>
<JumpHistory Count="3" HistoryIndex="2">
<JumpHistory Count="10" HistoryIndex="9">
<Position1>
<Filename Value="uJSExtensionWithFunction.pas"/>
</Position1>
@@ -65,6 +68,34 @@
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="151" Column="39" TopLine="133"/>
</Position3>
<Position4>
<Filename Value="JSExtensionWithFunction.lpr"/>
<Caret Line="59" Column="17" TopLine="45"/>
</Position4>
<Position5>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="104" Column="11" TopLine="94"/>
</Position5>
<Position6>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="77" Column="7" TopLine="68"/>
</Position6>
<Position7>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="179" Column="39" TopLine="172"/>
</Position7>
<Position8>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="79" Column="59" TopLine="57"/>
</Position8>
<Position9>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="198" Column="60" TopLine="188"/>
</Position9>
<Position10>
<Filename Value="uJSExtensionWithFunction.pas"/>
<Caret Line="78" Column="15" TopLine="63"/>
</Position10>
</JumpHistory>
<RunParams>
<FormatVersion Value="2"/>

View File

@@ -17,18 +17,18 @@ object JSExtensionWithFunctionFrm: TJSExtensionWithFunctionFrm
LCLVersion = '2.0.2.0'
object NavControlPnl: TPanel
Left = 0
Height = 30
Height = 21
Top = 0
Width = 978
Align = alTop
BevelOuter = bvNone
ClientHeight = 30
ClientHeight = 21
ClientWidth = 978
Enabled = False
TabOrder = 0
object Edit1: TEdit
Left = 0
Height = 30
Height = 21
Top = 0
Width = 947
Align = alClient
@@ -37,7 +37,7 @@ object JSExtensionWithFunctionFrm: TJSExtensionWithFunctionFrm
end
object GoBtn: TButton
Left = 947
Height = 30
Height = 21
Top = 0
Width = 31
Align = alRight
@@ -48,8 +48,8 @@ object JSExtensionWithFunctionFrm: TJSExtensionWithFunctionFrm
end
object CEFWindowParent1: TCEFWindowParent
Left = 0
Height = 536
Top = 30
Height = 545
Top = 21
Width = 978
Align = alClient
TabOrder = 1

View File

@@ -73,9 +73,10 @@ type
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean;
const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo;
var client: ICefClient; var settings: TCefBrowserSettings;
var extra_info: ICefDictionaryValue;
var noJavascriptAccess: Boolean; var Result: Boolean);
procedure Chromium1ProcessMessageReceived(Sender: TObject;
const browser: ICefBrowser; sourceProcess: TCefProcessId;
const browser: ICefBrowser; const frame: ICefFrame; sourceProcess: TCefProcessId;
const message: ICefProcessMessage; out Result: Boolean);
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -149,6 +150,7 @@ procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitializedEvent;
GlobalCEFApp.DisableFeatures := 'NetworkService';
end;
procedure TJSExtensionWithFunctionFrm.GoBtnClick(Sender: TObject);
@@ -173,7 +175,9 @@ procedure TJSExtensionWithFunctionFrm.Chromium1BeforePopup(Sender: TObject;
targetFrameName: ustring; targetDisposition: TCefWindowOpenDisposition;
userGesture: Boolean; const popupFeatures: TCefPopupFeatures;
var windowInfo: TCefWindowInfo; var client: ICefClient;
var settings: TCefBrowserSettings; var noJavascriptAccess: Boolean;
var settings: TCefBrowserSettings;
var extra_info: ICefDictionaryValue;
var noJavascriptAccess: Boolean;
var Result: Boolean);
begin
// For simplicity, this demo blocks all popup windows and new tabs
@@ -188,7 +192,7 @@ begin
end;
procedure TJSExtensionWithFunctionFrm.Chromium1ProcessMessageReceived(
Sender: TObject; const browser: ICefBrowser;
Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame;
sourceProcess: TCefProcessId; const message: ICefProcessMessage;
out Result: Boolean);
begin

View File

@@ -69,7 +69,7 @@ begin
begin
msg := TCefProcessMessageRef.New(TEST_MESSAGE_NAME);
msg.ArgumentList.SetString(0, 'Message received!');
TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg);
TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg);
retval := TCefv8ValueRef.NewString('My Value!');
Result := True;