Commit Graph

101 Commits

Author SHA1 Message Date
Marshall Greenblatt b5386249bd alloy: Remove CefSettings.user_data_path (fixes #3511)
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.
2023-06-06 17:41:57 +03:00
Marshall Greenblatt dc9e64308a Replace NOTREACHED() with DCHECK(false) (fixes #3500)
Restores the old behavior of assertion in Debug build only.
2023-05-08 18:36:00 +03:00
Marshall Greenblatt f3b570cf8e win: Remove CefEnableHighDPISupport function (fixes issue #3452)
High-DPI support is now enabled by default in Chromium.
2023-03-03 16:07:29 -05:00
Marshall Greenblatt dc2231cdfb Update to Chromium version 111.0.5563.0 (#1097615) 2023-02-03 13:00:26 -05:00
Marshall Greenblatt 3af3eab3e4 Update source files for bracket style 2023-01-04 17:47:17 -05:00
Marshall Greenblatt 47d69a842a Update to Chromium version 109.0.5414.0 (#1070088)
- 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)
2022-11-17 12:50:15 -05:00
Marshall Greenblatt 07bf5dbacc windows: Configure stack size for executables (fixes issue #3250)
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.
2022-10-21 14:52:50 -04:00
Marshall Greenblatt dfd1917d9b Remove obsolete call to _set_FMA3_enable(0)
This call was longer required after the switch to VS2015 (see
https://crbug.com/586618).
2022-10-20 13:47:27 -04:00
Marshall Greenblatt ebde595370 Convert defined(OS_XXX) to BUILDFLAG(IS_XXX) in libcef
See https://crbug.com/1234043 for background.
2022-01-24 12:58:04 -05:00
Marshall Greenblatt a7bbd8a62b Remove ignore_certificate_errors setting (fixes issue #2899)
This removes CefSettings.ignore_certificate_errors and
CefBrowserSettings.ignore_certificate_errors. Due to NetworkService
requirements these values must now be configured globally via the
"ignore-certificate-errors" command-line flag.
2021-09-27 16:36:57 +03:00
Marshall Greenblatt 00dca9601e Update to Chromium version 92.0.4515.0 (#885287) 2021-06-10 16:42:44 -04:00
Marshall Greenblatt 3ab91a45c9 chrome: Support configuration of accept language (see issue #2969)
This change adds support for CEF settings configuration of accept_language_list.
If specified, this value will take precedence over the "intl.accept_languages"
preference which is controlled by chrome://settings/languages.
2021-04-28 13:12:09 -04:00
Marshall Greenblatt 34c63a665d Wait for CefBrowserContext initialization (see issue #2969)
With the Chrome runtime, Profile initialization may be asynchronous. Code that
waited on CefBrowserContext creation now needs to wait on CefBrowserContext
initialization instead.
2021-04-14 21:03:44 -04:00
Marshall Greenblatt 76642ccafa Move cookieable scheme configuration to settings (see issue #2969)
The Chrome runtime requires that cookieable scheme information be available
at Profile initialization time because it also triggers NetworkContext creation
at the same time. To make this possible, and to avoid various race conditions
when setting state, the cookieable scheme configuration has been added as
|cookieable_schemes_list| and |cookieable_schemes_exclude_defaults| in
CefSettings and CefBrowserContextSettings. The CefCookieManager::
SetSupportedSchemes and CefBrowserProcessHandler::GetCookieableSchemes methods
are no longer required and have been removed.

This change also modifies chrome to delay OffTheRecordProfileImpl initialization
so that |ChromeBrowserContext::profile_| can be set before
ChromeContentBrowserClientCef::ConfigureNetworkContextParams calls
CefBrowserContext::FromBrowserContext to retrieve the ChromeBrowserContext
and associated cookieable scheme information. Otherwise, the
ChromeBrowserContext will not be matched and the NetworkContext will not be
configured correctly.

The CookieTest suite now passes with the Chrome runtime enabled.
2021-04-09 15:04:24 -04:00
Marshall Greenblatt 24c2f2fa38 Update to Chromium version 86.0.4240.0 (#800218)
- CefURLRequest::Create is no longer supported in the renderer process
  (see https://crbug.com/891872). Use CefFrame::CreateURLRequest instead.
- Mac platform definitions have been changed from `MACOSX` to `MAC`
  (see https://crbug.com/1105907) and related CMake macro names have
  been updated. The old `OS_MACOSX` define is still set in code and CMake
  for backwards compatibility.
- Linux ARM build is currently broken (see https://crbug.com/1123214).
2020-09-03 17:44:25 -04:00
Marshall Greenblatt 1174994211 Add initial chrome runtime support (see issue #2969)
Running `cefsimple --enable-chrome-runtime` will create and run a
Chrome browser window using the CEF app methods, and call
CefApp::OnContextInitialized as expected. CEF task methods also
work as expected in the main process. No browser-related methods or
callbacks are currently supported for the Chrome window, and the
application will exit when the last Chrome window closes.

The Chrome runtime requires resources.pak, chrome_100_percent.pak
and chrome_200_percent.pak files which were not previously built
with CEF. It shares the existing locales pak files which have been
updated to include additional Chrome-specific strings.

On Linux, the Chrome runtime requires GTK so use_gtk=true must be
specified via GN_DEFINES when building.

This change also refactors the CEF runtime, which can be tested in
the various supported modes by running:
$ cefclient
$ cefclient --multi-threaded-message-loop
$ cefclient --external-message-pump
2020-06-29 16:17:23 -04:00
Marshall Greenblatt 049caf9131 Refactor process execution logic (see issue #2969)
CefContext implements the public CEF API functions and delegates
the stages of content & service_manager process execution to
CefMainRunner. CEF-specific runtime logic (which may be replaced
with chrome-specific runtime logic) is then delegated to
CefMainDelegate which implements content::ContentMainDelegate.
2020-06-29 16:17:13 -04:00
Marshall Greenblatt fd1f465fa7 Normalize path values and add additional error logging (fixes issue #2405)
This change also improves the settings documentation and enforces the
requirement that path values be absolute (see issue #2916).
2020-04-23 17:51:19 -04:00
Marshall Greenblatt fa519f5108 Update to Chromium version 83.0.4103.0 (#756066) 2020-04-15 16:47:50 -04:00
rcdrone bdaa857c49 Windows: Disable the sandbox if windows_sandbox_info is null
This restores the behavior prior to revision 438382c. Calling
InitializeSandboxInfo from inside libcef won’t work unless libcef is
statically linked with the executable, so there's no point in doing so.
See the Chromium sandbox docs for background.
2020-04-02 21:11:16 +00:00
rcdrone 438382c5df Windows: Skip InitializeSandboxInfo if no_sandbox is true
The InitializeSandboxInfo method applies mitigations to the main process
that are inappropriate when the sandbox is disabled.
2020-03-05 17:52:41 +00:00
Marshall Greenblatt ea63799c3e libcef: Convert NULL to nullptr (see issue #2861) 2020-01-15 14:49:22 +01:00
Marshall Greenblatt b9fc93955c Fix DiscardableSharedMemoryManager crash on shutdown with multi-threaded message loop (fixes issue #2798) 2019-11-06 16:29:34 -05:00
Marshall Greenblatt 65f97a60ad Remove the enable-net-security-expiration option (see issue #2622)
The implementation of this option was removed in commit 67b61c4. Certificate
transparency is disabled by default for Chromium embedders. Details at:

https://chromium.googlesource.com/chromium/src/+/master/net/docs/certificate-transparency.md#Supporting-Certificate-Transparency-for-Embedders
2019-10-29 11:36:29 -04:00
Petra Öhlin cc0db5f166 Update to Chromium version 76.0.3809.0 (#665002)
OSR tests will be fixed by a follow-up merge of Viz support (see issue #2575).
2019-07-16 15:34:16 -04:00
Marshall Greenblatt fa5268fa2d Fix issues with request callbacks during browser shutdown (see issue #2622).
The behavior has changed as follows with NetworkService enabled:
- All pending and in-progress requests will now be aborted when the CEF context
  or associated browser is destroyed. The OnResourceLoadComplete callback will
  now also be called in this case for in-progress requests that have a handler.
- The CefResourceHandler::Cancel method will now always be called when resource
  handling is complete, irrespective of whether handling completed successfully.
- Request callbacks that arrive after the OnBeforeClose callback for the
  associated browser (which may happen for in-progress requests that are aborted
  on browser destruction) will now always have a non-nullptr CefBrowser
  parameter.
- Allow empty parameters to CefRequest and CefResponse methods where it makes
  sense (e.g. resetting default response state, or clearing a referrer value).
- Fixed a reference loop that was keeping CefResourceHandler objects from being
  destroyed if they were holding a callback reference (from ProcessRequest,
  ReadResponse, etc.) during CEF context or associated browser destruction.
- Fixed an issue where the main frame was not detached on browser destruction
  which could cause a crash due to RFH use-after-free (see issue #2498).

To test: All unit tests pass as expected.
2019-06-01 15:51:33 +03:00
Marshall Greenblatt cc80175e89 Linux: Fix NetworkService startup assertion in FeatureList::InitializeInstance (see issue #2622). 2019-04-26 13:22:07 -07:00
Marshall Greenblatt b65f336f81 Enforce cache_path requirements for NetworkService (see issue #2622).
This change adds a new CefSettings.root_cache_path value that must be either
equal to or a parent directory of all CefSettings.cache_path and
CefRequestContextSettings.cache_path values. The sandbox may block read/write
access from the NetworkService to directories that do not meet this requirement.

To test: Run cefclient with a combination of the following flags:

--cache-path=c:\temp\cache
  Cache data should be persisted to the specified directory.

--request-context-per-browser
  A separate numbered cache directory should be created underneath the
  cache-path directory for each new browser instance.

--enable-network-service --disable-extensions
  Same tests, but with NetworkService enabled.

Known issues:
- When NetworkService is enabled a C:\temp\cache\cache\Cache directory is
  created (should be C:\temp\cache\Cache).
2019-03-24 16:47:00 -04:00
Alexander Guettler 725ed88529 Update to Chromium version 74.0.3729.0 (#638880)
- Windows: 10.0.17763.0 SDK is now required.
- Mac: 10.13 SDK is now required.
- Removed CefRequestContext::ResolveHostCached which is no longer supported by Chromium.
2019-03-13 21:27:37 +00:00
Alexander Guettler 27fb4694ed Fix crashes when running with multi-threaded message loop (issue #2565) 2019-01-11 11:58:36 +01:00
Marshall Greenblatt a7e997e524 Update to Chromium version 72.0.3599.0 (#604791) 2018-11-05 13:31:55 -05:00
Marshall Greenblatt da53451f97 Update to Chromium version 71.0.3567.0 (#595360)
- Configuration of OSR VSync interval is currently missing (issue #2517)
- Rename VERSION to VERSION.in to fix libc++ compile error (issue #2518)
2018-10-04 12:17:26 +03:00
Marshall Greenblatt 8aa4b7aaae Linux: Add multi-threaded message loop support (issue #2512) 2018-09-20 15:17:35 +02:00
Marshall Greenblatt a64237bcb0 Update to Chromium version 70.0.3538.0 (#587811)
Known issues:
- The CefLoadCRLSetsFile function needs to be re-implemented (see issue #2497).
- Linux: GTK2 support has been removed. The cefclient sample needs to be updated
  to use GTK3 (see issue #2014).
2018-09-05 15:42:42 +02:00
Marshall Greenblatt 7139f01103 Fix cfi-cast failure in CefBrowserMessageLoop::current (issue #2472) 2018-07-12 10:58:29 -07:00
Marshall Greenblatt 8b4980b4ca Update to Chromium revision adb61db1 (#508578) 2017-10-26 15:58:05 -04:00
Marshall Greenblatt a028976ac4 Update to Chromium revision fa6a5d87 (#499098) 2017-09-07 17:29:47 -04:00
Marshall Greenblatt f229796a39 Update to Chromium revision ff259bab (#488528) 2017-07-28 18:30:34 -04:00
Marshall Greenblatt 1aea3a06a5 Linux/Mac: Fix handling of command-line arguments (issue #2208) 2017-07-18 13:57:04 -07:00
Marshall Greenblatt d4f06e3806 Move matching h file to top of header list (issue #2171) 2017-05-19 11:11:18 +02:00
Marshall Greenblatt 31d9407ee2 Apply clang-format to all C, C++ and ObjC files (issue #2171) 2017-05-18 12:30:05 +02:00
Marshall Greenblatt 51e8c53f30 Remove CefForceShutdown and make failure to call CefShutdown a DCHECK instead (issue #1932) 2017-05-09 15:52:52 -04:00
Marshall Greenblatt a2b8c250a8 Windows: Revert early chrome_elf crashpad initialization (issue #2122) 2017-04-27 13:20:33 -04:00
Marshall Greenblatt 3f71138d64 Update to Chromium revision a106f0ab (#464641)
- Remove CefWindowInfo.transparent_painting_enabled. Set
  CefBrowserSettings.background_color to an opaque or transparent
  value instead.
2017-04-24 15:14:47 -04:00
Marshall Greenblatt 5c160e018b Windows: Fix command line parsing for crash handler (issue #1995) 2017-01-30 16:21:12 -05:00
Marshall Greenblatt a56ac9782e macOS: Support crash reporting from unbundled apps (issue #1532) 2017-01-27 14:16:04 -05:00
Marshall Greenblatt b7b145fa4f Update to Chromium revision ad51088c (#444943) 2017-01-24 16:53:09 -05:00
Marshall Greenblatt a834487177 Improve crashpad integration (issue #1995)
- Crash reporting is enabled and configured using a "crash_reporter.cfg"
  file. See comments in include/cef_crash_util.h and tools/crash_server.py
  for usage.
2017-01-10 18:40:31 -05:00
Marshall Greenblatt 48908c9195 Windows: Add missing crashpad initialization (issue #1995) 2016-12-05 14:29:54 +01:00
Marshall Greenblatt 12aeeb13f7 Update to Chromium revision 3a87aecc (#433059) 2016-11-29 16:56:29 -05:00