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.

Disable notification window on CEF 128

Post Reply
thefunkyjoint
Posts: 481
Joined: Thu Aug 10, 2017 12:40 pm

Disable notification window on CEF 128

Post by thefunkyjoint »

Now that Chrome Runtime is always enabled, a lot of sites asks for showing notifications , like this :

Image

Is there a way to disable this on CEF4Delphi ?
User avatar
salvadordf
Posts: 4304
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Disable notification window on CEF 128

Post by salvadordf »

Hi,

Use the TChromiumCore.OnShowPermissionPrompt event and check that requested_permissions has a CEF_PERMISSION_TYPE_NOTIFICATIONS value.

Set aResult to true and call callback.Cont(CEF_PERMISSION_RESULT_DENY) to deny permission.
thefunkyjoint
Posts: 481
Joined: Thu Aug 10, 2017 12:40 pm

Re: Disable notification window on CEF 128

Post by thefunkyjoint »

Thank you very much ! :D
Post Reply