This directory contains the "scheme_handler" target which demonstrates how to handle resource requests using CefSchemeHandlerFactory.
See the shared library target for details common to all executable targets.
The "scheme_handler" target is implemented as follows:
- Define the target-specific CMake build configuration in the CMakeLists.txt file.
- Call the shared entry point functions that initialize, run and shut down CEF.
- Uses the minimal target implementation.
- Implement the shared::Create*ProcessApp functions to create a CefApp instance appropriate to the process type.
- Browser process: app_browser_impl.cc implements the
shared::CreateBrowserProcessApp
method.- Register the custom scheme name in OnRegisterCustomSchemes.
- Register the custom scheme handler factory by calling
RegisterSchemeHandlerFactory
implemented in scheme_handler_impl.cc. - Create the initial CefBrowser instance.
- Other processes: app_subprocess_impl.cc implements the
shared::CreateRendererProcessApp
andshared::CreateOtherProcessApp
methods.- Register the custom scheme name in OnRegisterCustomSchemes.
- Browser process: app_browser_impl.cc implements the
- Provide a concrete CefClient implementation to handle CefBrowser callbacks.
- Uses the minimal target implementation.
- Windows resource loading implementation in resource_util_win_impl.cc and resource.rc.
- Implements the shared::GetResourceId method to map resource paths to BINARY ID values.
- Defines a BINARY resource to include logo.png and scheme_handler.html in the executable.
See the shared library target for configuration details.
See the shared library target for setup and build instructions.