Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

CEF ChromeRuntime

User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF ChromeRuntime

Post by salvadordf »

I couldn't reproduce that issue with the TinyBrowser2 demo.

However, if a download doesn't trigger those events it might be due to a missing feature in the Chrome Runtime mode.

Edit : I added the TChromium.OnBeforeDownload event to that demo to test other normal downloads and they work.
mike2k
Posts: 22
Joined: Wed Jan 24, 2018 2:56 pm

Re: CEF ChromeRuntime

Post by mike2k »

salvadordf wrote: Sun Sep 19, 2021 10:59 am I couldn't reproduce that issue with the TinyBrowser2 demo.
If you press ALT key and click on a link (doesn't need to be pdf, exe) it will download the html file if it'a page.
Just tested it with TinyBrowser2 too and it downloads the html page.

Same when running

Code: Select all

cefclient.exe --use-views --enable-chrome-runtime
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF ChromeRuntime

Post by salvadordf »

I tested again in a real PC (outside my virtual machine) and now I can reproduce it.
The callbacks in the download handler are never executed. cefclient has the same issue.

I checked again the CEF issue about the Chrome runtime :
https://bitbucket.org/chromiumembedded/cef/issues/2969/support-chrome-windows-with-cef-callbacks

The Download tests are included in the list of "not yet supported" features.
mike2k
Posts: 22
Joined: Wed Jan 24, 2018 2:56 pm

Re: CEF ChromeRuntime

Post by mike2k »

I've added an issue report for ALT+click, as adviced by magreenblatt:
https://bitbucket.org/chromiumembedded/cef/issues/3183/windows-cef-chrome-runtime-prevent-alt

I use SetWindowsHookEx with mouse hook as workaround :)
mike2k
Posts: 22
Joined: Wed Jan 24, 2018 2:56 pm

Re: CEF ChromeRuntime

Post by mike2k »

I'm trying to change the Tinybrowser application ICON at runtime, because in Chrome Rutime mode it's an exclamation point.

I've tried to save a PNG to stream and after that use CEFWindowComponent.WindowAppIcon.AddPng but just gives access violations.

Code: Select all

 stream:=TMemoryStream.Create;
 png.SaveToStream(stream);
 stream.Position:=0;
 FCEFWindowComponent.WindowAppIcon.AddPng(1,@stream,sizeof(stream))
Any idea what's wrong?
mike2k
Posts: 22
Joined: Wed Jan 24, 2018 2:56 pm

Re: CEF ChromeRuntime

Post by mike2k »

Hi again,

I'm trying to prevent multiple launch on Tinybrowser with chrome runtime, I've tried to use Mutex but don't know where to put it, as it blocks the multi process of chromium.
Any hint how to allow only one instance of the main application?

Thanks!
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF ChromeRuntime

Post by salvadordf »

mike2k wrote: Sun Sep 19, 2021 7:39 pm I'm trying to change the Tinybrowser application ICON at runtime, because in Chrome Rutime mode it's an exclamation point.

I've tried to save a PNG to stream and after that use CEFWindowComponent.WindowAppIcon.AddPng but just gives access violations.

Code: Select all

 stream:=TMemoryStream.Create;
 png.SaveToStream(stream);
 stream.Position:=0;
 FCEFWindowComponent.WindowAppIcon.AddPng(1,@stream,sizeof(stream))
Any idea what's wrong?
There are many untested features in this new mode and I probably did something wrong in that function, sorry. I just uploaded an alternative way to set that icon in TinyBrowser.
mike2k wrote: Sun Sep 26, 2021 8:06 am I'm trying to prevent multiple launch on Tinybrowser with chrome runtime, I've tried to use Mutex but don't know where to put it, as it blocks the multi process of chromium.
Any hint how to allow only one instance of the main application?
Check the command line arguments in DPR file before the GlobalCEFApp initialization. Search for some "--type=" parameter and try to use a mutex when "--type=" is not present.
mike2k
Posts: 22
Joined: Wed Jan 24, 2018 2:56 pm

Re: CEF ChromeRuntime

Post by mike2k »

Thanks.

Found other workarounds, but yours are cleaner :)
mike2k
Posts: 22
Joined: Wed Jan 24, 2018 2:56 pm

Re: CEF ChromeRuntime

Post by mike2k »

salvadordf wrote: Sun Sep 19, 2021 1:28 pm I tested again in a real PC (outside my virtual machine) and now I can reproduce it.
The callbacks in the download handler are never executed. cefclient has the same issue.
Were this tests only for ALT+click ? or the download events are not triggered for normal downloads too?
Because for me on CEF 92 they don't even trigger.

Thanks.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF ChromeRuntime

Post by salvadordf »

I was testing the latest CEF version at that time but it's an incomplete CEF feature and we need to wait until the CEF project implements it completely.

I'll test it again to see what happens with normal downloads.
Post Reply