Disable Chrome policy management by default. Add CefSettings.chrome_policy_id
which, when configured, enables Chrome policy management. See
https://support.google.com/chrome/a/answer/9037717 for background.
To test:
- Start with a machine where Google Chrome is managed.
- Run `cefclient --enable-chrome-runtime --url=chrome://policy/`
There should be no configured policies.
- Run `cefclient --enable-chrome-runtime --url=chrome://policy/
--enable-chrome-policy`
Configured Platform properties should match Google Chrome.
- Run `cefclient --enable-chrome-runtime --url=chrome://policy/
--enable-chrome-policy --enable-chrome-browser-cloud-management`
Configured Platform and Cloud properties should match Google Chrome.
Write access to the shared memory region is required because JavaScript lacks
the capability to create read-only ArrayBuffers. When a user attempts to modify
an ArrayBuffer that utilizes a ReadOnlySharedMemoryRegion as its BackingStore
it triggers an access violation.
Note that this pull request may be reverted in the future if JavaScript adds
read-only ArrayBuffer support.
This avoids a situation where misbehaving clients may cause the
application to continue running indefinitely by posting new UI
thread tasks after calling CefQuitMessageLoop.
This change replaces existing CefSettings.user_data_path usage with
CefSettings.root_cache_path for better alignment with the Chrome runtime.
All files should now be written inside the root_cache_path directory.
Use pointers to incomplete struct types. If an argument of a not suitable
type is passed to a function of any string collection,
C compiler will warn:
warning: passing argument 1 of <func> from incompatible pointer type
C++ compiler will raise an error, for example:
error: cannot convert 'cef_string_list_t' ... to 'cef_string_multimap_t'
With the previously used `void*` pointer types, such errors in a code were not
diagnosed.
- mac: Xcode 14.0 with macOS SDK 13.0 is now required.
- Remove CefRequestHandler::OnQuotaRequest because persistent quota is no
longer supported (see https://crbug.com/1208141)
Custom global and request context preferences can now be registered via
CefBrowserProcessHandler::OnRegisterCustomPreferences. CefRequestContext
now extends CefPreferenceManager and global preferences can be accessed
via CefPreferenceManager::GetGlobalPreferenceManager.
Change the default stack size to 8 MiB for 64-bit and 0.5 MiB for 32-bit.
CEF's main thread needs at least a 1.5 MiB stack size in order to avoid
stack overflow crashes. However, if this is set in the PE file then other
threads get this size as well, leading to address-space exhaustion in 32-bit
CEF. A new CefRunWinMainWithPreferredStackSize function uses fibers to switch
the main thread to a 4 MiB stack (roughly the same effective size as the
64-bit build's 8 MiB stack) before running any other code.
This change additionally moves the existing Windows-only functions
CefSetOSModalLoop and CefEnableHighDPISupport from cef_app.h to cef_win.h.
This service is required by the "PermissionOnDeviceNotificationPredictions"
feature which is enabled by default in https://crbug.com/1350956. It uses a
Google backend service as described at https://go.dev/solutions/google/chrome.
This change removes the usage of PredictionBasedPermissionUiSelector, which
triggered this dependency, along with related startup complexity that was added
to support the optimization/prediction service in the M106 update.
Send a FrameDetached message from CefFrameHostImpl::Detach before closing
the RenderFrame connection to avoid an immediate reconnect attempt by the
renderer.
When BFCache is disabled the intentionally detached frame will never be
reconnected. When BFCache is enabled the intentionally detached frame will
be reconnected via CefFrameImpl::OnWasShown if/when it exits the cache.
Disable BackForwardCache globally for the Alloy runtime so that
blink::RuntimeEnabledFeatures::BackForwardCacheEnables reports the
correct value in the renderer process.
Using a source_set here keeps the linker on Windows from discarding exported
compilation units that are not directly called from inside libcef_static.
This may also fix linker errors on Linux due to CEF's use of an intermediate
static library (see https://crbug.com/1319006#c2).
CefSharedProcessMessageBuilder supports creation of a CefProcessMessage
backed by a CefSharedMemoryRegion.
Performance tests comparing the existing ArgumentList approach and the new
SharedMemoryRegion approach have been added to cefclient at
http://tests/ipc_performance.
CefMessageRouter has been updated to use SharedMemoryRegion as transport
for larger message payloads. The threshold is configurable via
|CefMessageRouterConfig.message_size_threshold|.
To test:
run `ceftests --gtest_filter=SendSharedProcessMessageTest.*:SharedProcessMessageTest.*:MessageRouterTest.Threshold*`