Commit Graph

3026 Commits

Author SHA1 Message Date
Nik Pavlov d470cf8204 Add CefTaskManager API
See https://tests/task_manager example in cefclient.
2024-07-18 11:34:41 -04:00
Marshall Greenblatt cbbca050e0 cefclient: Allow download with --hide-controls (fixes #3742) 2024-07-17 15:06:23 -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 4023fea237 cefbuilds: Add tools distribution (see #3734) 2024-07-16 12:43:12 -04:00
Marshall Greenblatt 5607a4d347 distrib: Add new tools distribution for mksnapshot (see #3734) 2024-07-16 12:43:12 -04:00
Marshall Greenblatt 8f4a47479c mac: cefclient: Fix zombie NSWindow object on exit (fixes #3602)
- Don't create a TempWindow when using Views.
- Don't call `close` on an NSWindow that is never opened.
2024-07-15 16:44:38 -04:00
Marshall Greenblatt 02ea88f79f Call SetIsShutdown after CefInitialize (fixes #3738)
Delay shutdown checking until after CefInitialize has drained existing
task pools.
2024-07-15 16:44:38 -04:00
Marshall Greenblatt ddb0ab8187 Fix DCHECK adding menu separator with hidden items (fixes #3577) 2024-07-15 12:20:43 -04:00
Marshall Greenblatt ed4257c807 Fix duplicate open from DevTools when handling OnOpenURLFromTab (fixes #3735) 2024-07-11 14:33:55 -04:00
Marshall Greenblatt b7a172fefc tools: Build using autoninja
Applies automatic `-j (#cores)` configuration
2024-07-11 10:17:21 -04:00
Marshall Greenblatt 68e1fcf3a4 tools: win: Remove dynamic_annotations.lib from cef_sandbox
This library was removed in https://crbug.com/40209570.
2024-07-10 12:35:47 -04:00
Marshall Greenblatt 1f35258023 Include debug symbols for all distributed binaries (fixes #2235) 2024-07-08 12:18:01 -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
Nik Pavlov b95b3e6fd5 tools: Fix "invalid escape sequence '\s'" warning 2024-07-01 15:12:35 +00: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 4ed13d8c47 views: Add missing patched files (see #3711) 2024-06-13 18:07:59 -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
Julian Waller 7c19cb90e1 cmake: Skip docs generation if the Doxyfile is missing
The Doxyfile is not included with minimal distributions.
2024-06-06 13:54:11 +00: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 c56ae7213e cefclient: linux: Fix gcc -Werror=parentheses (see #3314) 2024-06-04 11:19:50 -04:00
Marshall Greenblatt cb1830e16c win: Fix undefined symbol with cef_sandbox and VS 17.9.2 (see #3708)
This avoids a bug in clang + MSVC STL when using the default three-way
comparison operator with base::TimeDelta. The compiler does not throw
away the function call to the `std::_Literal_zero_is_expected` symbol,
which is deliberately undefined.

See also https://github.com/microsoft/STL/issues/4359#issuecomment-2042911928
2024-06-03 14:01:14 -04:00
Marshall Greenblatt 39cafe3e6c tests: Fix URLRequestTest failure with ReduceAcceptLanguage trial 2024-05-31 22:53:09 -04:00
Marshall Greenblatt 15c7e80e3c cefclient: win: Fix MSVC compile error 2024-05-31 13:28:33 -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 b0bceecba9 Add cef_sandbox dependency on make_config_header (see #3685) 2024-05-26 13:45:30 -04:00
Marshall Greenblatt b6842f8b80 Remove unused cef_ptr_util.h 2024-05-26 13:45:30 -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 c7b30ee80f cefclient: win: Fix crash on close with --use-native (see #3239)
OnBeforeClose notification is delivered via TabModel destruction in
TabStripModel::SendDetachWebContentsNotifications. We need to let
that call stack unwind before triggering TabStripModel destruction
via closure of the native host window.
2024-05-21 12:58:28 -04:00