Commit Graph

696 Commits

Author SHA1 Message Date
npavlov 485f0b9caf Add screen pixel to screen DIP conversion methods.
On Windows these new CefDisplay methods convert between screen pixel coordinates
and screen DIP coordinates. On macOS and Linux these methods just return a copy
of the input coordinates.
2022-10-14 13:55:07 -04:00
VodBox fa643b269e Add support for native creation and resolution of Promises (fixes issue #3305) 2022-10-11 14:55:12 -04:00
Jelle Bleyaert e0c878df5f Add CefResolveURL function (fixes issue #3402) 2022-10-03 17:46:50 +00:00
Marshall Greenblatt 53c365b752 Fix more space in comments (see issue #3384) 2022-09-06 16:11:02 -04:00
Marshall Greenblatt 5ea0c141b5 Convert base::size to std::size from C++17 (see issue #3362) 2022-09-05 16:31:47 -04:00
Marshall Greenblatt 12fc72147c Format include/base comments for Doxygen (see issue #3384) 2022-09-05 16:17:57 -04:00
Marshall Greenblatt cf7e10aacc Fix space in comments (see issue #3384) 2022-09-05 14:10:30 -04:00
Marshall Greenblatt 51699e671a Fix line wrapping in comments (see issue #3384) 2022-09-02 13:10:09 -04:00
Marshall Greenblatt d7a153bdd4 Update include/ comments to Doxygen formatting (see issue #3384)
See related guidelines in the issue.
2022-09-01 17:14:30 -04:00
Marshall Greenblatt f8d10289b5 Fix DOMTest failure related to device scaling 2022-08-11 14:20:23 -04:00
Marshall Greenblatt 18dac30874 Support configuration of the CefTestServer certificate type (see issue #3348) 2022-08-04 12:37:12 -04:00
Marshall Greenblatt dcd4a0077c Include net test data in the binary distribution (see issue #3348) 2022-08-03 16:28:52 -04:00
Marshall Greenblatt f24dd61329 Add CefTestServer that supports both HTTP and HTTPS (see issue #3348) 2022-08-01 16:20:03 -04:00
Marshall Greenblatt 654f570b6e windows: Fix Views test failures (fixes issue #3365) 2022-07-27 13:57:53 -04:00
Marshall Greenblatt a9043f2e80 Replace macros with C++17 features (see issue #3362)
- Convert ALLOW_UNUSED_LOCAL to [[maybe_unused]]
- Convert WARN_UNUSED_RESULT to [[nodiscard]]
2022-07-27 12:52:45 -04:00
Marshall Greenblatt 9af494d36c Update to Chromium version 105.0.5195.0 (#1027018) 2022-07-25 23:47:56 -04:00
Marshall Greenblatt e9f29ab3d6 Update to Chromium version 105.0.5176.0 (#1023155) 2022-07-22 13:31:29 -04:00
Dmitry Azaraev 27d3089804 Add CefBaseTime and use it instead of CefTime (see issue #2935) 2022-07-19 10:09:35 -04:00
Marshall Greenblatt dad9bf87ef Stop using CefStructBase for POD types (fixes issue #3357) 2022-07-14 08:13:29 +00: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
Nik Pavlov 81e892d19e Add a shared memory variant of CefProcessMessage (fixes issue #3126)
CefSharedProcessMessageBuilder supports creation of a CefProcessMessage
backed by a CefSharedMemoryRegion.

Performance tests comparing the existing ArgumentList approach and the new
SharedMemoryRegion approach have been added to cefclient at
http://tests/ipc_performance.

CefMessageRouter has been updated to use SharedMemoryRegion as transport
for larger message payloads. The threshold is configurable via
|CefMessageRouterConfig.message_size_threshold|.

To test:
run `ceftests --gtest_filter=SendSharedProcessMessageTest.*:SharedProcessMessageTest.*:MessageRouterTest.Threshold*`
2022-07-04 09:49:15 +00:00
Marshall Greenblatt daa89115d5 Add OnMediaAccessChange notification (fixes issue #3310) 2022-06-30 12:22:28 +00:00
Marshall Greenblatt 26e30b3859 Add CefPermissionHandler callback for media access (fixes issue #2582) 2022-06-30 07:31:18 +00:00
Marshall Greenblatt 35654cd709 alloy: Use Chrome JS dialogs on Windows/Linux (fixes issue #3316) 2022-06-03 22:45:23 +03:00
JohnKarel d9b764860a alloy: Add touch handle and quick menu support for OSR (fixes issue #3268)
The client is responsible for rendering both as no default implementation
is currently available for OSR.
2022-05-30 10:51:39 +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 7702d96b33 Fix type conversion warning with GCC 10 (fixes issue #3324) 2022-04-28 16:40:49 -04:00
Marshall Greenblatt 916360e2e5 Update to Chromium version 102.0.4997.0 (#990845)
- Windows: SDK version 10.0.20348.0 is now required.
- MacOS: SDK version 12.3 (Xcode 13.3) is now required.
- Legacy swiftshader binaries (`swiftshader/*` on Win/Linux and
  `libswiftshader_*.dylib` on MacOS) have been removed (see issue #3176).
2022-04-26 16:32:20 -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 4921dc2213 Fix unintentional state transfer in DetachToUserFree (fixes issue #3309)
Calling DetachToUserFree() on a CefString holding a reference should copy the
value instead of transferring ownership.

A new `StringTest.Ownership` test has been added for this behavior.
2022-04-13 14:33:25 -04:00
Marshall Greenblatt d8db6fa9da mac: cefclient: Use RootWindowManager to track key window status (fixes issue #3307)
This change provides a generic solution for active (key) window tracking that
works with both Views-hosted and native windows on MacOS. With this new approach
we can now successfully route top menu actions to the currently active window.

Prior to this change CEF's Views API was using focus notifications as a proxy
for window activation notifications. That doesn't work on MacOS where NSWindow
activation (key status) is independent of NSView focus (first responder) status,
and changes in activation don't necessarily generate focus notifications (see
NativeWidgetMac::OnWindowKeyStatusChanged). To make this work reliably on all
platforms we now expose a CefWindowDelegate::OnWindowActivationChanged callback.

This change also fixes an uninitialized variable
(RootWindowMacImpl::with_extension_) that was causing flaky behavior in
RootWindowManager::OnRootWindowActivated.

To test:
1. Run `cefclient [--use-views]`
2. Select Popup Window from the Tests menu. Do not explicitly activate the popup
   window (e.g. don't click on it).
3. Verify that further Tests menu actions go to the popup window.
4. Change activation to a first window by clicking on it. Verify that Test
   menu actions go to that window.
5. Close the currently active window. Do not explicitly activate the remaining
   window (e.g. don't click on it).
6. Verify that Test menu actions go to the only remaining window.
2022-04-12 16:37:01 -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 77466e7b6d alloy: Use chrome's value for ApplicationClientIdForFileScanning (fixes issue #3030)
This change removes CefSettings.application_client_id_for_file_scanning in
favor of always using the same hard-coded value as chrome.
2022-03-24 12:16:11 -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
Jelle Bleyaert 3c2e97d82e Adding ClearFilenames method to CefDragData (fixes issue #3266) 2022-03-02 19:44:16 +00:00
Marshall Greenblatt fcf5dd036d Fix typo in cef_audio_handler.h 2022-03-01 18:13:56 -05:00
Hunter Laux 477ab61e3b Fix std::result_of deprecation error in C++17 (fixes issue #3194) 2022-02-24 17:34:10 +00:00
Marshall Greenblatt f97f0bbda6 Update to Chromium version 100.0.4896.0 (#972766) 2022-02-22 19:22:39 -05:00
Sergey Markelov a2c621bf8b Fix documentation typo in cef_sandbox_win.h 2022-02-18 21:58:50 +00:00
Marshall Greenblatt bee82b6ac3 Update context menu type enums to match Chromium (fixes issue #3257) 2022-02-18 16:44:37 -05:00
Marshall Greenblatt 28c7f04001 Delete cef_web_plugin.h and plugin-related APIs (see issue #3047)
This functionality stopped being relevant after the removal of Flash support
in January 2021. The last remaining PPAPI plugin (PDF viewer) will switch to
a non-plugin implementation (PdfUnseasoned) in M100.
2022-02-18 16:23:11 -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
Sergey Markelov 758022006a Update include/ files for strict C function prototypes 2022-02-17 12:54:16 -05:00
Sergey Markelov 8bfcbeaf48 Update generated files for strict C function prototypes 2022-02-17 12:46:38 -05:00
Sergey Markelov 5c0895e27f Check C API structure sizes before copying values to C++ classes (fixes issue #3238) 2022-02-17 12:46:38 -05:00
Marshall Greenblatt 5c1d5c1f06 Update remote-debugging-port documentation
Use chrome://inspect for remote debugging. The localhost server landing
page is currently deprecated and will be removed in M100 (see
https://crbug.com/1232509#c25).
2022-02-16 15:17:20 -05:00