You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-11-23 21:34:53 +02:00
Update to CEF 76.1.10
- Added GlobalCEFApp.UseFakeUIForMediaStream - Added overloaded TCefBaseRefCountedOwn.SameAs
This commit is contained in:
@@ -152,7 +152,7 @@ uses
|
||||
// procedure with a PID_RENDERER parameter. The render process receives those messages in
|
||||
// the GlobalCEFApp.OnProcessMessageReceived event.
|
||||
|
||||
// To send messages from the render process you must use the browser.SendProcessMessage
|
||||
// To send messages from the render process you must use the frame.SendProcessMessage
|
||||
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
||||
// the TChromium.OnProcessMessageReceived event.
|
||||
|
||||
|
||||
@@ -154,11 +154,11 @@ uses
|
||||
// extension called "myextension.mouseover".
|
||||
|
||||
// The TTestExtensionHandler.Execute function is executed in the renderer process and it
|
||||
// can use the TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg) function
|
||||
// can use the TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg) function
|
||||
// to send a message with the results to the browser process.
|
||||
|
||||
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently
|
||||
// executing JavaScript, TCefv8ContextRef.Current.Browser.SendProcessMessage sends a message
|
||||
// executing JavaScript, TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage sends a message
|
||||
// to the right browser even if you have created several browsers in one app.
|
||||
|
||||
// That message is received in the TChromium.OnProcessMessageReceived event.
|
||||
|
||||
@@ -135,10 +135,10 @@ uses
|
||||
|
||||
// TTestExtension can send information back to the browser with a process message.
|
||||
// The TTestExtension.mouseover function do this by calling
|
||||
// TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg);
|
||||
// TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg);
|
||||
|
||||
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently executing JS,
|
||||
// TCefv8ContextRef.Current.Browser.SendProcessMessage should send a message to the right browser even
|
||||
// TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage should send a message to the right browser even
|
||||
// if you have created several browsers in one app.
|
||||
|
||||
// That message is received in the TChromium.OnProcessMessageReceived event.
|
||||
|
||||
@@ -289,6 +289,7 @@ begin
|
||||
GlobalCEFApp.DisableFeatures := 'NetworkService,OutOfBlinkCors';
|
||||
GlobalCEFApp.LogFile := 'debug.log';
|
||||
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
|
||||
//GlobalCEFApp.RemoteDebuggingPort := 19999;
|
||||
end;
|
||||
|
||||
procedure TMiniBrowserFrm.BackBtnClick(Sender: TObject);
|
||||
|
||||
@@ -73,6 +73,7 @@ object Form1: TForm1
|
||||
OnAfterCreated = Chromium1AfterCreated
|
||||
OnBeforeClose = Chromium1BeforeClose
|
||||
OnClose = Chromium1Close
|
||||
OnOpenUrlFromTab = Chromium1OpenUrlFromTab
|
||||
Left = 56
|
||||
Top = 152
|
||||
end
|
||||
|
||||
@@ -79,6 +79,11 @@ type
|
||||
var settings: TCefBrowserSettings;
|
||||
var extra_info: ICefDictionaryValue; var noJavascriptAccess,
|
||||
Result: Boolean);
|
||||
procedure Chromium1OpenUrlFromTab(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const targetUrl: ustring;
|
||||
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean;
|
||||
out Result: Boolean);
|
||||
protected
|
||||
// Variables to control when can we destroy the form safely
|
||||
FCanClose : boolean; // Set to True in TChromium.OnBeforeClose
|
||||
@@ -189,6 +194,15 @@ begin
|
||||
aAction := cbaDelay;
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1OpenUrlFromTab(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition;
|
||||
userGesture: Boolean; out Result: Boolean);
|
||||
begin
|
||||
// For simplicity, this demo blocks all popup windows and new tabs
|
||||
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||
end;
|
||||
|
||||
procedure TForm1.BrowserCreatedMsg(var aMessage : TMessage);
|
||||
begin
|
||||
Caption := 'Simple Browser 2';
|
||||
|
||||
@@ -422,7 +422,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.chrmosrPaint(Sender : TObject;
|
||||
procedure TForm1.chrmosrPaint( Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
kind : TCefPaintElementType;
|
||||
dirtyRectsCount : NativeUInt;
|
||||
|
||||
@@ -72,6 +72,7 @@ type
|
||||
procedure CEFUrlRequestClientComponent1DownloadProgress(Sender: TObject; const request: ICefUrlRequest; current, total: Int64);
|
||||
procedure CEFUrlRequestClientComponent1RequestComplete(Sender: TObject; const request: ICefUrlRequest);
|
||||
procedure CEFUrlRequestClientComponent1CreateURLRequest(Sender: TObject);
|
||||
|
||||
private
|
||||
FStream : TMemoryStream;
|
||||
FCanClose : boolean;
|
||||
|
||||
@@ -144,7 +144,7 @@ uses
|
||||
// procedure with a PID_RENDERER parameter. The render process receives those messages in
|
||||
// the GlobalCEFApp.OnProcessMessageReceived event.
|
||||
|
||||
// To send messages from the render process you must use the browser.SendProcessMessage
|
||||
// To send messages from the render process you must use the frame.SendProcessMessage
|
||||
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
||||
// the TChromium.OnProcessMessageReceived event.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// ************************************************************************
|
||||
// ************************************************************************
|
||||
// ***************************** CEF4Delphi *******************************
|
||||
// ************************************************************************
|
||||
//
|
||||
@@ -159,11 +159,11 @@ uses
|
||||
// extension called "myextension.mouseover".
|
||||
|
||||
// The TTestExtensionHandler.Execute function is executed in the renderer process and it
|
||||
// can use the TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg) function
|
||||
// can use the TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg) function
|
||||
// to send a message with the results to the browser process.
|
||||
|
||||
// TCefv8ContextRef.Current returns the v8 context for the frame that is currently
|
||||
// executing JavaScript, TCefv8ContextRef.Current.Browser.SendProcessMessage sends a message
|
||||
// executing JavaScript, TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage sends a message
|
||||
// to the right browser even if you have created several browsers in one app.
|
||||
|
||||
// That message is received in the TChromium.OnProcessMessageReceived event.
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="uSimpleBrowser2"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="11"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="54">
|
||||
<Units Count="55">
|
||||
<Unit0>
|
||||
<Filename Value="SimpleBrowser2.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<CursorPos X="34" Y="26"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
@@ -35,8 +35,8 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="uSimpleLazarusBrowser"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="98"/>
|
||||
<CursorPos X="69" Y="125"/>
|
||||
<TopLine Value="158"/>
|
||||
<CursorPos X="7" Y="183"/>
|
||||
<UsageCount Value="43"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@@ -416,8 +416,15 @@
|
||||
<CursorPos X="3" Y="133"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit53>
|
||||
<Unit54>
|
||||
<Filename Value="..\..\..\source\uCEFApplication.pas"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="37"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit54>
|
||||
</Units>
|
||||
<JumpHistory Count="3" HistoryIndex="2">
|
||||
<JumpHistory Count="7" HistoryIndex="6">
|
||||
<Position1>
|
||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||
<Caret Line="67" Column="29" TopLine="57"/>
|
||||
@@ -430,6 +437,22 @@
|
||||
<Filename Value="SimpleBrowser2.lpr"/>
|
||||
<Caret Line="26" Column="34"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||
<Caret Line="118" Column="47" TopLine="56"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||
<Caret Line="179" Column="36" TopLine="176"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||
<Caret Line="181" TopLine="19"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="usimplelazarusbrowser.pas"/>
|
||||
<Caret Line="75" Column="83" TopLine="43"/>
|
||||
</Position7>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
object Form1: TForm1
|
||||
Left = 201
|
||||
Left = 407
|
||||
Height = 574
|
||||
Top = 182
|
||||
Top = 183
|
||||
Width = 878
|
||||
Caption = 'Initializing browser. Please wait...'
|
||||
ClientHeight = 574
|
||||
@@ -62,6 +62,7 @@ object Form1: TForm1
|
||||
OnAfterCreated = Chromium1AfterCreated
|
||||
OnBeforeClose = Chromium1BeforeClose
|
||||
OnClose = Chromium1Close
|
||||
OnOpenUrlFromTab = Chromium1OpenUrlFromTab
|
||||
left = 40
|
||||
top = 136
|
||||
end
|
||||
|
||||
@@ -67,6 +67,10 @@ type
|
||||
var noJavascriptAccess: Boolean; var Result: Boolean);
|
||||
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
|
||||
var aAction : TCefCloseBrowserAction);
|
||||
procedure Chromium1OpenUrlFromTab(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame;
|
||||
const targetUrl: ustring; targetDisposition: TCefWindowOpenDisposition;
|
||||
userGesture: Boolean; out Result: Boolean);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
@@ -167,6 +171,15 @@ procedure TForm1.Chromium1BeforePopup(Sender: TObject;
|
||||
begin
|
||||
// For simplicity, this demo blocks all popup windows and new tabs
|
||||
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1OpenUrlFromTab(Sender: TObject;
|
||||
const browser: ICefBrowser; const frame: ICefFrame; const targetUrl: ustring;
|
||||
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean; out
|
||||
Result: Boolean);
|
||||
begin
|
||||
// For simplicity, this demo blocks all popup windows and new tabs
|
||||
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB, WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium1Close(Sender: TObject; const browser: ICefBrowser; var aAction : TCefCloseBrowserAction);
|
||||
|
||||
Reference in New Issue
Block a user