Commit Graph

144 Commits

Author SHA1 Message Date
Marshall Greenblatt 52dac91167 Update to Chromium version 124.0.6367.0 (#1274542) 2024-03-22 13:46:28 -04:00
Marshall Greenblatt b8f91c5431 Add callbacks for unresponsive render process (fixes #3661)
The client can optionally wait or terminate the render process.

Expose process exit codes via OnRenderProcessTerminated and
CefGetExitCode (fixes #2126).

cefclient: Add a new https://tests/hang page for testing hang behavior.

cefclient: Move message and resource handling to a new BaseClientHandler
class to support loading of test pages in default Chrome UI windows.
2024-03-18 17:45:31 -04:00
Marshall Greenblatt d4cf19db29 Update to Chromium version 123.0.6312.0 (#1262506)
- MacOS ARM64 Official builds are currently failing due to
  https://issues.chromium.org/issues/326898585
2024-02-26 12:08:55 -05:00
Marshall Greenblatt cc3d77eec5 chrome: Enforce matching context for new user and incognito profiles
Selecting a new user or incognito profile via Chrome UI may result in
the creation of a new Profile object. If that occurs, we should find
or create a matching CefBrowserContext and CefRequestContext instead
of reusing an existing mismatched context (e.g. using the original
context for an incognito window would be a mismatch). If a new
CefRequestContext will be created the client can now implement
CefBrowserProcessHandler::GetDefaultRequestContextHandler() to
provide the handler for that context.

To test with a new user profile:
1. Click "Profile" icon, select "Add". Now you have 2+ profiles.
2. Click "Profile" icon, select the other user name to create a new
   window using the other user profile.
3. The new window should launch successfully.

To test with a new incognito profile:
1. Select "New Incognito window" from the 3-dot menu.
2. The new window should launch successfully.

To test DevTools window creation for the new profile:
1. Right-click in the new window, select Inspect.
2. The DevTools window should launch successfully.
2024-02-14 18:51:32 -05:00
Marshall Greenblatt 57bad703ee views: mac: Add CEF_SHOW_STATE_HIDDEN (fixes #3630)
- Adds `--initial-show-state=hidden` support for cefclient and cefsimple
  where the window launches as initially hidden (no dock thumbnail).
- Adds `--hide-window-on-close` support for cefclient where clicking the
  red traffic light button hides the window instead of closing it.
2024-01-30 12:16:03 -05:00
Marshall Greenblatt 2f1e782f62 Update to Chromium version 122.0.6261.0 (#1250580)
Frame identifiers have changed from int64_t to string type. This is due
to https://crbug.com/1502660 which removes access to frame routing IDs
in the renderer process. New cross-process frame identifiers are 160-bit
values (32-bit child process ID + 128-bit local frame token) and most
easily represented as strings. All other frame-related expectations and
behaviors remain the same.
2024-01-30 12:07:08 -05:00
Philipp Thiel 5a9b8e2bc4 views: Add can_activate parameter to AddOverlayView 2024-01-05 13:46:49 -05:00
Marshall Greenblatt 9a45102db0 Update copyright year for generated files 2024-01-05 13:03:36 -05:00
Marshall Greenblatt 80c65f25a3 Update to Chromium version 121.0.6167.0 (#1233107) 2023-12-13 12:58:55 -05:00
Marshall Greenblatt a25f89f9e4 chrome: Add callback for already running app relaunch (fixes #3609)
Adds a new CefBrowserProcessHandler::OnAlreadyRunningAppRelaunch
callback for when an already running app is relaunched with the
same CefSettings.root_cache_path.

Client apps should check the CefInitialize() return value for early
exit of the relaunch source process.
2023-12-04 15:43:45 -05:00
Marshall Greenblatt f781ea373f Update to Chromium version 120.0.6099.0 (#1217362)
- chrome: Disable upgrade/downgrade behavior (see #3608)
- chrome: Disable process singleton behavior (see #3609)
- chrome: Disable config as default system browser (see #3613)
2023-11-28 12:47:00 -05:00
Marshall Greenblatt 738192addf chrome: win: Add CefSettings.chrome_app_icon_id (see #3606) 2023-11-21 11:24:20 -05:00
Marshall Greenblatt 53ef570f57 chrome: Support Chrome and DevTools command execution (fixes #3282, fixes #3600)
Add new CefBrowserHost::[Can]ExecuteChromeCommand methods for executing
arbitrary Chrome commands.

Add support for existing CefBrowserHost::ShowDevTools, CloseDevTools and
HasDevTools methods.

DevTools windows now support the same Views callbacks as normal popup
windows with the new CefLifeSpanHandler::OnBeforeDevToolsPopup callback
as the DevTools-specific equivalent of OnBeforePopup.

Always create DevTools as an undocked window to support use of
ShowDevTools with default Chrome browser windows.

To test:

Run `ceftests --enable-chrome-runtime [--use-views]
     --gtest_filter=V8Test.OnUncaughtExceptionDevTools`

OR:

1. Run `cefclient --enable-chrome-runtime [--use-native]`
2. Select "Show DevTools", "Close DevTools" or "Inspect" from the
   right-click menu.
3. Notice that the DevTools window is Views-hosted (or native-hosted)
   and works as expected.

Add --use-default-popup to get a default styled popup in step 3.
2023-11-14 17:16:43 +00:00
Marshall Greenblatt d3d465b32e views: Support per-accelerator priority config (fixes #3598) 2023-11-08 14:27:50 -05:00
Marshall Greenblatt 3837f209e1 mac: Update CSS on fullscreen window exit (fixes #3597) 2023-11-07 16:40:29 -05:00
Nik Pavlov 44323082b1 Add binary format support to CefMessageRouter (fixes #3502) 2023-10-25 18:20:55 +00:00
Marshall Greenblatt b2274f534d Update to Chromium version 119.0.6045.0 (#1204232)
Mac: 13.5+ build system w/ 14.0 base SDK (Xcode 15.0) is now required.
2023-10-24 10:56:39 -04:00
Marshall Greenblatt a2a1b66ea5 chrome: Support configuration of Chrome policy management (fixes #3581)
Disable Chrome policy management by default. Add CefSettings.chrome_policy_id
which, when configured, enables Chrome policy management. See
https://support.google.com/chrome/a/answer/9037717 for background.

To test:
- Start with a machine where Google Chrome is managed.
- Run `cefclient --enable-chrome-runtime --url=chrome://policy/`
  There should be no configured policies.
- Run `cefclient --enable-chrome-runtime --url=chrome://policy/
       --enable-chrome-policy`
  Configured Platform properties should match Google Chrome.
- Run `cefclient --enable-chrome-runtime --url=chrome://policy/
       --enable-chrome-policy --enable-chrome-browser-cloud-management`
  Configured Platform and Cloud properties should match Google Chrome.
2023-10-16 18:44:15 -04:00
Nik Pavlov 8d7001adc3 Replace ReadOnlySharedMemoryRegion with WritableSharedMemoryRegion (see #3502)
Write access to the shared memory region is required because JavaScript lacks
the capability to create read-only ArrayBuffers. When a user attempts to modify
an ArrayBuffer that utilizes a ReadOnlySharedMemoryRegion as its BackingStore
it triggers an access violation.

Note that this pull request may be reverted in the future if JavaScript adds
read-only ArrayBuffer support.
2023-10-16 22:43:29 +00:00
Marshall Greenblatt 64c2dc13ca Remove CefBrowserSettings.accept_language_list (fixes #3555)
Chromium does not support configuration of this value on a per-Browser basis.
2023-10-05 18:28:49 -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
Cristian Amarie bdec92caf8 Add CefDragData::GetFilePaths to return file paths (fixes #3568)
GetFileNames now returns just the display names with a fallback to
path.BaseName() if the display name is empty.
2023-10-04 12:25:52 -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 a4b27a7248 Update to Chromium version 117.0.5938.0 (#1181205) 2023-08-15 12:07:58 -04:00
Julien Bouix 01e1a0f44d alloy: Add setting to customize log items 2023-08-07 13:40:40 -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 0b99f92e97 views: Add support for modal browser dialogs
A modal dialog is a child CefWindow that implements some special behaviors
relative to a parent CefWindow. Like any CefWindow it can be framed with
titlebar or frameless, and optionally contain draggable regions (subject to
platform limitations described below). Modal dialogs are shown centered on
the parent window (inside a single display) and always stay on top of the
parent window in z-order. Sizing behavior and available window buttons are
controlled via the usual CefWindowDelegate callbacks. For example, the dialog
can have a preferred size with resize, minimize and maximize disabled (via
GetPreferredSize, CanResize, CanMinimize and CanMaximize respectively).

This change adds support for two modality modes. With window modality all
controls in the parent window are disabled. With browser modality only the
browser view in the parent window is disabled.

Both modality modes require that a valid parent window be returned via
GetParentWindow. For window modality return true from IsWindowModalDialog
and call CefWindow::Show. For browser modality return false from
IsWindowModalDialog (the default value) and call
CefWindow::ShowAsBrowserModalDialog with a reference to the parent window's
browser view.

Window modal dialog behavior depends on the platform. On Windows and
Linux these dialogs have a titlebar and can be moved independent of the
parent window. On macOS these dialogs do not have a titlebar, move with
the parent window, and do not support draggable regions (because they are
implemented using sheets). On Linux disabling the parent window controls
requires a window manager the supports _NET_WM_STATE_MODAL.

Browser modal dialog behavior is similar on all platforms. The dialog will
be automatically sized and positioned relative to the parent window's
browser view. Closing the parent window or navigating the parent browser
view will dismiss the dialog. The dialog can also be moved independent of
the parent window though it will be recentered when the parent window
itself is resized or redisplayed. On MacOS the dialog will move along with
the parent window while on Windows and Linux the parent window can be moved
independently.

To test: Use the Tests > Dialog Window menu option in cefclient with Views
enabled (`--use-views` or `--enable-chrome-runtime` command-line flag).
Browser modal dialog is the default behavior. For window modal dialog add
the `--use-window-modal-dialog` command-line flag.
2023-06-21 11:18:24 +03:00
Marshall Greenblatt b5386249bd alloy: Remove CefSettings.user_data_path (fixes #3511)
This change replaces existing CefSettings.user_data_path usage with
CefSettings.root_cache_path for better alignment with the Chrome runtime.
All files should now be written inside the root_cache_path directory.
2023-06-06 17:41:57 +03:00
Marshall Greenblatt 3bd2cd78c7 mac: Fix <uchar.h> not available with Xcode < 14.3 (fixes #3526) 2023-06-06 14:43:20 +03:00
Marshall Greenblatt b854992ae6 Update generated files for int/char typedef removal (see #3507) 2023-06-01 19:32:36 +03:00
Marshall Greenblatt 695ee2a041 Update to Chromium version 115.0.5790.0 (#1148114)
- Mac: 13.3 SDK (Xcode 14.3) is now required
2023-06-01 13:44:39 +03:00
Nik Pavlov eb63f9e7ae alloy: views: mac: Add three-finger-swipe navigation gesture support
This adds support for the three-finger-swipe navigation gesture with
Alloy/Views. The default implementation matches the Chrome runtime
and navigates the browser back/forward. We also add an Alloy/Views-
specific client callback in CefBrowserViewDelegate for optional
custom handling of the gesture event.
2023-05-26 09:05:33 +00:00
Marshall Greenblatt 5707889555 Add methods for configuring website/content settings (fixes #3490)
This approach is now used to allow popups on a case-by-case basis in
tests instead of globally disabling the popup blocker with the Chrome
runtime.
2023-05-25 11:15:06 +00:00
Vladimir Kharitonov ecdfd467f8 Update CefRange type to match gfx::Range (fixes #3422) 2023-05-16 14:44:19 +03:00
Marshall Greenblatt b8e1c6a59d Remove TRACE_EVENT_COPY_XXX overloads (fixes #3497)
This functionality is not compatible with Chromium's new tracing implementation
based on Perfetto.
2023-05-08 18:32:54 +03:00
Takashi Hashida cf14b2a972 Add CefDownloadItem IsInterrupted and GetInterruptReason methods (fixes #3486) 2023-05-06 16:11:16 +03:00
Nik Pavlov cad2498d87 mac: views: Add CefWindowDelegate::OnWindowFullscreenTransition 2023-04-20 14:59:15 +00:00
Marshall Greenblatt 6569ef09c5 Update API hash 2023-04-13 12:10:00 -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 2c67350605 Update API hash for commit 9ae4da3b38 2023-03-06 15:55:38 -05:00
Marshall Greenblatt f3b570cf8e win: Remove CefEnableHighDPISupport function (fixes issue #3452)
High-DPI support is now enabled by default in Chromium.
2023-03-03 16:07:29 -05:00
Nik Pavlov 276423dcfb views: mac: Fix frameless window behavior (fixes issue #3189)
Frameless windows now display as expected. Default traffic light buttons can
optionally be shown at configurable vertical position. Layout respects text
direction.
2023-02-28 18:34:12 +00: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 47d69a842a Update to Chromium version 109.0.5414.0 (#1070088)
- mac: Xcode 14.0 with macOS SDK 13.0 is now required.
- Remove CefRequestHandler::OnQuotaRequest because persistent quota is no
  longer supported (see https://crbug.com/1208141)
2022-11-17 12:50:15 -05:00
Marshall Greenblatt e2a9236106 cefclient: win: Support window state restore (see issue #3359)
The cefclient sample app on Windows will persist window state across application
restart if run with cache_path and persist_user_references enabled.

To test:
1. Run `cefclient --cache-path=/path/to/cache --persist-user-preferences`
2. Move or resize the window, maximize, minimize, etc.
3. Exit cefclient.
4. Run cefclient again with the same arguments. The previous window state will
   be restored.
2022-11-07 15:21:46 -05:00
Marshall Greenblatt 882bc19fdd cefclient: views: Support window state restore (see issue #3359)
The cefclient sample app will persist window state across application restart
if run with views, cache_path and persist_user_references enabled.

To test:
1. Run `cefclient --use-views --cache-path=/path/to/cache --persist-user-preferences`
2. Move or resize the window, maximize, minimize, etc.
3. Exit cefclient.
4. Run cefclient again with the same arguments. The previous window state will
   be restored.
2022-10-28 14:28:53 -04:00