Commit Graph

260 Commits

Author SHA1 Message Date
Marshall Greenblatt 53c365b752 Fix more space in comments (see issue #3384) 2022-09-06 16:11:02 -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 18dac30874 Support configuration of the CefTestServer certificate type (see issue #3348) 2022-08-04 12:37:12 -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 e4b9169221 Add CefPermissionHandler callbacks for permission prompts (see issue #3352) 2022-07-07 10:01:24 +00:00
Marshall Greenblatt 26e30b3859 Add CefPermissionHandler callback for media access (fixes issue #2582) 2022-06-30 07:31:18 +00: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 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 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 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 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
Sergey Markelov 758022006a Update include/ files for strict C function prototypes 2022-02-17 12:54:16 -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
Jun Tseng 086848a7ad Fix incorrect then/than usage in docs 2022-02-09 16:54:49 +00:00
Marshall Greenblatt 4767130954 Windows: Fix VS2019 warning C4458: declaration of 'bounds' hides class member (see issue #1515) 2021-10-01 12:05:55 +03:00
Marshall Greenblatt a7bbd8a62b Remove ignore_certificate_errors setting (fixes issue #2899)
This removes CefSettings.ignore_certificate_errors and
CefBrowserSettings.ignore_certificate_errors. Due to NetworkService
requirements these values must now be configured globally via the
"ignore-certificate-errors" command-line flag.
2021-09-27 16:36:57 +03:00
Marshall Greenblatt f158c34a21 Remove CefBrowserSettings related to file URL access (fixes issue #2820)
This removes CefBrowserSettings.universal_access_from_file_urls and
CefBrowserSettings.file_access_from_file_urls. Due to NetworkService
requirements these values must now be configured globally via command-line
flags ("allow-universal-access-from-files" and "allow-file-access-from-files"
respectively).

Also remove the kAllowFileAccessFromFileUrls switch in CEF which duplicates
the existing kAllowFileAccessFromFiles switch in Chromium (see issue #1785).
2021-09-27 16:36:57 +03:00
Marshall Greenblatt 6516b569a9 Remove CefBrowserSettings.application_cache (fixes issue #1785)
AppCache is deprecated in favor of Service Workers and support will be
fully removed soon (~M95). See https://web.dev/appcache-removal/.

Also add missing "allow-file-access-from-files" command-line switch for
CefBrowserSettings.file_access_from_file_urls.
2021-09-27 16:22:27 +03:00
Marshall Greenblatt 23be17f693 Use CefRect for CefWindowInfo bounds (fixes issue #1515) 2021-09-27 16:22:27 +03:00
Marshall Greenblatt dc1f934865 views: Support configuration of initial window show state
Known issues:
- Exiting full-screen mode currently crashes with the Chrome runtime
  (see issue #3182).
2021-09-23 14:41:47 +03:00
Aviv Duek 0cbc0a757e Add two missing resource types to cef_resource_type_t enum 2021-09-22 14:09:53 +03:00
Marshall Greenblatt 4a44e16a09 views: Add support for absolute positioned overlay views.
To test:
Run `cefclient.exe --use-views --hide-frame --hide-controls`
Add `--enable-chrome-runtime` for the same behavior using the Chrome location
bar instead of a text field.
2021-09-16 18:25:43 +03:00
Marshall Greenblatt f435c3af9e Linux: Update user data path docs (see issue #3149) 2021-08-11 13:15:03 -04:00
Marshall Greenblatt 240b869db5 widevine: Use component updater with the Alloy runtime (fixes issue #3149)
Widevine CDM binaries will be downloaded on supported platforms shortly after
application startup. Widevine support will then become available within a few
seconds after successful installation on Windows or after the next application
restart on other platforms. The CDM files will be downloaded to a "WidevineCdm"
directory inside the `CefSettings.user_data_path` directory.

Pass the `--disable-component-update` command-line flag to disable Widevine
download and installation. Pass the `--component-updater=fast-update` command-
line flag to force Widevine download immediately after application startup.

See the related issue for additional usage details.
2021-08-09 21:10:45 -04:00
Vladislav 2be59f6edd Translate additional CEF modifiers to EF_* flags (see issue #2597) 2021-07-19 15:52:36 +00:00
Marshall Greenblatt 43f9baa23a Update include/base headers for C++11/14 (see issue #3140)
See the issue for update guidelines.
2021-06-17 20:47:12 -04:00
Marshall Greenblatt 9353f9b28b Mac: Fix Xcode 12.5 build errors related to implicit copy assignment operators 2021-06-10 16:42:45 -04:00
Marshall Greenblatt ff8f4a7217 Remove the TID_FILE default value
Clients should instead make an informed decision about which blocking thread
to use. See cef_thread_id_t documentation for guidance.
2021-05-19 17:42:51 -04:00
Marshall Greenblatt ebee84755e Convert legacy IPC messages to Mojo (fixes issue #3123)
This change introduces a few minor CEF API behavior changes:

- A CefProcessMessage object cannot be reused after being passed to
  SendProcessMessage.
- The |extra_info| argument to CefRenderProcessHandler::OnBrowserCreated may
  now be NULL.

Where appropriate, we now utilize the default UTF string encoding format and
shared memory to reduce copies and conversions for the cross-process
transfer of arbitrary-length strings. For example, CefFrame::GetSource/GetText
now involves zero UTF conversions and zero copies in the browser process for
the CefString delivered to CefStringVisitor::Visit().
2021-05-18 21:59:48 -04:00
Marshall Greenblatt c03a6f4386 chrome: Support configuration of user agent and locale (see issue #2969)
This change adds support for CefSettings and command-line configuration of
user_agent, user_agent_product (formerly product_version) and locale.
2021-04-27 12:39:12 -04:00
Marshall Greenblatt ae4f68f695 Update to Chromium version 91.0.4472.0 (#870763) 2021-04-23 11:38:51 -04:00
Marshall Greenblatt a4603c6f1a chrome: Support usage of the Chrome toolbar from Views (see issue #2969) 2021-04-11 20:44:28 -04:00
Marshall Greenblatt 76642ccafa Move cookieable scheme configuration to settings (see issue #2969)
The Chrome runtime requires that cookieable scheme information be available
at Profile initialization time because it also triggers NetworkContext creation
at the same time. To make this possible, and to avoid various race conditions
when setting state, the cookieable scheme configuration has been added as
|cookieable_schemes_list| and |cookieable_schemes_exclude_defaults| in
CefSettings and CefBrowserContextSettings. The CefCookieManager::
SetSupportedSchemes and CefBrowserProcessHandler::GetCookieableSchemes methods
are no longer required and have been removed.

This change also modifies chrome to delay OffTheRecordProfileImpl initialization
so that |ChromeBrowserContext::profile_| can be set before
ChromeContentBrowserClientCef::ConfigureNetworkContextParams calls
CefBrowserContext::FromBrowserContext to retrieve the ChromeBrowserContext
and associated cookieable scheme information. Otherwise, the
ChromeBrowserContext will not be matched and the NetworkContext will not be
configured correctly.

The CookieTest suite now passes with the Chrome runtime enabled.
2021-04-09 15:04:24 -04:00
Marshall Greenblatt 09fa22898d chrome: Support client-created request contexts (see issue #2969)
RequestContextTest and URLRequestTest suites now pass with the Chrome runtime
enabled.
2021-04-07 18:19:17 -04:00
Marshall Greenblatt f7a4c777e8 Remove CefBrowserSettings.web_security (fixes issue #3058) 2021-03-25 13:07:17 -04:00
Marshall Greenblatt 8424f166cc Use the same pak files for the Alloy and Chrome runtimes (see issue #2969)
Chrome currently uses chrome_100_percent.pak, chrome_200_percent.pak,
resources.pak and locales/<locale>.pak files. This change adds CEF
resources to those existing pak files and updates the Alloy runtime to
use them instead of the previous CEF-specific pak files (cef.pak,
cef_100_percent.pak, cef_200_percent.pak, cef_extensions.pak,
devtools_resources.pak) which are no longer generated.

The addition of Chrome resources results in an ~16% (~4.1MB) increase in total
combined pak file size vs. the previous CEF-specific pak files. While a size
increase is not ideal for the Alloy runtime, it seems preferable to the
alternative of distributing separate (and partially duplicated) pak files for
each runtime, which would have added ~9.8MB to the total binary distribution
size.
2021-02-28 16:51:37 -05:00
Marshall Greenblatt 5ef0fb8ac8 Update to Chromium version 89.0.4389.0 (#843830)
- SSE3 is now required on x86 processors (see https://crbug.com/1123353).
2021-02-08 14:15:38 -05:00
Marshall Greenblatt a584bd187b Update to Chromium version 88.0.4324.0 (#827102)
- Mac: Xcode 12.2 and the MacOS 11.0 SDK are now required for building.
- MacOS 10.10 (Yosemite) is no longer supported (see https://crbug.com/1126056).
- Flash is no longer supported (see https://www.chromium.org/flash-roadmap).
2020-12-04 15:43:33 -05:00
Marshall Greenblatt 015e3621a3 Update to Chromium version 87.0.4280.0 (#812852)
- Windows: VS2015 Update 2 is now the minimum version requirement for linking
  cef_sandbox from official build binary distributions.
2020-10-15 14:21:06 -04:00
Marshall Greenblatt 24c2f2fa38 Update to Chromium version 86.0.4240.0 (#800218)
- CefURLRequest::Create is no longer supported in the renderer process
  (see https://crbug.com/891872). Use CefFrame::CreateURLRequest instead.
- Mac platform definitions have been changed from `MACOSX` to `MAC`
  (see https://crbug.com/1105907) and related CMake macro names have
  been updated. The old `OS_MACOSX` define is still set in code and CMake
  for backwards compatibility.
- Linux ARM build is currently broken (see https://crbug.com/1123214).
2020-09-03 17:44:25 -04:00
Marshall Greenblatt e8573173dd Expose MediaSink device ip/port and model name (see issue #2900) 2020-07-16 19:11:19 -04:00