lvsti / CEF.swift

Swift bindings for the Chromium Embedded Framework
BSD 3-Clause "New" or "Revised" License
94 stars 29 forks source link

Add multi-process support #33

Closed WarWithinMe closed 6 years ago

WarWithinMe commented 6 years ago
  1. Single-process mode should stay intact, although CEFRenderProcessHandler.onContextCreated and onContextReleased has been modified.
  2. Build script fixed so that the app can be properly code-signed.
  3. The structure of Demo project has been refactored, because CEF.swift project now produces a framework and a multi-process helper, which must be used for multi-process mode.
  4. Many features (which needs a v8 context or should be done in render thread) is not yet supported in multi-process mode. Currently only these works:
    • Eval js script in the Main Process.
    • Register native methods for a frame.
    • Reports of contextCreated, contextRelease, js uncaught exception in the Main Process.

Some not-working feature includes:

lvsti commented 6 years ago

Wow, this is a huge amount of work you did here. Unfortunately, I'm not going to pull this into the codebase. The reason is that I want to keep CEF.swift a minimal wrapper around CEF. I understand that there may be common usecases e.g. for IPC that might make a good candidate for extending the framework, but those could as well be put in a separate library and distributed independently.