mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-15 07:45:56 +01:00
Update to CEF 3.3497.1827.ga4f7e36
- Added option to load PDF files in the MiniBrowser demo. - Now the ResponseFilterBrowser replaces the logo with an external PNG file.
This commit is contained in:
parent
e5bb0cd561
commit
7e270aa8ca
BIN
bin/jupiter.png
Normal file
BIN
bin/jupiter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 438 KiB |
@ -49,6 +49,7 @@ uses
|
||||
Windows,
|
||||
{$ENDIF }
|
||||
uCEFApplication,
|
||||
uCEFTypes,
|
||||
uMiniBrowser in 'uMiniBrowser.pas' {MiniBrowserFrm},
|
||||
uPreferences in 'uPreferences.pas' {PreferencesFrm},
|
||||
uSimpleTextViewer in 'uSimpleTextViewer.pas' {SimpleTextViewerFrm};
|
||||
@ -72,6 +73,5 @@ begin
|
||||
Application.Run;
|
||||
end;
|
||||
|
||||
GlobalCEFApp.Free;
|
||||
GlobalCEFApp := nil;
|
||||
DestroyGlobalCEFApp;
|
||||
end.
|
||||
|
@ -144,6 +144,7 @@ object MiniBrowserFrm: TMiniBrowserFrm
|
||||
'https://www.w3schools.com/'
|
||||
'http://webglsamples.org/'
|
||||
'https://get.webgl.org/'
|
||||
'https://www.briskbard.com'
|
||||
'https://www.youtube.com'
|
||||
'https://html5demos.com/drag/'
|
||||
|
||||
|
@ -892,7 +892,7 @@ begin
|
||||
|
||||
try
|
||||
try
|
||||
OpenDialog1.Filter := 'HTML files (*.html)|*.HTML;*.HTM';
|
||||
OpenDialog1.Filter := 'HTML files (*.html)|*.HTML;*.HTM|PDF files (*.pdf)|*.PDF';
|
||||
|
||||
if OpenDialog1.Execute then
|
||||
begin
|
||||
@ -900,7 +900,11 @@ begin
|
||||
TempFile := TMemoryStream.Create;
|
||||
TempFile.LoadFromFile(OpenDialog1.FileName);
|
||||
|
||||
TempDATA := 'data:text/html;charset=utf-8;base64,' + CefBase64Encode(TempFile.Memory, TempFile.Size);
|
||||
if (OpenDialog1.FilterIndex = 0) then
|
||||
TempDATA := 'data:text/html;charset=utf-8;base64,' + CefBase64Encode(TempFile.Memory, TempFile.Size)
|
||||
else
|
||||
TempDATA := 'data:application/pdf;charset=utf-8;base64,' + CefBase64Encode(TempFile.Memory, TempFile.Size);
|
||||
|
||||
Chromium1.LoadURL(TempDATA);
|
||||
end;
|
||||
except
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -69,7 +69,6 @@ type
|
||||
Panel2: TPanel;
|
||||
Memo1: TMemo;
|
||||
StatusBar1: TStatusBar;
|
||||
Image1: TImage;
|
||||
CopyScriptBtn: TRadioButton;
|
||||
ReplaceLogoBtn: TRadioButton;
|
||||
|
||||
@ -459,17 +458,28 @@ procedure TResponseFilterBrowserFrm.Chromium1LoadStart( Sender : TO
|
||||
const browser : ICefBrowser;
|
||||
const frame : ICefFrame;
|
||||
transitionType : Cardinal);
|
||||
const
|
||||
IMAGE_FILENAME = 'jupiter.png';
|
||||
var
|
||||
TempPath : string;
|
||||
begin
|
||||
if frame.IsMain then
|
||||
try
|
||||
FStreamCS.Acquire;
|
||||
FStream.Clear;
|
||||
try
|
||||
FStreamCS.Acquire;
|
||||
FStream.Clear;
|
||||
|
||||
if ReplaceLogoBtn.Checked then
|
||||
begin
|
||||
Image1.Picture.SavetoStream(FStream);
|
||||
FStream.Seek(0, soBeginning);
|
||||
end;
|
||||
TempPath := IncludeTrailingPathDelimiter(ExtractFileDir(GetModuleName(HInstance))) + IMAGE_FILENAME;
|
||||
|
||||
if ReplaceLogoBtn.Checked and FileExists(TempPath) then
|
||||
begin
|
||||
FStream.LoadFromFile(TempPath);
|
||||
FStream.Seek(0, soBeginning);
|
||||
end;
|
||||
except
|
||||
on e : exception do
|
||||
if CustomExceptionHandler('TResponseFilterBrowserFrm.Chromium1LoadStart', e) then raise;
|
||||
end;
|
||||
finally
|
||||
FStreamCS.Release;
|
||||
end;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="18">
|
||||
<Units Count="19">
|
||||
<Unit0>
|
||||
<Filename Value="SimpleLazOSRBrowser.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -20,7 +20,6 @@
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="186"/>
|
||||
<CursorPos X="15" Y="191"/>
|
||||
@ -107,10 +106,11 @@
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="..\..\source\uCEFMiscFunctions.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="1505"/>
|
||||
<CursorPos X="51" Y="1534"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="1220"/>
|
||||
<CursorPos Y="1231"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="..\..\source\uCEFConstants.pas"/>
|
||||
@ -156,8 +156,17 @@
|
||||
<CursorPos X="15" Y="580"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="839"/>
|
||||
<CursorPos X="58" Y="846"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit18>
|
||||
</Units>
|
||||
<JumpHistory Count="26" HistoryIndex="25">
|
||||
<JumpHistory Count="28" HistoryIndex="27">
|
||||
<Position1>
|
||||
<Filename Value="..\..\source\uBufferPanel.pas"/>
|
||||
<Caret Line="163" Column="28" TopLine="43"/>
|
||||
@ -262,6 +271,14 @@
|
||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||
<Caret Line="201" TopLine="186"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||
<Caret Line="191" Column="15" TopLine="186"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\..\source\uCEFMiscFunctions.pas"/>
|
||||
<Caret Line="1231" TopLine="1220"/>
|
||||
</Position28>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
@ -20,8 +20,8 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="uSimpleLazarusBrowser"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="73"/>
|
||||
<CursorPos X="53" Y="69"/>
|
||||
<UsageCount Value="38"/>
|
||||
@ -138,14 +138,15 @@
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="..\..\source\uCEFApplication.pas"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="43"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="2169"/>
|
||||
<CursorPos Y="44"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Bookmarks Count="2">
|
||||
<Item0 X="60" Y="956" ID="1"/>
|
||||
<Item1 X="9" Y="894" ID="3"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit17>
|
||||
<Unit18>
|
||||
<Filename Value="C:\lazarus\lcl\forms.pp"/>
|
||||
@ -264,9 +265,6 @@
|
||||
<UsageCount Value="10"/>
|
||||
</Unit33>
|
||||
</Units>
|
||||
<General>
|
||||
<ActiveWindowIndexAtStart Value="-1"/>
|
||||
</General>
|
||||
<JumpHistory HistoryIndex="-1"/>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
@ -60,14 +60,14 @@ uses
|
||||
|
||||
const
|
||||
CEF_SUPPORTED_VERSION_MAJOR = 3;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3440;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1806;
|
||||
CEF_SUPPORTED_VERSION_MINOR = 3497;
|
||||
CEF_SUPPORTED_VERSION_RELEASE = 1821;
|
||||
CEF_SUPPORTED_VERSION_BUILD = 0;
|
||||
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 68;
|
||||
CEF_CHROMEELF_VERSION_MAJOR = 69;
|
||||
CEF_CHROMEELF_VERSION_MINOR = 0;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 3440;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 106;
|
||||
CEF_CHROMEELF_VERSION_RELEASE = 3497;
|
||||
CEF_CHROMEELF_VERSION_BUILD = 81;
|
||||
|
||||
LIBCEF_DLL = 'libcef.dll';
|
||||
CHROMEELF_DLL = 'chrome_elf.dll';
|
||||
|
Loading…
Reference in New Issue
Block a user