mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-16 00:05:55 +01:00
Update to CEF 3.3239.1716.g735b746
- Added a HTTP, SOCKS4 and SOCKS5 combobox to the proxy preferences in the MiniBrowser. - Added more comments to DOMVisitor.
This commit is contained in:
parent
7f559b1bcd
commit
a334640b24
@ -113,6 +113,22 @@ uses
|
|||||||
uCEFProcessMessage, uCEFMiscFunctions, uCEFSchemeRegistrar, uCEFRenderProcessHandler,
|
uCEFProcessMessage, uCEFMiscFunctions, uCEFSchemeRegistrar, uCEFRenderProcessHandler,
|
||||||
uCEFv8Handler, uCEFDomVisitor, uCEFDomNode, uCEFTask;
|
uCEFv8Handler, uCEFDomVisitor, uCEFDomNode, uCEFTask;
|
||||||
|
|
||||||
|
// This demo sends messages from the browser process to the render process,
|
||||||
|
// and from the render process to the browser process.
|
||||||
|
|
||||||
|
// To send a message from the browser process you must use the TChromium.SendProcessMessage
|
||||||
|
// 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
|
||||||
|
// procedure with a PID_BROWSER parameter. The browser process receives those messages in
|
||||||
|
// the TChromium.OnProcessMessageReceived event.
|
||||||
|
|
||||||
|
// message.name is used to identify different messages sent with SendProcessMessage.
|
||||||
|
|
||||||
|
// The OnProcessMessageReceived event can recognize any number of messages identifying them
|
||||||
|
// by message.name
|
||||||
|
|
||||||
procedure SimpleDOMIteration(const aDocument: ICefDomDocument);
|
procedure SimpleDOMIteration(const aDocument: ICefDomDocument);
|
||||||
var
|
var
|
||||||
TempHead, TempChild : ICefDomNode;
|
TempHead, TempChild : ICefDomNode;
|
||||||
|
@ -165,7 +165,8 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
'chrome://shorthang'
|
'chrome://shorthang'
|
||||||
'chrome://gpuclean'
|
'chrome://gpuclean'
|
||||||
'chrome://gpucrash'
|
'chrome://gpucrash'
|
||||||
'chrome://gpuhang')
|
'chrome://gpuhang'
|
||||||
|
'chrome://extensions-support')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ConfigPnl: TPanel
|
object ConfigPnl: TPanel
|
||||||
@ -232,7 +233,10 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
|||||||
Height = 19
|
Height = 19
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
Width = 50
|
Width = 100
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 500
|
||||||
end>
|
end>
|
||||||
end
|
end
|
||||||
object Chromium1: TChromium
|
object Chromium1: TChromium
|
||||||
|
@ -516,8 +516,19 @@ procedure TMiniBrowserFrm.Chromium1LoadingStateChange(Sender: TObject;
|
|||||||
begin
|
begin
|
||||||
BackBtn.Enabled := canGoBack;
|
BackBtn.Enabled := canGoBack;
|
||||||
ForwardBtn.Enabled := canGoForward;
|
ForwardBtn.Enabled := canGoForward;
|
||||||
ReloadBtn.Enabled := not(isLoading);
|
|
||||||
StopBtn.Enabled := isLoading;
|
if isLoading then
|
||||||
|
begin
|
||||||
|
StatusBar1.Panels[0].Text := 'Loading...';
|
||||||
|
ReloadBtn.Enabled := False;
|
||||||
|
StopBtn.Enabled := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
StatusBar1.Panels[0].Text := 'Finished';
|
||||||
|
ReloadBtn.Enabled := True;
|
||||||
|
StopBtn.Enabled := False;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.Chromium1PdfPrintFinished(Sender: TObject; aResultOK: Boolean);
|
procedure TMiniBrowserFrm.Chromium1PdfPrintFinished(Sender: TObject; aResultOK: Boolean);
|
||||||
@ -578,7 +589,7 @@ end;
|
|||||||
|
|
||||||
procedure TMiniBrowserFrm.ShowStatusText(const aText : string);
|
procedure TMiniBrowserFrm.ShowStatusText(const aText : string);
|
||||||
begin
|
begin
|
||||||
StatusBar1.Panels[0].Text := aText;
|
StatusBar1.Panels[1].Text := aText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.StopBtnClick(Sender: TObject);
|
procedure TMiniBrowserFrm.StopBtnClick(Sender: TObject);
|
||||||
@ -677,9 +688,34 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMiniBrowserFrm.Preferences1Click(Sender: TObject);
|
procedure TMiniBrowserFrm.Preferences1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
TempScheme, TempServer : string;
|
||||||
|
i : integer;
|
||||||
begin
|
begin
|
||||||
|
i := pos('://', Chromium1.ProxyServer);
|
||||||
|
|
||||||
|
if (i <= 0) then
|
||||||
|
begin
|
||||||
|
PreferencesFrm.ProxySchemeCb.ItemIndex := 0;
|
||||||
|
TempServer := Chromium1.ProxyServer;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
TempScheme := copy(Chromium1.ProxyServer, 1, pred(i));
|
||||||
|
TempServer := copy(Chromium1.ProxyServer, i + 3, length(Chromium1.ProxyServer));
|
||||||
|
|
||||||
|
if (CompareText(TempScheme, 'socks') = 0) or
|
||||||
|
(CompareText(TempScheme, 'socks5') = 0) then
|
||||||
|
PreferencesFrm.ProxySchemeCb.ItemIndex := 2
|
||||||
|
else
|
||||||
|
if (CompareText(TempScheme, 'socks4') = 0) then
|
||||||
|
PreferencesFrm.ProxySchemeCb.ItemIndex := 1
|
||||||
|
else
|
||||||
|
PreferencesFrm.ProxySchemeCb.ItemIndex := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
PreferencesFrm.ProxyTypeCbx.ItemIndex := Chromium1.ProxyType;
|
PreferencesFrm.ProxyTypeCbx.ItemIndex := Chromium1.ProxyType;
|
||||||
PreferencesFrm.ProxyServerEdt.Text := Chromium1.ProxyServer;
|
PreferencesFrm.ProxyServerEdt.Text := TempServer;
|
||||||
PreferencesFrm.ProxyPortEdt.Text := inttostr(Chromium1.ProxyPort);
|
PreferencesFrm.ProxyPortEdt.Text := inttostr(Chromium1.ProxyPort);
|
||||||
PreferencesFrm.ProxyUsernameEdt.Text := Chromium1.ProxyUsername;
|
PreferencesFrm.ProxyUsernameEdt.Text := Chromium1.ProxyUsername;
|
||||||
PreferencesFrm.ProxyPasswordEdt.Text := Chromium1.ProxyPassword;
|
PreferencesFrm.ProxyPasswordEdt.Text := Chromium1.ProxyPassword;
|
||||||
@ -691,7 +727,6 @@ begin
|
|||||||
if (PreferencesFrm.ShowModal = mrOk) then
|
if (PreferencesFrm.ShowModal = mrOk) then
|
||||||
begin
|
begin
|
||||||
Chromium1.ProxyType := PreferencesFrm.ProxyTypeCbx.ItemIndex;
|
Chromium1.ProxyType := PreferencesFrm.ProxyTypeCbx.ItemIndex;
|
||||||
Chromium1.ProxyServer := PreferencesFrm.ProxyServerEdt.Text;
|
|
||||||
Chromium1.ProxyPort := strtoint(PreferencesFrm.ProxyPortEdt.Text);
|
Chromium1.ProxyPort := strtoint(PreferencesFrm.ProxyPortEdt.Text);
|
||||||
Chromium1.ProxyUsername := PreferencesFrm.ProxyUsernameEdt.Text;
|
Chromium1.ProxyUsername := PreferencesFrm.ProxyUsernameEdt.Text;
|
||||||
Chromium1.ProxyPassword := PreferencesFrm.ProxyPasswordEdt.Text;
|
Chromium1.ProxyPassword := PreferencesFrm.ProxyPasswordEdt.Text;
|
||||||
@ -700,6 +735,12 @@ begin
|
|||||||
Chromium1.CustomHeaderName := PreferencesFrm.HeaderNameEdt.Text;
|
Chromium1.CustomHeaderName := PreferencesFrm.HeaderNameEdt.Text;
|
||||||
Chromium1.CustomHeaderValue := PreferencesFrm.HeaderValueEdt.Text;
|
Chromium1.CustomHeaderValue := PreferencesFrm.HeaderValueEdt.Text;
|
||||||
|
|
||||||
|
case PreferencesFrm.ProxySchemeCb.ItemIndex of
|
||||||
|
1 : Chromium1.ProxyServer := 'socks4://' + PreferencesFrm.ProxyServerEdt.Text;
|
||||||
|
2 : Chromium1.ProxyServer := 'socks5://' + PreferencesFrm.ProxyServerEdt.Text;
|
||||||
|
else Chromium1.ProxyServer := PreferencesFrm.ProxyServerEdt.Text;
|
||||||
|
end;
|
||||||
|
|
||||||
Chromium1.UpdatePreferences;
|
Chromium1.UpdatePreferences;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -108,11 +108,11 @@ object PreferencesFrm: TPreferencesFrm
|
|||||||
'PAC script')
|
'PAC script')
|
||||||
end
|
end
|
||||||
object ProxyServerEdt: TEdit
|
object ProxyServerEdt: TEdit
|
||||||
Left = 108
|
Left = 176
|
||||||
Top = 53
|
Top = 53
|
||||||
Width = 292
|
Width = 224
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 1
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object ProxyPortEdt: TEdit
|
object ProxyPortEdt: TEdit
|
||||||
Left = 108
|
Left = 108
|
||||||
@ -121,7 +121,7 @@ object PreferencesFrm: TPreferencesFrm
|
|||||||
Height = 21
|
Height = 21
|
||||||
MaxLength = 5
|
MaxLength = 5
|
||||||
NumbersOnly = True
|
NumbersOnly = True
|
||||||
TabOrder = 2
|
TabOrder = 3
|
||||||
Text = '80'
|
Text = '80'
|
||||||
end
|
end
|
||||||
object ProxyUsernameEdt: TEdit
|
object ProxyUsernameEdt: TEdit
|
||||||
@ -129,7 +129,7 @@ object PreferencesFrm: TPreferencesFrm
|
|||||||
Top = 107
|
Top = 107
|
||||||
Width = 292
|
Width = 292
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 3
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object ProxyPasswordEdt: TEdit
|
object ProxyPasswordEdt: TEdit
|
||||||
Left = 108
|
Left = 108
|
||||||
@ -137,21 +137,35 @@ object PreferencesFrm: TPreferencesFrm
|
|||||||
Width = 292
|
Width = 292
|
||||||
Height = 21
|
Height = 21
|
||||||
PasswordChar = '*'
|
PasswordChar = '*'
|
||||||
TabOrder = 4
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object ProxyScriptURLEdt: TEdit
|
object ProxyScriptURLEdt: TEdit
|
||||||
Left = 108
|
Left = 108
|
||||||
Top = 161
|
Top = 161
|
||||||
Width = 292
|
Width = 292
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 5
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object ProxyByPassListEdt: TEdit
|
object ProxyByPassListEdt: TEdit
|
||||||
Left = 108
|
Left = 108
|
||||||
Top = 188
|
Top = 188
|
||||||
Width = 292
|
Width = 292
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 6
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object ProxySchemeCb: TComboBox
|
||||||
|
Left = 108
|
||||||
|
Top = 53
|
||||||
|
Width = 62
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemIndex = 0
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'HTTP'
|
||||||
|
Items.Strings = (
|
||||||
|
'HTTP'
|
||||||
|
'SOCKS4'
|
||||||
|
'SOCKS5')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object GroupBox2: TGroupBox
|
object GroupBox2: TGroupBox
|
||||||
|
@ -74,6 +74,7 @@ type
|
|||||||
HeaderNameLbl: TLabel;
|
HeaderNameLbl: TLabel;
|
||||||
HeaderValueEdt: TEdit;
|
HeaderValueEdt: TEdit;
|
||||||
HeaderValueLbl: TLabel;
|
HeaderValueLbl: TLabel;
|
||||||
|
ProxySchemeCb: TComboBox;
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
|
@ -57,7 +57,7 @@ uses
|
|||||||
const
|
const
|
||||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||||
CEF_SUPPORTED_VERSION_MINOR = 3239;
|
CEF_SUPPORTED_VERSION_MINOR = 3239;
|
||||||
CEF_SUPPORTED_VERSION_RELEASE = 1710;
|
CEF_SUPPORTED_VERSION_RELEASE = 1716;
|
||||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||||
|
|
||||||
CEF_CHROMEELF_VERSION_MAJOR = 63;
|
CEF_CHROMEELF_VERSION_MAJOR = 63;
|
||||||
|
Loading…
Reference in New Issue
Block a user