Commit Graph

1172 Commits

Author SHA1 Message Date
Jacobo Aragunde Pérez 6459917c0a Fix index out of bounds with dialog accept_types description (fixes #3779) 2024-09-16 09:08:22 +00:00
Nik Pavlov b90f0048da Account for overlay host Widget in CefWidget::GetForWidget (fixes #3784) 2024-09-16 09:05:42 +00:00
Nik Pavlov af1f40a2d3 Update to Chromium version 129.0.6668.0
- Mac: Minimum system version is now 11.0.
- Win: Windows SDK version is now 10.0.22621.2428.
2024-08-26 12:44:25 +00:00
Marshall Greenblatt 701c9470f2 Route Download bubble file open to OnOpenURLFromTab (fixes #3750)
Some downloaded file types [1] default to opening in a Browser. Open
requests for these file types originating from the Download bubble UI
should route to the source Browser (call OnOpenURLFromTab). If
OnOpenURLFromTab is unhandled proceed with the default Chrome behavior
of opening the URL in a new default Browser.

[1] PDF, html, etc. For the complete list of file types see
ChromeDownloadManagerDelegate::IsOpenInBrowserPreferredForFile.
2024-08-09 12:07:00 -04:00
Marshall Greenblatt ebb3c962da Add WebUI allowlist for Alloy-style browsers (fixes #3763) 2024-08-07 14:12:31 -04:00
JC Yang bed7f420aa Fix dangling ptr in ReadResponseCallbackWrapper (fixes #3760) 2024-08-05 12:36:28 -04:00
Loic Frasse-Mathon 785713c4cc posix: Added option to disable signal handlers
See https://github.com/chromiumembedded/java-cef/issues/477
2024-08-05 12:36:28 -04:00
Pedro de Carvalho Gomes b61c106b6b linux: Add CefWindowDelegate::GetLinuxWindowProperties (fixes #3383) 2024-08-05 12:36:28 -04:00
Marshall Greenblatt 446b7d6535 Update to Chromium version 128.0.6613.0 (#1331488) 2024-07-30 11:10:09 -04:00
Marshall Greenblatt 69b884d39c Add CefTaskManager::GetTaskIdForBrowserId
Update https://tests/task_manager to show the current browser's
renderer task in bold.


Approved-by: Nik Pavlov
2024-07-19 15:19:06 +00:00
Marshall Greenblatt 3acdbac061 Use direct member for CefBrowserHostBase::contents_delegate_
There's no reason to use unique_ptr here as the lifespan of
|contents_delegate_| exactly matches CefBrowserHostBase.
2024-07-18 13:50:40 -04:00
Nik Pavlov d470cf8204 Add CefTaskManager API
See https://tests/task_manager example in cefclient.
2024-07-18 11:34:41 -04:00
Marshall Greenblatt 69fbadd0bc Disable dangling ptr check for PendingRequest::request_ (fixes #3743)
The InterceptedRequestHandlerWrapper object may be deleted (likely via
~InterceptedRequest) while the task to call
InterceptedRequestHandlerWrapper:ContinueCreateURLLoaderNetworkObserver
is still pending. That binding holds a
WeakPtr<InterceptedRequestHandlerWrapper> (which is now nullptr)
resulting in the bound std::unique_ptr<PendingRequest> being deleted
while still holding a raw_ptr<network::ResourceRequest> to the
already-deleted object. This is always safe (raw_ptr will never be
dereferenced) because of the WeakPtr check.
2024-07-17 14:35:33 -04:00
Marshall Greenblatt 60ce575e53 Remove libcef/features/runtime.h (see #3685)
Use BUILDFLAG(ENABLE_CEF) exclusively in patch files.
2024-07-05 13:24:40 -04:00
Marshall Greenblatt 0d166c3c90 mac: Remove chrome_crash_reporter_client_stub.cc
Compile out the call to ChromeCrashReporterClient::Create() instead.
2024-07-05 12:28:47 -04:00
Marshall Greenblatt 9b284ec8f7 Remove custom chrome scheme handling (see #3685)
- Add CEF info to existing chrome://version WebUI.
- Move chrome://license handling to WebUI.
- Remove chrome://webui-hosts; use chrome://chrome-urls instead.
- Remove chrome://extension-support; navigate to docs directly instead.
2024-07-05 11:58:08 -04:00
Marshall Greenblatt 1cdf02815e Remove devtools window runner abstraction (see #3685)
Remove code abstractions that are no longer required after deletion of
the Alloy bootstrap. This is a functional no-op.
2024-07-05 11:58:08 -04:00
Marshall Greenblatt cd3f617171 Rename browser_util to browser_event_util (seee #3685)
Use more specific file naming. This change is a functional no-op.
2024-07-03 12:16:26 -04:00
Marshall Greenblatt bd57a40256 Rename browser_extensions_util to browser_guest_util (seee #3685)
After Alloy bootstrap deletion the remaining functions are no longer
related to extensions. This change is a functional no-op.
2024-07-03 12:16:26 -04:00
Marshall Greenblatt c0a3c897cf Remove main runner abstractions (see #3685)
Remove code abstractions that are no longer required after deletion of
the Alloy bootstrap. This is a functional no-op.
2024-07-03 12:16:26 -04:00
Marshall Greenblatt a461a89728 Delete Alloy bootstrap (fixes #3685) 2024-07-01 12:32:14 -04:00
Marshall Greenblatt c4a6797059 Allow dangling Listener in CefFileDialogManager (fixes #3720) 2024-06-25 14:03:58 -04:00
Marshall Greenblatt ebb99fbd58 Fix dangling ResourceRequest* (fixes #3719)
Add raw_ptr<network::ResourceRequest> to RequestState instead of
passing ResourceRequest* as a bound parameter.
2024-06-21 16:54:02 -04:00
Marshall Greenblatt 1d7e83336f Allow dangling UnretainedWrapper for ResourceRequest* (fixes #3717)
Change UnretainedWrapper traits from MayNotDangle (default) to
MayDangleUntriaged as a short-term fix.
2024-06-21 12:57:13 -04:00
Yuta Sekiguchi 2a19d3dc57 Rewrite raw pointers reported by clang plugin (see #3239)
Found using a CEF build with clang_use_chrome_plugins=true
and treat_warnings_as_errors=false.

This change rewrites remaining raw pointers reported by
chromium-rawptr checker and fixes a build error reported
by StackAllocatedChecker.
2024-06-21 11:29:23 -04:00
Marshall Greenblatt 810c51026c Fix assertions with Save As dialog
Fixes some issues introduced by 8e79307a62 (see #3314) and
6354d8daf1 (see #3239).

To test:
- Run `cefclient --url=chrome://net-export`
- Click the "Start Logging to Disk" button
- Exit cefclient; get no debug assertions
2024-06-20 14:04:02 -04:00
Marshall Greenblatt 5afde67593 chrome: Fix CHECK when switching from kPrerendering to kActive
In this case |render_frame_| is not bound, |render_frame_host_| is
non-nullptr and |render_frame_host| equals |render_frame_host_| in
CefFrameHostImpl::MaybeReAttach when called from
CefBrowserInfo::FrameHostStateChanged.
2024-06-20 12:09:46 -04:00
Marshall Greenblatt 3b98dbda79 posix: Always resolve symlinks to absolute paths
This avoids issues with mismatched paths when mixing Chromium and
OS filesystem functions. See https://crbug.com/40229712.
2024-06-20 12:09:46 -04:00
Marshall Greenblatt c44aa35bfc Update to Chromium version 127.0.6533.0 (#1313161) 2024-06-20 12:09:46 -04:00
Marshall Greenblatt fe24ce3c71 chrome: Add cleanup when context menu isn't running (fixes #3711)
The menu may not be running in the following cases:

- If the menu is empty (e.g. cleared in OnBeforeContextMenu).
- If the menu is disabled (see e.g. RenderViewContextMenuViews::Show).
- When the run call blocks until the menu is dismissed (macOS behavior).

We explicitly clean up in these cases instead of waiting for OnMenuClosed
which will otherwise never be called for the first 2 cases.

Menu run status is exposed via new ContextMenuDelegate and
RenderViewContextMenuBase methods.
2024-06-13 13:38:41 -04:00
Marshall Greenblatt cc40cbdd45 alloy: Move warning after logging init (fixes #3713) 2024-06-10 11:03:35 -04:00
Marshall Greenblatt 47798d3dbf Fix potential dangling PendingRequest::request_ (see #3239)
See https://magpcss.org/ceforum/viewtopic.php?f=6&t=19802 for error.
2024-06-04 14:11:59 -04:00
Yuta Sekiguchi e4bb51f6f6 chrome: Add CefJSDialogHandler support (fixes #3702) 2024-06-04 12:19:14 -04:00
Marshall Greenblatt 8e79307a62 Pass mime type values as file dialog accept filters (see #3314)
File dialogs that specify mime type (e.g. "image/*") accept filters will pass
those values unchanged to the OnFileDialog |accept_filters| parameter. The
default dialog implementation will show those filters in addition to a combined
"Custom Files" filter. This is a change from preexisting Google Chrome
behavior where only the combined "Custom Files" filter is displayed, and
restores CEF behavior that existed prior to 2ea7459a89.

Document the fact that OnFileDialog may be called twice, once before MIME type
expansion and once afterwards.

Add new OnFileDialog |accept_extensions| and |accept_descriptions| parameters
for MIME type extensions and descriptions.

Details: This change adds a SelectFileDialog::FileTypeInfo::extension_mimetypes
member and improves the logic in FileSelectHelper::GetFileTypesFromAcceptType
and file_dialog_manager.cc SelectFileToFileChooserParams to support recall of
the source mime type when populating the FileChooserParams structure.

To test:
- Run `ceftests --gtest_filter=DialogTest.*`
- Run `cefclient --url=https://tests/dialogs`
2024-05-30 15:38:36 -04:00
Marshall Greenblatt bd1e188c77 tests: Fix SchemeHandlerTest failure with ReduceAcceptLanguage trial 2024-05-26 13:45:29 -04:00
Marshall Greenblatt 701fc03f00 Update to Chromium version 126.0.6478.0 (#1300313) 2024-05-26 13:45:29 -04:00
pkv bc1b856b96 alloy: Fix audio capturer crash on exit (fixes #3689) 2024-05-21 17:58:13 +00:00
Marshall Greenblatt 5a2cfb6907 osr: Support DevTools windows with Chrome runtime Alloy style (see #3681) 2024-05-21 12:56:48 -04:00
Marshall Greenblatt 6354d8daf1 Fix dangling raw_ptr errors and related issues (see #3239)
- Use raw_ptr in class container fields.
- Use defined lifespan for StreamReaderURLLoader.
- Fix lifespan assumptions for WebContents/RFH usage.
2024-05-21 12:56:47 -04:00
Marshall Greenblatt 0170f431a0 Apply raw_ptr rewrite to libcef (see #3239) 2024-05-11 12:47:10 -04:00
Marshall Greenblatt 271c6f6446 Fix credentials mode for fetch request redirect (fixes #3675)
Also verified that https://browseraudit.com/ gives the same results
both with and without `--disable-request-handling-for-testing`.
2024-05-06 15:10:12 -04:00
Marshall Greenblatt 311eaf827e alloy: Add missing geolocation pref registration (fixes #3694) 2024-05-06 11:58:55 -04:00
Marshall Greenblatt 4e3668f93a chrome: Support CefSettings logging config (see #3685)
Also enables logging by default for Release builds (previously
required the `--enable-logging` flag). Logging can still be
disabled by passing the `--disable-logging` flag.
2024-05-02 19:43:39 -04:00
Marshall Greenblatt 29381355ef chrome: Support CefSettings path config (see #3685) 2024-05-02 19:43:39 -04:00
Marshall Greenblatt 7328b9e40d views: Support themes for Alloy BrowserView in Chrome Window (see #3681)
To test:
- Run `cefclient --enable-chrome-runtime --use-alloy-style
                 --use-chrome-style-window [--background-color=green]`
- OS and Chrome theme changes behave as expected.
2024-05-02 11:21:49 -04:00
Marshall Greenblatt 49a34d9160 Apply new Chromium style for #include sorting
Add "cef/" prefix for CEF #includes in libcef/ directory.

Sort #includes by following
https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
2024-05-01 14:34:32 -04:00
Marshall Greenblatt b5d84c254d Add GN arg to disable Alloy bootstrap (see #3681, see #3685)
Set enable_alloy_bootstrap=false to build with Alloy bootstrap code
removed. Extension API is documented as deprecated in comments but
not compiled out with this arg.
2024-05-01 14:34:21 -04:00
Marshall Greenblatt fe5b0dd668 chrome: osr: Fix performance manager init (see #3681) 2024-04-27 15:36:59 -04:00
Marshall Greenblatt be6642df3f chrome: Add CefDownloadHandler support (see #3681)
Behaves the same as Alloy runtime except that CanDownload is not
called for invalid protocol schemes.
2024-04-27 15:36:58 -04:00
Marshall Greenblatt ed079792b6 chrome: Add extension support for Alloy style browsers (see #3681)
This change adds minimal tabs API support for Alloy style browsers.
Clicking links in PDF documents now navigate as expected.
2024-04-27 15:36:58 -04:00