CefClient Migration to Chrome

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.

CefClient Migration to Chrome

Postby leeroy » Fri Dec 13, 2024 7:50 pm

Has anyone successfully migrated from the old alloy-based CEF runtime to the new chrome-based Views framework while retaining custom controls and error page? For debug builds I need to add a "normal" navigation menu with a URL bar and Release builds remove it. After upgrading to the new chrome runtime (no alloy bootstrap) in CEF 6834, these approaches no longer work as expected. Are there recommended documentation sources, code samples, or specific files within the updated cefclient or Views framework in the codebase that outline the best practices for implementing and controlling a toolbar, URL bar, custom error handling page, and removing top-level menus? Any guidance on the migration process, or pointers to relevant sections in the current cefclient sample, would be greatly appreciated. There are a number of other things we are doing like reading in configuration and setting the url based on that information that is also not being respected anymore either.

I have located: https://github.com/chromiumembedded/cef/issues/3685, but any additional links are greatly appreciated.
leeroy
Expert
 
Posts: 115
Joined: Mon Jan 06, 2020 6:27 pm

Re: CefClient Migration to Chrome

Postby magreenblatt » Fri Dec 13, 2024 10:54 pm

What, specifically, is not working for you with Chrome style + Views? Does it work with Alloy style + Views? You can run cefclient with/without --use-alloy-style to see how it behaves in both cases.

Custom error pages is https://github.com/chromiumembedded/cef/issues/3852
magreenblatt
Site Admin
 
Posts: 13006
Joined: Fri May 29, 2009 6:57 pm

Re: CefClient Migration to Chrome

Postby leeroy » Tue Dec 17, 2024 7:51 pm

Thanks magreenblatt. It seems I can use use-native for windows and linux to achieve the former host platform's native windowing/UI controls.
* Is use-native not an option for macos (I would test this, but waiting for hardware)?
* Are we on borrowed time with use-native, is this going to be deprecated anytime soon?

I personally think we should pursue the unified view framework, but not sure I'll be allotted enough time to bring that into parity with our usage pattern atm.

Thank again!
leeroy
Expert
 
Posts: 115
Joined: Mon Jan 06, 2020 6:27 pm

Re: CefClient Migration to Chrome

Postby magreenblatt » Tue Dec 17, 2024 9:06 pm

The use-native option with Chrome style is not yet supported on Mac. See https://github.com/chromiumembedded/cef ... 1465030769
magreenblatt
Site Admin
 
Posts: 13006
Joined: Fri May 29, 2009 6:57 pm

Re: CefClient Migration to Chrome

Postby leeroy » Thu Jan 02, 2025 7:40 pm

I've been working on setting the use-allow-style and use-native options within a custom delegate's OnBeforeCommandLineProcessing method. However, it seems like these values aren't being respected at this point in the lifecycle.

Any insights would be greatly appreciated!
leeroy
Expert
 
Posts: 115
Joined: Mon Jan 06, 2020 6:27 pm

Re: CefClient Migration to Chrome

Postby magreenblatt » Thu Jan 02, 2025 8:22 pm

These command-line flags are implemented in cefclient/cefsimple. Look at the code for reference.
magreenblatt
Site Admin
 
Posts: 13006
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 64 guests