Commit Graph

3102 Commits

Author SHA1 Message Date
Marshall Greenblatt 179cb8bedb Disable prerendering (see #3664)
This is not currently supported by CEF's frame tracking model.
2024-11-21 15:39:10 -05:00
Marshall Greenblatt 3acb352bc7 Improve logging of fatal renderer connection errors (see #3664) 2024-11-21 15:38:33 -05:00
Marshall Greenblatt c718a5bee6 Build sample apps using C++17 (see #3611) 2024-11-19 13:24:23 -05:00
Marshall Greenblatt 7538208409 cefclient: Fix accidental usage of C++20 map::contains (see #3611) 2024-11-19 13:24:23 -05:00
Marshall Greenblatt f8b673a3ea win: Disable use of Rust for JSON parsing with cef_sandbox 2024-11-19 13:24:23 -05:00
Marshall Greenblatt 89ab864065 tests: Fix HSTS-related test failures 2024-11-15 13:57:38 -05:00
Marshall Greenblatt 7abba8b86d osr: Fix crash in RenderWidgetHostImpl::WasHidden (fixes #3834) 2024-11-15 12:55:03 -05:00
Marshall Greenblatt 34dbad30db Update to Chromium version 132.0.6834.0 2024-11-15 11:38:37 -05:00
Marshall Greenblatt 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
Marshall Greenblatt 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
Marshall Greenblatt 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
Marshall Greenblatt b070564ec5 win: Reland screen_1443650 changes (fixes #3489)
Use ScaleToRoundedRect instead of ScaleToEnclosedRect.
2024-11-05 12:32:36 -05:00
Marshall Greenblatt 980cc4b9fe bazel: win: Explicitly link libcef.lib in cc_binary (see #3757)
Using cc_import + interface_library/shared_library to link libcef.lib causes
libcef.dll to be copied as a transitive dependency, leading to issues with
complex Bazel configs. Instead, we explicitly link libcef.lib in the binary
target (cc_binary + linkopts/additional_linker_inputs) and explicitly copy
libcef.dll to the target directory.
2024-11-05 11:47:54 -05:00
Marshall Greenblatt 213c0280e9 cefclient: Add RootWindowManager tracking of other browsers (see #3790)
The message loop should not quit until all browsers have closed,
including browsers that are not directly associated with a RootWindow.
2024-11-04 17:12:31 -05:00
Marshall Greenblatt be11f21131 Free CefMenuRunnerViews on BrowserView destruction (see #3790)
CefMenuRunnerViews holds a raw_ptr<CefBrowserViewImpl> that must be
cleared during CefBrowserViewImpl destruction.
2024-11-04 17:09:01 -05:00
Marshall Greenblatt 43fc50a89e mac: Fix accelerators in overlay BrowserView (see #3188)
CefWindowImpl::CanHandleAccelerators was returning false for
accelerators triggered in the overlay BrowserView due to
IsWindowKey (called from NativeWidgetMac::IsActive) returning
false. View::CanHandleAccelerators, on the other hand, only
checks IsActive for Aura (non-MacOS) windows. We therefore
delegate to the View implementation for consistent handling.
2024-11-04 14:17:37 -05:00
Marshall Greenblatt 0255c2e7ac Execute HandleExternalProtocolHelper on the UI thread (fixes #3821) 2024-11-04 11:44:48 -05:00
Marshall Greenblatt a05b959543 win: Disable TcpSocketIoCompletionPortWin feature
This feature breaks embedded test servers. See
https://crbug.com/40287434#comment36 for background.
2024-10-25 13:15:34 -04:00
Marshall Greenblatt 173a2f4a58 Update to Chromium version 131.0.6778.0 (#1368529) 2024-10-24 14:50:11 -04:00
Nik Pavlov 5d817b20a6 Update to Chromium version 131.0.6768.0 (#1366576)
mac: Switch to Xcode 16.0 16A242d with macOS SDK 15.0 24A336
2024-10-24 11:24:17 -04:00
Marshall Greenblatt e3a8741563 linux: Disable 'duplicate symbol' linker errors
These linker errors impact CEF builds but not Chromium builds due
to differences in application structure, and are becoming more
common with ongoing Chromium code refactoring.

When running via ASAN it may be necessary to set
`ASAN_OPTIONS=detect_odr_violation=0` to work around
https://github.com/google/sanitizers/issues/1017
2024-10-23 18:39:19 +00:00
Marshall Greenblatt ed38bd3302 win: Revert screen_1443650 changes (fixes #3744)
This change broke tooltip display at 125% scale factor on Windows 10
with high-dpi display.

Reopening the original issue #3489.
2024-10-23 14:29:08 -04:00
Michael Bragg a787036a8a Add CefFrame::PasteAndMatchStyle 2024-10-23 13:24:10 -04:00
Hunter Laux fc20e76d3b Implement OnSelectClientCertificate (fixes #3789) 2024-10-23 13:09:32 -04:00
Marshall Greenblatt 030272fe4c mac: cefclient: Fix window.close() with --hide-window-on-close (fixes #3660) 2024-10-22 16:17:54 -04:00
Marshall Greenblatt 00e9b561f8 Fix raw_ptr leak of main frame RFH during WebContents close (see #3660) 2024-10-22 16:08:55 -04:00
Mike Bragg 02fec23bc8 Implement PrintCrossProcessSubframe for AlloyBrowserHostImpl (fixes #3768) 2024-10-22 20:05:16 +00:00
Marshall Greenblatt 323cbdc5ea win: Add SHA256 impl for Sid::FromNamedCapability (fixes #3791)
The cef_sandbox build can't use the default BoringSSL implementation
so we add an alternative implementation using the Crypto API.
2024-10-22 13:17:01 -04:00
Marshall Greenblatt 6f44cfcb65 linux: Fix callbacks to CefPrintHandler (fixes #3729)
Out-of-process printing must also be disabled by passing
`--disable-features=EnableOopPrintDrivers`.
2024-10-18 11:51:08 -04:00
Marshall Greenblatt da7e19d0ea cefclient: views: Add ability to pop out the overlay Browser (see #3790)
When running with the overlay Browser enabled (`--show-overlay-browser`),
pressing Alt+O will move the overlay Browser to a new top-level Window.
Pressing Alt+O again or closing the new Window via the close button will
return the Browser to the overlay. Closing the Browser via `window.close()`
(in the new Window or overlay) will dismiss the overlay completely as
required to maintain consistent internal state. Detection of this state is
supported by the new CefBrowserHost::IsReadyToBeClosed method.

Draggable regions in the main Browser are updated to account for the
presence or absence of the overlay Browser. Support for draggable regions
in the overlay Browser in not implemented in cefclient.

Behavior with multiple overlays, `window.close()` and draggable regions
can be tested by adding `--hide-frame --hide-controls`.
2024-10-17 12:21:07 -04:00
Marshall Greenblatt 6e05c14db2 chrome: Support unload handlers with TryCloseBrowser
TryCloseBrowser should potentially trigger JavaScript unload handlers
and return false. Add CefBrowserHost::IsReadyToBeClosed for detecting
mandatory close state. Enable, for Chrome style browsers, LifeSpanTest
that don't require DoClose(). Update related documentation.
2024-10-17 11:06:08 -04:00
Marshall Greenblatt 265a733807 views: Fix dangling raw_ptr on CefToolbarViewView destruction 2024-10-15 17:53:39 -04:00
Marshall Greenblatt 6036df047f views: cefclient: Fix crash when ID_MENU_BUTTON doesn't exist 2024-10-15 17:53:39 -04:00
Marshall Greenblatt 884b582789 views: Trigger CefBrowser destruction on CefBrowserView release (see #3790)
Avoid a circular ownership dependency between CefBrowserViewImpl and
CefBrowserPlatformDelegate[Chrome]Views (owned by CefBrowserHostBase).
Trigger CefBrowserHostBase destruction when the last CefBrowserViewImpl
reference is released.

This fixes a number of shutdown crashes related to overlay CefBrowsers
still existing at CefShutdown.
2024-10-15 15:44:13 -04:00
Marshall Greenblatt 66105a5417 Add CefRefCount::SubtleRefCountForDebug
Helper for debugging refcount-related issues.
2024-10-15 14:30:26 -04:00
Marshall Greenblatt b974438cfc Fix DiscardableSharedMemoryManager destruction timing
Move DiscardableSharedMemoryManager destruction to the end of UI thread
shutdown, after Mojo messages have stopped arriving. See related comments
at https://chromium-review.googlesource.com/c/chromium/src/+/5925441
2024-10-15 14:30:26 -04:00
Marshall Greenblatt 1bc1ca15d5 cefclient: views: Add overlay BrowserView demo (see #3790)
Adds new `--show-overlay-browser` command-line flag that creates an
overlay containing an Alloy-style BrowserView.  The main BrowserView
may be Chrome- (default) or Alloy-style (add `--use-alloy-style`).
This overlay will only be added to standalone (non-popup) windows.

Popups triggered via the overlay will receive standard Alloy-style
handling in cefclient (e.g. Views-hosted window). Add
`--use-default-popup` for default popup handling.
2024-10-15 14:30:26 -04:00
Marshall Greenblatt e23bf31bf4 views: Fix style calculation for popup BrowserViews (fixes #3499)
Don't depend on a CefBrowserViewDelegate for popup BrowserView style.
Popup style must always match the opener style.
2024-10-15 14:30:26 -04:00
Nik Pavlov 0a627230ac views: Fix overlay bounds outside of window (fixes #3457) 2024-10-15 18:28:13 +00:00
Marshall Greenblatt f94ac23e52 wrapper: Add missing algorithm include (fixes #3804) 2024-10-15 14:05:14 -04:00
Nik Pavlov 745a4d6e3b ceftests: Simplify ViewsWindowTest.WindowAccelerator test (see #3188)
Remove the CefWindowDelegate::OnKeyEvent check as that method
is not currently triggered with the Chrome runtime (see #3797).
2024-10-15 18:01:11 +00:00
Nik Pavlov 29ef97d6b5 mac: views: Always initialize CommandDispatcher (see #3188)
ChromeCommandDispatcherDelegate forwards accelerator events to
the FocusManager through NativeWidgetMacNSWindowHost::
HandleAccelerator. Always initialize it so that accelerators also
work in a CefWindow without a BrowserView.
2024-10-15 17:58:23 +00:00
Marshall Greenblatt a231b7ead7 cefclient: Fix toolbar visibility with --hide-controls (fixes #3745) 2024-10-04 09:57:45 -04:00
Marshall Greenblatt e5bc3c9255 Update generated files for void* return value (see #3591) 2024-10-04 09:22:22 -04:00
Marshall Greenblatt 330534a2e7 tools: translator: Add void* return value support (fixes #3591) 2024-10-04 09:22:22 -04:00
Marshall Greenblatt 467a0d6a85 tools: automate: Fail early if directory can't be renamed (fixes #2502) 2024-10-04 09:22:22 -04:00
Marshall Greenblatt 2b6f461337 cefbuilds: Add channel matching for file records 2024-10-02 13:25:39 -04:00
Marshall Greenblatt abfc029a01 Fix dangling ptr in RenderProcessHostTaskProvider (fixes #3758) 2024-09-30 12:17:33 -04:00
Marshall Greenblatt ac71a0e9f2 cmake: Fix set_property argument (fixes #3775) 2024-09-27 16:12:42 -04:00
Marshall Greenblatt cd052ec7c3 Update to Chromium version 130.0.6723.0 (#1356013) 2024-09-27 14:15:44 +00:00