Commit Graph

3141 Commits

Author SHA1 Message Date
18b65ced23 tools: Also check for CEF_NEXT in .cc files (see #3836) 2025-02-28 18:22:33 -05:00
9c7b6e77a5 tools: Use short copyright for capi_versions.h headers (see #3836)
These files are not distributed and therefore don't require the
full copyright header.
2025-02-28 18:22:33 -05:00
781d2b5996 tools: Fix get_all_versions for newly added class (see #3836) 2025-02-28 18:22:33 -05:00
0573906f6d cefclient: Add global option to https://tests/preferences (see #3892) 2025-02-28 18:21:55 -05:00
fdd36e8461 Support API versioning in platform-specific headers (see #3836)
- Exclude platform-specific includes (anything in < >) from the
  clang preprocessor by using `!defined(GENERATING_CEF_API_HASH)`
  in CEF header files.
- Define "target platforms" by passing platform- and architecture-
  specific ifdefs to the clang preprocessor. Grep for `defined(OS_`
  to identify headers that require target platform processing, and
  then process for each target as the platform-specific API hash
  contribution.
- Delete the univeral hash which is no longer a useful concept.
2025-02-25 12:36:00 -05:00
8ddb1bffbb cmake: win: Set LPAC ACLs required for sandbox support (fixes #3791) 2025-02-19 13:38:22 -05:00
bfd1110145 tools: win: Use system installed Git version
Chromium has stopped bundling Git with depot_tools on Windows.
See https://groups.google.com/a/chromium.org/g/chromium-dev/c/e4ftLlQ5GpE/m/ye0ezOLaAAAJ
2025-02-19 12:27:47 -05:00
81d54830e9 Tag 13400 API version 2025-02-19 12:06:11 -05:00
0c25276083 tools: win: Fix grep usage with system Git (see #3836) 2025-02-19 12:05:35 -05:00
64bb2aadd5 tools: Add null check for struct ptrs in CToCpp wrapper (see #3836) 2025-02-19 11:11:51 -05:00
4261816c34 views: Always remove Toolbar before BrowserView destruction 2025-02-19 11:11:51 -05:00
c7c6a109c9 Update to Chromium version 134.0.6998.0 (#1415337) 2025-02-19 11:11:51 -05:00
c8be96d15c Minor types cleanup for API gen (see #3836) 2025-02-19 11:11:51 -05:00
e902b1f226 mac: Add -isysroot flag to clang command (see #3836) 2025-02-14 19:57:05 +00:00
144e01e377 doxygen: Include all API versions and generated files (see #3836) 2025-01-14 18:26:09 -05:00
2d8b6b06f2 Clean up CefStructBase inheritance
- Use C++11 using directive for constructor/operator= inheritance.
  This is a behavioral no-op.
- Remove CefStructBase virtual destructor to reduce object size. This
  is safe because CefStructBase is not deleted polymorphically.
2025-01-14 14:37:26 -05:00
a242ee518a Fix build error with enable_backup_ref_ptr_instance_tracer=true
See https://crbug.com/387277990
2025-01-14 14:19:22 -05:00
6a3233f945 Add debugging help link (see #3836) 2025-01-14 12:56:21 -05:00
70c6a041eb Fix issues parsing clang output (see #3836) 2025-01-14 12:56:21 -05:00
719f423e70 Stop shipping snapshot_blob.bin
Shipping both snapshot_blob.bin and v8_context_snapshot.bin is
unnecessary, and v8_context_snapshot.bin is available on all
supported platforms. Chrome stopped shipping snapshot_blob.bin
in https://crrev.com/b550792f0f (~M66).
2025-01-14 12:56:21 -05:00
c99d458ed3 win: Fix sandbox compilation errors 2025-01-14 12:56:21 -05:00
81a5005bc0 Add NUM_VALUES for enums and size for structs (see #3836)
API versioning requires that enumerations end with a count value
(`*_NUM_VALUES`) and structs begin with a size value (`size_t size`).
Wrapper templates are updated to support structs with different size
values indicating different versions.

To test:
Run `ceftests --gtest_filter=ApiVersionTest.StructVersion*`
2025-01-14 12:56:21 -05:00
ee5cec12d2 Move generated includes to the gen directory 2025-01-09 12:03:07 -05:00
f6b02f90aa Avoid usage of platform #ifdefs in cef_types.h (see #3836)
This file is passed to clang and will otherwise generate different
API hashes on different platforms.
2025-01-09 11:32:40 -05:00
de5324ef05 Make feature target names more explicit 2025-01-09 11:30:17 -05:00
7be2558291 Update to Chromium version 133.0.6943.0 (#1402768) 2025-01-08 17:19:43 -05:00
7588c9dcbf Fix V8Test.OnUncaughtExceptionDevTools failure (see #3867)
Ignore multiple calls to OnContextCreated when the DevTools window
is open.

Simplify the related implementation in MessageListenerCallbackImpl
(should be a behavioral no-op).
2025-01-08 17:19:43 -05:00
dd81904a2f Add initial support for API versioning (see #3836)
- Generated files are now created when running cef_create_projects or
  the new version_manager.py tool. These files are still created in the
  cef/ source tree (same location as before) but Git ignores them due to
  the generated .gitignore file.
- API hashes are committed to Git as a new cef_api_versions.json file.
  This file is used for both code generation and CEF version calculation
  (replacing the previous usage of cef_api_hash.h for this purpose).
  It will be updated by the CEF admin before merging breaking API
  changes upstream.
- As an added benefit to the above, contributor PRs will no longer
  contain generated code that is susceptible to frequent merge conflicts.
- From a code generation perspective, the main difference is that we now
  use versioned structs (e.g. cef_browser_0_t instead of cef_browser_t)
  on the libcef (dll/framework) side. Most of the make_*.py tool changes
  are related to supporting this.
- From the client perspective, you can now define CEF_API_VERSION in the
  project configuration (or get CEF_EXPERIMENTAL by default). This
  define will change the API exposed in CEF’s include/ and include/capi
  header files. All client-side targets including libcef_dll_wrapper
  will need be recompiled when changing this define.
- Examples of the new API-related define usage are provided in
  cef_api_version_test.h, api_version_test_impl.cc and
  api_version_unittest.cc.

To test:
- Run `ceftests --gtest_filter=ApiVersionTest.*`
- Add `cef_api_version=13300` to GN_DEFINES. Re-run configure, build and
  ceftests steps.
- Repeat with 13301, 13302, 13303 (all supported test versions).
2025-01-08 17:19:43 -05:00
219bf3406c Fix size_t undefined error 2024-12-16 11:07:10 -05:00
916a854173 Don't check in files generated by the translator tool 2024-12-16 11:05:58 -05:00
2197e2d63c ceftests: Fix type conversion error (see #3664) 2024-12-12 13:35:04 -05:00
5b14f11996 win: ceftests: Fix type conversion error (see #3664) 2024-12-12 12:03:28 -05:00
7dd2398be2 Update to Chromium version 133.0.6886.0 (#1393452) 2024-12-10 12:46:29 -05:00
5fcb2d36e5 win: Disable crash metrics collection (fixes #3847) 2024-12-04 13:09:21 -05:00
2dd1d1f94b osr: win: Implement page scroll mode (fixes #3849) 2024-12-04 11:25:39 -05:00
189b247282 osr: Add more info in accelerated callback (fixes #3730) 2024-12-04 10:44:33 -05:00
35fc888c72 Improve timing of frame attach/detach (see #3664)
- Move frame attachment from RenderFrameCreated to
  DidCommitProvisionalLoad. This has a number of advantages:
  - Significantly reduces the frequency of disconnects by avoiding
    the GetInterface/DidCommitNavigation race condition.
  - Stops connecting temporary frames (created during cross-origin
    navigation), making callback behavior more consistent.
- Split frame detach and destruction notifications into separate
  callbacks. OnFrameDetached now reflects a potentially recoverable
  state. Add a new OnFrameDestroyed callback for the unrecoverable
  destruction state.
2024-12-04 10:44:33 -05:00
7f253f83a2 Reduce the frequency of connection-related renderer crashes (see #3664)
- Use ResetWithReason to report intentional browser side disconnects of
  existing Mojo connections. Don't retry for those disconnects.
- Add set_disconnect_with_reason_and_result_handler in Chromium/Mojo to
  expose the MojoResult code for failed connections, allowing
  identification of connections that are intentionally unbound on the
  browser side.
- Optimize initial reconnect delay for known disconnect cases such as
  navigation-related and bfcache changes.
- Remove connection timeout and increase total connection deadline by
  100% to further reduce crash rates on slower machines.
- Only fail fatally for main frames (not sub-frames) in cases where the
  connection fails or disconnects for unknown reasons.
- Improve connection debug logging when running with
  `--enable-logging --vmodule=*frame*=1 --log-file=C:\temp\log.txt`
2024-12-02 16:16:42 -05:00
a02960b2fc mac: Add applicationSupportsSecureRestorableState
Requests that any state restoration archive be created with secure
encoding (macOS 12+ only). See https://crrev.com/c737387656 for
details. This also fixes an issue with macOS default behavior
incorrectly restoring windows after hard reset (holding down the
power button).
2024-11-27 11:02:32 -05:00
179cb8bedb Disable prerendering (see #3664)
This is not currently supported by CEF's frame tracking model.
2024-11-21 15:39:10 -05:00
3acb352bc7 Improve logging of fatal renderer connection errors (see #3664) 2024-11-21 15:38:33 -05:00
c718a5bee6 Build sample apps using C++17 (see #3611) 2024-11-19 13:24:23 -05:00
7538208409 cefclient: Fix accidental usage of C++20 map::contains (see #3611) 2024-11-19 13:24:23 -05:00
f8b673a3ea win: Disable use of Rust for JSON parsing with cef_sandbox 2024-11-19 13:24:23 -05:00
89ab864065 tests: Fix HSTS-related test failures 2024-11-15 13:57:38 -05:00
7abba8b86d osr: Fix crash in RenderWidgetHostImpl::WasHidden (fixes #3834) 2024-11-15 12:55:03 -05:00
34dbad30db Update to Chromium version 132.0.6834.0 2024-11-15 11:38:37 -05:00
c166b4abc9 tests: Fix flaky FrameHandlerTest.Order* tests (fixes #3817)
The OnFrameAttached callback relies on a round-trip to the
renderer process and may not be synchronized with OnLoadStart/
OnLoadEnd/OnMainFrameChanged callbacks.
2024-11-13 14:25:49 -05:00
e513077eac Add notification for aborted popups (fixes #3776)
Pass a new |popup_id| parameter to OnBeforePopup and call a new
OnBeforePopupAborted callback if the popup is aborted before
OnAfterCreated is called for the popup browser. Add new
CefBrowserHost::GetBrowserByIdentifier and GetOpenerIdentifier
methods to assist with retrieval of associated browsers.

In cefclient, clean up state when a popup is aborted and close
any associated popup browsers when the opener browser is closed.
This also works when running with `--use-default-popup`.
2024-11-13 14:13:29 -05:00
b660522983 views: Fix Chrome style browser RequestFocus behavior (fixes #3819)
Fix implementation of CefBrowserView::RequestFocus for Chrome style
browsers. Match Alloy style behavior of requesting browser focus
(calling OnSetFocus) after initial navigation. Add CefView::HasFocus
and CefWindow::GetFocusedView that can be used in combination with
CefWindow::IsActive to determine global keyboard focus.

Update sample applications for the new behavior.

In cefclient:
- Browser receives initial focus via ViewsWindow::RequestBrowserFocus.
- When running with `--show-overlay-browser` (see #3790):
  - Give initial focus to the overlay browser.
  - Change the overlay popout shortcut to CTRL+SHIFT+O to avoid
    assigning focus to the menu in the main window.
  - Switching from overlay in the main window to popout browser
    window will give focus to the popout browser.
  - Switching from popout browser to overlay will leave current focus
    unchanged (e.g. in the overlay browser, or somewhere else). User
    gesture to activate the main window may be required on Mac/Linux.
- When running with `--no-active` don't give initial focus to either
  browser.

In cefsimple:
- Browser receives initial focus via default handling.
2024-11-06 13:20:02 -05:00