Commit Graph

1691 Commits

Author SHA1 Message Date
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 889cfcf8d1 Fix path override ordering (fixes #3749)
The chrome::DIR_RESOURCES and ui::DIR_LOCALES overrides need to be
configured before calling ChromeMainDelegate::PreSandboxStartup.
2024-08-08 13:39:22 -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
Nik Pavlov 295ea1f715 Enable V8 sandbox by default (fixes #3332)
When the V8 sandbox is enabled, ArrayBuffer backing stores must be
allocated inside the sandbox address space. This change introduces a new
CefV8Value::CreateArrayBufferWithCopy method that copies the memory
contents into the sandbox address space.

Enabling the V8 sandbox can have a performance impact, especially when
passing large ArrayBuffers from C++ code to the JS side. We have therefore
retained the old CefV8Value::CreateArrayBuffer method that references
external memory. However, this method can only be used if the V8 sandbox is
disabled at CEF/Chromium build time.

To disable the V8 sandbox add `v8_enable_sandbox=false` to
`GN_DEFINES` when building CEF/Chromium.
2024-08-05 16:00:58 +00: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 b080705ec8 Remove empty runtime_checks.h (see #3685) 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
Nik Pavlov 231701d98b Expose DumpWithoutCrashing (fixes #3588) 2024-07-02 18:08:16 +00: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 fd7444c7a4 win: Enable WinSboxNoFakeGdiInit for Debug component builds (see #3708)
The WinSboxNoFakeGdiInit feature requires delayload of all DLLs that
might load user32.dll in the renderer process. It's enabled as a field
trial for all non-Official builds, but caused problems with Debug
component builds using VS 17.5.0 due to MSVCP140D.dll depending on
OLE32.DLL (which depends on user32.dll). The dependency on OLE32.DLL
is removed with VS 17.9.2 so the feature can now be enabled.

See https://crbug.com/326277735#comment39 for background.
2024-06-04 11:56:12 -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 5fe6382906 cefclient: win: Fix delayload of user32.dll
The WinSboxNoFakeGdiInit feature requires delayload of all DLLs that
might load user32.dll in the renderer process. It's enabled as a field
trial for all non-Official builds, but appears to only work with
non-component Release builds. See https://crbug.com/326277735
2024-05-26 13:45:30 -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 ca636bb96e chrome: Support CefResourceBundleHandler (see #3685) 2024-05-03 12:51:09 -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