CEF.swift
CEF.swift copied to clipboard
Some extra classes
I badly need CefMessageRouter.
well, that's gonna be tricky since that class is part of libcef_dll_wrapper which is a pure C++ API...
Yep.
do you want to use swift in the renderer process as well?
I'm not sure this affects Helper, i.e. it has not to be modified (in C).
based on what I see in the documentation in cef_message_router.h
, you'll need to set up both sides of the channel yourself
Oh, I see. CefMessageRouter implies renderer in swift.
I've done some research, it's not impossible but it involves:
- modifying CEF a bit
- creating a C API for the C++ classes
- restructuring CEF.swift
- wrapping the C API with a swift library
I'm planning to carry this out gradually but due to the size of the task I'd rather not fix any ETA.
Oh, I see. CefMessageRouter implies renderer in swift. (solution to getting rid of duplicate swift std libs needed)
Even if you use CefMessageRouter, you can have Swift on one side (browser process) and C++ on the other (render process), it doesn't have to be the same language.
At first sight I thought that a direct swift port might be possible, using extant CEF.swift classes.
Hi @lvsti , I also want CefMessageRouter badly. With this pull request, I assume that the modification for CEF is done. Is there any other progress with CefMessageRouter? Although I'm not experienced with this C/C++/Swift translation, it will be my pleasure if I can help with this issue as I really want CefMessageRouter. :)
Bridging the wrapper classes is indeed feasible but I always tried to avoid dumping them into the CEFswift
module itself because I felt that they didn't belong there. On the other hand, I didn't manage to rearrange the source in a way that allowed both the existing CEFswift
and a separate (and preferably optional) CEFswift.Wrappers
submodule, so I abandoned that branch some weeks later.
I'll take another look at the impact of shoving everything into CEFswift
and let you know what I decided.
I've made some progress with the message router, hopefully I can get it to work on a branch around the weekend.
@lvsti Thanks for following up. Actually, I've added the message router to CEF.swift myself. It's not perfect but it's working. I'd like to have some discussion through email if you are interested, but I cannot find your email address on your Github home page.
@SyberToto I've created a gitter room for this discussion: https://gitter.im/CEF-swift/wrapper-classes
here is where I am with it: https://github.com/lvsti/CEF.swift/tree/wrapper-classes-redux