|
Chromium Embedded Framework (CEF)
122.0.1+gf3f83ff+chromium-122.0.6261.6
|
Scoped helper for loading and unloading the CEF framework library at runtime from the expected location in the app bundle. More...
#include "include/wrapper/cef_library_loader.h"
Public Member Functions | |
| CefScopedLibraryLoader () | |
| CefScopedLibraryLoader (const CefScopedLibraryLoader &)=delete | |
| CefScopedLibraryLoader & | operator= (const CefScopedLibraryLoader &)=delete |
| ~CefScopedLibraryLoader () | |
| bool | LoadInMain () |
| Load the CEF framework in the main process from the expected app bundle location relative to the executable. More... | |
| bool | LoadInHelper () |
| Load the CEF framework in the helper process from the expected app bundle location relative to the executable. More... | |
Scoped helper for loading and unloading the CEF framework library at runtime from the expected location in the app bundle.
Loading at runtime instead of linking directly is a requirement of the macOS sandbox implementation.
Example usage in the main process:
#include "include/wrapper/cef_library_loader.h"
int main(int argc, char* argv[]) {
// Dynamically load the CEF framework library.
CefScopedLibraryLoader library_loader;
if (!library_loader.LoadInMain())
return 1;
// Continue with CEF initialization...
}
Example usage in the helper process:
#include "include/cef_sandbox_mac.h"
#include "include/wrapper/cef_library_loader.h"
int main(int argc, char* argv[]) {
// Initialize the macOS sandbox for this helper process.
CefScopedSandboxContext sandbox_context;
if (!sandbox_context.Initialize(argc, argv))
return 1;
// Dynamically load the CEF framework library.
CefScopedLibraryLoader library_loader;
if (!library_loader.LoadInHelper())
return 1;
// Continue with CEF initialization...
}
| CefScopedLibraryLoader::CefScopedLibraryLoader | ( | ) |
|
delete |
| CefScopedLibraryLoader::~CefScopedLibraryLoader | ( | ) |
|
inline |
Load the CEF framework in the helper process from the expected app bundle location relative to the executable.
Returns true if the load succeeds.
|
inline |
Load the CEF framework in the main process from the expected app bundle location relative to the executable.
Returns true if the load succeeds.
|
delete |