magreenblatt wrote:What, specifically, are you seeking to do on notification of browser close?
Please excuse my late reply. I had to take care of other things and couldn't come back to my issue earlier.
As I wrote in my initial comment, I'm building an application (Windows only) on top of the
cefclient example project. I think this is not only an example but a general starting point for many applications that want to integrate CEF.
To explain why I'm looking for a way to register custom delegates, I'll give you an overview of my project's structure. My project directory looks something like the following (abbreviated):
- Code: Select all
my-project/
- libs/
- cef_binary_101.0.15+gca159c5+chromium-101.0.4951.54_windows64/
- src/
- cefclient/
- shared/
- custom_code/
- cefclient_win.cc
I copied over the directories
cefclient/ and
shared/ from the
libs/cef_binary_101.0.15+gca159c5+chromium-101.0.4951.54_windows64/tests/ directory (the automated builds you can download from
https://cef-builds.spotifycdn.com/index.html#windows64) and modified the include statements to reference the local paths. The file
cefclient_win.cc was moved from the
cefclient/ directory to my
src/ directory. This is the entry point for my application. My whole project is configured with CMake.
There are some small modifications in the
cefclient/ and
shared/ directory I had to do but other than that I try to put all my application specific code in the
custom_code/ directory. This way I can relatively easily update the CEF version and update any files that has been changed in
cefclient/ and
shared/ directory. This approach helps me to keep my project manageable and updateable.
With this in mind I am looking for a way to register a new delegate to receive browser events/notifications. The delegate implementation can go in its own file under
custom_code/ and is separated cleanly from the
cefclient code.
Maybe the
cefclient example project isn't designed in this way.
Would you agree with my approach of using the
cefclient example project or would you suggest a different project structure?
I hope my explenations make sense to you.