Queries on chrome extensions

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Queries on chrome extensions

Postby jcam » Tue Oct 15, 2024 2:41 am

I am using CEF with offscreen rendering using the chrome runtime with Alloy style and I am exploring the use of extensions.
I have managed to get an extensions running by passing its directory to the `--load-extension=/path/to/extension,...` cli argument when starting the binary.
Opening the `default_popup` URL as specified in the extension's manifest in a `CreateBrowser` successfully shows the extension popup page.
I have two queries about this:

1. How do I open the extensions popup in the current browser? If I open the `default_popup` URL as described above the extension does not 'see' the tab information, this is because it is in a different browser now. For example opening the dark reader extension popup does not show the current page:
Image

2. Are extensions well supported with the setup I described above?
According to this extensions are fully supported using the chrome runtime, however, according to this extensions are supported when using the chrome runtime AND chrome style windows. The extensions I tried did seem to work however, I would like to know if I should expect breakages with how I set it up.

3. Is there anything I need to look out for with this setup?
I don't fully understand the role of the runtime/ style and how offscreen rendering interacts with extensions, I would appreciate it if you could point some things that I need to look out for.
jcam
Newbie
 
Posts: 2
Joined: Thu Sep 14, 2023 8:53 am

Re: Queries on chrome extensions

Postby magreenblatt » Tue Oct 15, 2024 9:24 am

Are extensions well supported with the setup I described above?

No. Extensions are only supported with Chrome style windows that show some portion of the Chrome UI (like the Chrome toolbar). See https://github.com/chromiumembedded/cef/issues/3685 for background on runtime vs style terminology.
magreenblatt
Site Admin
 
Posts: 12972
Joined: Fri May 29, 2009 6:57 pm

Re: Queries on chrome extensions

Postby jcam » Wed Oct 16, 2024 5:02 am

I see, thanks for the clarification.

Is it possible to support chrome style windows with off-screen rendering in order to have extensions?

I am not that familiar with this area so I am still trying to understand what work needs to be done to support extensions with OSR, would the support for Ozone give us this perhaps (we are exclusively on Linux)?
jcam
Newbie
 
Posts: 2
Joined: Thu Sep 14, 2023 8:53 am

Re: Queries on chrome extensions

Postby magreenblatt » Wed Oct 16, 2024 10:55 am

Extensions that don’t require Chrome UI dependencies (toolbar windows, icons, etc) may work with Alloy style windows and OSR, but that would be up to you to test and support on a case-by-case basis. Read the Ozone support issue for an understanding of that technology.
magreenblatt
Site Admin
 
Posts: 12972
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 47 guests