Commit Graph

97 Commits

Author SHA1 Message Date
Marshall Greenblatt e6a96e2bec chrome: views: Fix close of popup windows when parent is destroyed
When running ceftests with Views enabled always close the CefWindow
when the browser is destroyed and wait for both CefBrowser and
CefWindow destruction before signaling test completion.

To test:
Run `ceftests --enable-chrome-runtime --use-views
     --gtest_filter=FrameHandlerTest.OrderMainPopup*:RequestContextTest.PopupNavDestroyParent*`
2023-10-17 11:48:11 -04:00
Marshall Greenblatt a8a96235a8 chrome: Set prefs for accept_language_list on Profile init (fixes #3579) 2023-10-05 16:43:45 -04:00
Marshall Greenblatt 29938f9cb0 Add new CanZoom/Zoom API (fixes #3284)
Add a simpler CanZoom/Zoom API as an alternative to the more error-prone
SetZoomLevel/GetZoomLevel API. Both APIs are now implemented for both runtimes.
With the Chrome runtime a zoom notification bubble will be displayed unless
CefBrowserSettings.chrome_zoom_bubble is set to STATE_DISABLED.

To test:
- Run cefclient and select zoom entries from the Tests menu.
- chrome: Run cefclient with `--hide-chrome-bubbles` command-line flag to hide
  the zoom notification bubble.
2023-10-05 13:22:44 -04:00
Marshall Greenblatt 39e64d8cc9 chrome: Standardize fullscreen transition behavor/callbacks (fixes #3571)
Use the same code path for all fullscreen transitions so that Chrome UI updates
correctly. All user-initiated fullscreen transitions now result in
CefWindowDelegate::OnWindowFullscreenTransition callbacks.
2023-09-28 17:44:35 -04:00
Marshall Greenblatt 27c6a4eabc Update to Chromium version 118.0.5993.0 (#1192594) 2023-09-20 12:07:47 -04:00
Marshall Greenblatt ef6ae3071d chrome: Support frameless document PiP window with draggable regions (fixes #3566) 2023-09-14 12:41:24 -04:00
Marshall Greenblatt f808926fbd chrome: Add support for CefBrowserViewDelegate::OnGestureCommand 2023-08-31 13:28:27 -04:00
Marshall Greenblatt 8b46735b79 Update to Chromium version 117.0.5895.0 (#1171312) 2023-07-20 18:11:34 -04:00
Marshall Greenblatt 650755a092 Update to Chromium version 116.0.5845.0 (#1160321) 2023-06-28 11:43:11 +03:00
Marshall Greenblatt dc9e64308a Replace NOTREACHED() with DCHECK(false) (fixes #3500)
Restores the old behavior of assertion in Debug build only.
2023-05-08 18:36:00 +03:00
Marshall Greenblatt ab94a13522 Update to Chromium version 114.0.5735.0 (#1135570)
- Mac: 13.3 SDK (Xcode 14.3) is now supported (see https://crbug.com/1431897).
- Mac: Removed UnderlayOpenGLHostingWindow which is no longer used.
2023-05-05 22:53:16 +03:00
Marshall Greenblatt 09c4142dad chrome: mac: Add Alerts helper app (fixes #3181)
Some Chromium code cleanup will follow in
https://chromium-review.googlesource.com/c/chromium/src/+/4456752
2023-04-21 14:39:19 -04:00
Marshall Greenblatt 7ade772e0b chrome: mac: Support dispatch of window commands (see #3462) 2023-04-20 12:26:07 -04:00
Marshall Greenblatt a39c2a0068 chrome: Improve positioning of the "Find" widget (fixes #3461)
The "Find" widget will be excluded from regions near the edges of the window
that contain overlays, draggable regions or titlebar.
2023-04-20 12:26:07 -04:00
Marshall Greenblatt 14dd0c0d06 chrome: Add ability to hide toolbar and app menu contents (see issue #3280)
This change adds new CefCommandHandler callbacks for optionally hiding
specific Chrome toolbar icons, buttons and app menu items.

To test: Run `cefclient --enable-chrome-runtime --filter-chrome-commands`.
Most icons, buttons and app/context menu items will be hidden.
2023-03-08 12:02:49 -05:00
Marshall Greenblatt d509d5833d chrome: Don't show gray background during browser load (fixes issue #3459) 2023-03-06 15:55:55 -05:00
Marshall Greenblatt 584b19967a Update to Chromium version 112.0.5615.0
- Windows: VS2022 and Win11 SDK 10.0.22621.0 are now required.
2023-03-03 09:59:30 -05:00
Marshall Greenblatt 80cfb3c97c chrome: Fix request interception with active extension (fixes issue #3444)
Support chaining of proxies in WillCreateURLLoaderFactory.
2023-02-17 15:18:10 -05:00
Marshall Greenblatt 73082fd2ce chrome: Make primary user profile the default global context (see issue #3444)
Chrome is always loading the primary user profile by default, so with this
change the CEF behavior more accurately reflects reality. Incognito contexts
can still be created explicitly via CefRequestContext::CreateContext.

Prior to this change, the default for the global context was an Incognito
profile based on the primary user profile. That caused request interception
to be bypassed in WillCreateURLLoaderFactory for profiles associated with
the "New window" and "New incognito window" commands. Those profiles, while
also being (or based on) the primary user profile, did not match the specific
Incognito profile assigned to the default global context.

After this change, the "New window" and "New incognito window" commands will
match the default global context when executed on a browser that was created
using the primary user profile.
2023-02-17 14:36:13 -05:00
Marshall Greenblatt ff68c01543 chrome: Use default Browser creation for picture-in-picture popups (see issue #3448)
Note: In current master (based on M111), document PiP partially works when
run with the `--enable-features=DocumentPictureInPictureAPI` command-line
flag. However, the document PiP implementation at this Chromium version is
missing fixes that have already been cherry-picked to the 5563 release
branch. Those fixes will only be available in master after the next Chromium
update (to M112).
2023-02-10 15:42:37 -05:00
Marshall Greenblatt dc2231cdfb Update to Chromium version 111.0.5563.0 (#1097615) 2023-02-03 13:00:26 -05:00
Marshall Greenblatt d04b5d4f87 Update to Chromium version 110.0.5481.0 (#1084008) 2023-01-04 21:36:29 -05:00
Marshall Greenblatt 3af3eab3e4 Update source files for bracket style 2023-01-04 17:47:17 -05:00
Marshall Greenblatt 25c75c5fc4 Use new PrintViewManagerBase::PrintToPdf method (fixes issue #3377) 2022-10-14 14:10:30 -04:00
Marshall Greenblatt 4d1fd05740 Update to Chromium version 107.0.5304.0 (#1047731) 2022-09-29 13:09:35 -04:00
Marshall Greenblatt 5dc69c6cdb alloy: Remove optimization/prediction service usage (see issue #3352)
This service is required by the "PermissionOnDeviceNotificationPredictions"
feature which is enabled by default in https://crbug.com/1350956. It uses a
Google backend service as described at https://go.dev/solutions/google/chrome.

This change removes the usage of PredictionBasedPermissionUiSelector, which
triggered this dependency, along with related startup complexity that was added
to support the optimization/prediction service in the M106 update.
2022-08-25 14:09:20 -04:00
Marshall Greenblatt 7659dd60ba Update to Chromium version 106.0.5249.0 (#1036826) 2022-08-25 14:09:20 -04:00
Marshall Greenblatt 0ddb572c03 chrome: Add support for CefRequestHandler::OnCertificateError (see issue #3148) 2022-08-09 15:43:00 -04:00
Marshall Greenblatt e9f29ab3d6 Update to Chromium version 105.0.5176.0 (#1023155) 2022-07-22 13:31:29 -04:00
Marshall Greenblatt f1003df810 chrome: Add support for OnRequestMediaAccessPermission callback (see issue #2582) 2022-07-08 07:40:35 +00:00
Marshall Greenblatt e4b9169221 Add CefPermissionHandler callbacks for permission prompts (see issue #3352) 2022-07-07 10:01:24 +00:00
Marshall Greenblatt 35654cd709 alloy: Use Chrome JS dialogs on Windows/Linux (fixes issue #3316) 2022-06-03 22:45:23 +03:00
Marshall Greenblatt 185a908811 Update to Chromium version 103.0.5060.0 (#1002911) 2022-05-20 19:39:32 +03:00
Marshall Greenblatt 7a372a642b alloy: Use Views context menus on Windows/Linux (fixes issue #3330) 2022-05-20 14:15:17 +03:00
Marshall Greenblatt c04895b222 chrome: Implement GetWindowHandle() for --multi-threaded-message-loop (see issue #3294) 2022-04-19 18:52:26 -04:00
Marshall Greenblatt 2ea7459a89 Use Chrome file dialogs on all platforms and runtimes (fixes issue #3314)
All file dialogs irrespective of source, platform and runtime will now be
routed through CefFileDialogManager and trigger CefDialogHandler callbacks
(see issue #3293).

Adds Chrome runtime support for CefBrowserHost::RunFileDialog and
CefDialogHandler callbacks.

Adds Alloy runtime support for internal GTK file and print dialogs on Linux
subject to the following limitations:

1. Internal GTK implementation:
   - Cannot be used with multi-threaded-message-loop because Chromium's
     internal GTK implementation is not thread-safe (does not use GDK threads).
   - Dialogs will not be modal to application windows when used with off-screen
     rendering due to lack of access to the client's top-level GtkWindow.
2. Cefclient CefDialogHandler implementation:
   - Cannot be used with Views because it requires a top-level GtkWindow.

Due to the above limitations no dialog implementation is currently provided for
Views + multi-threaded-message-loop on Linux. In cases where both
implementations are supported the cefclient version is now behind an optional
`--use-client-dialogs` command-line flag.

Expressly forbids multiple simultaneous file dialogs with the internal platform
implementation which uses modal dialogs. CefDialogHandler will still be notified
and can optionally handle each request without a modal dialog (see issue #3154).

Removes some RunFileDialog parameters that are not supported by the Chrome file
dialog implementation (selected_accept_filter parameter, cef_file_dialog_mode_t
overwrite/read-only flags).
2022-04-19 18:52:26 -04:00
Marshall Greenblatt 17cb26b8b9 Remove compile-time checks for toolkit_views
The toolkit_views=true setting is supported (and now required) on all platforms.
2022-04-12 12:06:53 -04:00
Marshall Greenblatt a0a7a35fe2 chrome: Change popup default behavior with native parent (see issue #3294)
When using a Views-hosted browser window the client receives Views-related
callbacks for popups and can thereby customize the Views-hosted popup behavior.
When using an external parent window no Views-related callbacks are delivered
and customization options are restricted to providing a new parent handle via
OnBeforePopup. Consequently, we should default to a normal browser window in
the external parent case instead of the very minimial Views-hosted default.

To test (A):
1. Run `cefclient --use-default-popup --enable-chrome-runtime --use-native`
2. Select Tests > Popup Window
3. Get a normal Chrome browser window

To test (B):
1. Run `cefclient --use-default-popup [--enable-chrome-runtime] [--use-views]`
2. Select Tests > Popup Window
3. Get a native or Views-hosted browser window with title bar only
2022-04-12 12:06:52 -04:00
Marshall Greenblatt 3000bc8748 chrome: win/linux: Add support for browser with native parent (see issue #3294)
This change adds Chrome runtime support on Windows and Linux for creating a
browser parented to a native window supplied by the client application.
Expected API usage and window behavior is similar to what already exists with
the Alloy runtime. The parent window handle should be specified by using
CefWindowInfo::SetAsChild in combination with the CefBrowserHost::CreateBrowser
and CefLifeSpanHandler::OnBeforePopup callbacks.

The previously existing behavior of creating a fully-featured Chrome browser
window when empty CefWindowInfo is used with CreateBrowser remains unchanged
and Views is still the preferred API for creating top-level Chrome windows
with custom styling (e.g. title bar only, frameless, etc).

The cefclient Popup Window test with a native parent window continues to crash
on Linux with both the Alloy and Chrome runtimes (see issue #3165).

Also adds Chrome runtime support for CefDisplayHandler::OnCursorChange.

To test:
- Run `cefclient --enable-chrome-runtime [--use-views]` for the default (and
  previously existing) Views-based behavior.
- Run `cefclient --enable-chrome-runtime --use-native` for the new native
  parent window behavior.
- Run `cefclient --enable-chrome-runtime --use-native --no-activate` and the
  window will not be activated (take input focus) on launch (Windows only).
- Run `cefclient --enable-chrome-runtime [--use-views|--use-native]
  --mouse-cursor-change-disabled` and the mouse cursor will not change on
  mouseover of DOM elements.
2022-04-12 11:49:26 -04:00
Marshall Greenblatt b524edc209 Update to Chromium version 101.0.4951.0 (#982481)
Known issues:
- chrome: Some ceftests are failing due to bfcache same-site enabled by default
  (see issue #3301)
2022-03-30 19:54:09 -04:00
Marshall Greenblatt 9d52d72ae5 chrome: Add support for persist_session_cookies (fixes issue #3291)
This change configures session restore behavior for the NEXT application
restart by setting the "session.restore_on_startup" preference based on the
[CefSettings|CefRequestContextSettings].persist_session_cookies value.
2022-03-22 20:49:20 -04:00
Marshall Greenblatt 6d7a680187 Add permission callback for user-initated downloads (fixes issue #3183)
This change adds a CefDownloadHandler::CanDownload callback for optionally
blocking user-initiated downloads (e.g. alt + link click or link click that
returns a `Content-Disposition: attachment` response from the server).

To test:
- Run `ceftests --gtest_filter=DownloadTest.*`.
- Run `cefclient --hide-controls`. User-initiated downloads will be blocked.
2022-03-22 17:46:44 -04:00
Marshall Greenblatt 2f5838eaaa chrome: Add ability to handle chrome menu/keyboard commands (fixes issue #3280)
This change adds a CefCommandHandler::OnChromeCommand callback for optionally
handling Chrome commands triggered via menus or keyboard shortcuts. Supported
command IDs are listed in a new cef_command_ids.h header file.

To test: Run `cefclient --enable-chrome-runtime --hide-controls`. Most commands
will blocked and removed from context menus.
2022-03-22 15:11:47 -04:00
Marshall Greenblatt 4615fffafb chrome: Add setting for controlling the status bubble (fixes isse #3279)
This change adds `CefBrowserSettings.chrome_status_bubble` for controlling
whether the Chrome status bubble will be used.

Testable in cefclient by passing the `--hide-chrome-status-bubble`
command-line flag.
2022-03-21 17:25:40 -04:00
Marshall Greenblatt f97f0bbda6 Update to Chromium version 100.0.4896.0 (#972766) 2022-02-22 19:22:39 -05:00
Marshall Greenblatt 171d525aa4 alloy: Implement Find() using find_in_page::FindTabHelper (fixes issue #3098, see issue #3047)
The find behavior should now match Chrome.
2022-02-17 13:59:25 -05:00
Marshall Greenblatt 1e1133ec66 Update to Chromium version 99.0.4844.0 (#961656) 2022-01-26 21:10:29 -05:00
Marshall Greenblatt c32f366dfa Migrate ignore_result to std::ignore (see issue #3234)
See https://crbug.com/1285085 for background.
2022-01-25 14:40:53 -05:00
Marshall Greenblatt ebde595370 Convert defined(OS_XXX) to BUILDFLAG(IS_XXX) in libcef
See https://crbug.com/1234043 for background.
2022-01-24 12:58:04 -05:00
Marshall Greenblatt 51e8bd9bd8 chrome: Fix crash when clicking Reading List sidebar link (fixes issue #3128) 2022-01-14 13:52:56 -05:00