Commit Graph

61 Commits

Author SHA1 Message Date
Julien Bouix 01e1a0f44d alloy: Add setting to customize log items 2023-08-07 13:40:40 -04:00
Marshall Greenblatt 09bb643ef6 Support registration of custom preferences.
Custom global and request context preferences can now be registered via
CefBrowserProcessHandler::OnRegisterCustomPreferences. CefRequestContext
now extends CefPreferenceManager and global preferences can be accessed
via CefPreferenceManager::GetGlobalPreferenceManager.
2022-10-26 16:54:33 -04:00
Marshall Greenblatt f97f0bbda6 Update to Chromium version 100.0.4896.0 (#972766) 2022-02-22 19:22:39 -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 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 83ffc1f00d Add kPdfRenderer define for non-Windows platforms (see issue #3047)
This switch is currently only defined for Windows in
content/public/common/content_switches.h.
2021-12-02 12:37:02 -05: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 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
Marshall Greenblatt 430895168d Add --disable-request-handling-for-testing option
Add a command-line option to bypass request handling in CEF to faciliate
debugging of network-related issues.
2021-06-11 12:09:18 -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 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 4fbd247231 Add chrome runtime support for more callbacks and ceftests (see issue #2969)
This change adds support for:
- Protocol and request handling.
- Loading and navigation events.
- Display and focus events.
- Mouse/keyboard events.
- Popup browsers.
- Callbacks in the renderer process.
- Misc. functionality required for ceftests.

This change also adds a new CefBrowserProcessHandler::GetCookieableSchemes
callback for configuring global state that will be applied to all
CefCookieManagers by default. This global callback is currently required by the
chrome runtime because the primary ProfileImpl is created via
ChromeBrowserMainParts::PreMainMessageLoopRun (CreatePrimaryProfile) before
OnContextCreated can be called.

ProfileImpl will use the "C:\Users\[user]\AppData\Local\CEF\User Data\Default"
directory by default (on Windows). Cookies may persist in this directory when
running ceftests and may need to be manually deleted if those tests fail.

Remaining work includes:
- Support for client-created request contexts.
- Embedding the browser in a Views hierarchy (cefclient support).
- TryCloseBrowser and DoClose support.
- Most of the CefSettings configuration.
- DevTools protocol and window control (ShowDevTools, ExecuteDevToolsMethod).
- CEF-specific WebUI pages (about, license, webui-hosts).
- Context menu customization (CefContextMenuHandler).
- Auto resize (SetAutoResizeEnabled).
- Zoom settings (SetZoomLevel).
- File dialog runner (RunFileDialog).
- File and JS dialog handlers (CefDialogHandler, CefJSDialogHandler).
- Extension loading (LoadExtension, etc).
- Plugin loading (OnBeforePluginLoad).
- Widevine loading (CefRegisterWidevineCdm).
- PDF and print preview does not display.
- Crash reporting is untested.
- Mac: Web content loads but does not display.

The following ceftests are now passing when run with the
"--enable-chrome-runtime" command-line flag:

CorsTest.*
DisplayTest.*:-DisplayTest.AutoResize
DOMTest.*
DraggableRegionsTest.*
ImageTest.*
MessageRouterTest.*
NavigationTest.*
ParserTest.*
RequestContextTest.*Global*
RequestTest.*
ResourceManagerTest.*
ResourceRequestHandlerTest.*
ResponseTest.*
SchemeHandlerTest.*
ServerTest.*
StreamResourceHandlerTest.*
StreamTest.*
StringTest.*
TaskTest.*
TestServerTest.*
ThreadTest.*
URLRequestTest.*Global*
V8Test.*:-V8Test.OnUncaughtExceptionDevTools
ValuesTest.*
WaitableEventTest.*
XmlReaderTest.*
ZipReaderTest.*
2020-09-29 18:31:43 -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 1174994211 Add initial chrome runtime support (see issue #2969)
Running `cefsimple --enable-chrome-runtime` will create and run a
Chrome browser window using the CEF app methods, and call
CefApp::OnContextInitialized as expected. CEF task methods also
work as expected in the main process. No browser-related methods or
callbacks are currently supported for the Chrome window, and the
application will exit when the last Chrome window closes.

The Chrome runtime requires resources.pak, chrome_100_percent.pak
and chrome_200_percent.pak files which were not previously built
with CEF. It shares the existing locales pak files which have been
updated to include additional Chrome-specific strings.

On Linux, the Chrome runtime requires GTK so use_gtk=true must be
specified via GN_DEFINES when building.

This change also refactors the CEF runtime, which can be tested in
the various supported modes by running:
$ cefclient
$ cefclient --multi-threaded-message-loop
$ cefclient --external-message-pump
2020-06-29 16:17:23 -04:00
Marshall Greenblatt 39aed35644 Add support for direct DevTools protocol messaging (fixes issue #2961).
This change allows the client to directly send and receive DevTools
protocol messages (send method calls, and receive method results and
events) without requiring a DevTools front-end or remote-debugging
session.

This change includes additional supporting changes:
- Add a new CefRequestHandler::OnDocumentAvailableInMainFrame
  callback (see issue #1454).
- Add a CefParseJSON variant that accepts a UTF8-encoded buffer.
- Add a `--devtools-protocol-log-file=<path>` command-line flag for
  logging protocol messages sent to/from the DevTools front-end
  while it is displayed. This is useful for understanding existing
  DevTools protocol usage.
- Add a new "libcef_static_unittests" executable target to support
  light-weight unit tests of libcef_static internals (e.g. without
  requiring exposure via the CEF API). Files to be unittested are
  placed in the new "libcef_static_unittested" source_set which is
  then included by both the existing libcef_static library and the
  new unittests executable target.
- Linux: Remove use_bundled_fontconfig=false, which is no longer
  required and causes unittest build errors (see issue #2424).

This change also adds a cefclient demo for configuring offline mode
using the DevTools protocol (fixes issue #245). This is controlled
by the "Offline mode" context menu option and the `--offline`
command-line switch which will launch cefclient in offline mode. When
cefclient is offline all network requests will fail with
ERR_INTERNET_DISCONNECTED and navigator.onLine will return false when
called from JavaScript in any frame. This mode is per-browser so
newly created browser windows will have the default mode. Note that
configuring offline mode in this way will not update the Network tab
UI ("Throtting" option) in a displayed DevTools front-end instance.
2020-06-19 22:15:22 -04:00
Marshall Greenblatt a12c2ab3e1 Add support for MimeHandlerViewInCrossProcessFrame (fixes issue #2727)
The PDF loading documentation in extension_system.cc has be updated to
describe the new code paths.

To support delivery of input events to the mime handler renderer process it is
now necessary to route events via the correct RWHV interface. For Aura-based
platforms (Windows/Linux) this means RWHVAura::On*Event and for macOS this
means RWHVMac::RouteOrProcess*Event. Since Aura uses UI event types these have
become the source of truth on Aura-based platforms with conversion to Web event
types when needed (primarily for OSR).

This change also adds a timeout for CefProcessHostMsg_GetNewBrowserInfo to
avoid a hung renderer process if the guest WebContents route is not
registered via CefMimeHandlerViewGuestDelegate::OnGuestDetached as expected
prior to CefBrowserInfoManager::OnGetNewBrowserInfo being called. This
timeout can be disabled for testing purposes by passing the
`--disable-new-browser-info-timeout` command-line flag.

The `--disable-features=MimeHandlerViewInCrossProcessFrame` command-line
flag can be used for a limited time to restore the previous implementation
based on BrowserPlugin. That implementation will be deleted starting with
the 3897 branch update.

Known issues:
- ExecuteJavaScript calls on the frame hosting the PDF extension will not
  be routed to the mime handler renderer process.
- The PDF extension will not load successfully if blocked by
  ChromePluginPlaceholder and then manually continued via the "Run this
  plugin" context menu option (see https://crbug.com/533069#c41).
2020-01-24 20:16:47 -05:00
Marshall Greenblatt 65f97a60ad Remove the enable-net-security-expiration option (see issue #2622)
The implementation of this option was removed in commit 67b61c4. Certificate
transparency is disabled by default for Chromium embedders. Details at:

https://chromium.googlesource.com/chromium/src/+/master/net/docs/certificate-transparency.md#Supporting-Certificate-Transparency-for-Embedders
2019-10-29 11:36:29 -04:00
Rob Sussman c038bf8198 macOS: Support configuration of the main bundle path (fixes issue #2729) 2019-07-25 15:47:46 +00:00
Ananyo Maiti 1669c0afbd Add print preview support (see issue #123)
Pass the `--enable-print-preview` command-line flag to enable. Currently only
supported on Windows and Linux.
2019-07-19 21:55:30 -04:00
Marshall Greenblatt 6011d45e38 Enable NetworkService by default (see issue #2622).
The NetworkService can still be disabled for a limited time by specifying the
`--disable-features=NetworkService` command-line flag.
2019-05-20 19:42:44 +03:00
Marshall Greenblatt 6b2c1fe969 Add initial NetworkService support (see issue #2622).
This change adds an --enable-network-service command-line flag to run with
NetworkService enabled.

To test: Run `cefclient --enable-network-service --disable-extensions`. The
application should start, load a website and exit without crashing.
Network-related handlers (for cookies, schemes, requests, etc) and extensions
are not expected to work yet.

There should be no functional change when running without the NetworkService
enabled.
2019-03-24 16:43:56 -04:00
Marshall Greenblatt 995dd0ba19 Suppress ERROR messages with log-severity=disable (issue #2581)
Also expose FATAL severity level.
2019-01-29 14:53:46 -05:00
Marshall Greenblatt 64cd460c73 Add disable-javascript command-line flag to match documentation (issue #1848) 2018-09-25 14:01:59 +02:00
Marshall Greenblatt d7e1312e9d Fix crashes when loading Flash plugins with extensions disabled (issue #2359) 2018-02-02 19:02:07 -05:00
Marshall Greenblatt 8b4980b4ca Update to Chromium revision adb61db1 (#508578) 2017-10-26 15:58:05 -04:00
Marshall Greenblatt 5c79944b31 Update to Chromium revision d483fb77 (#474934)
- CefLifeSpanHandler::OnBeforePopup is now called on the UI thread.
- Remove CefBrowserSettings.javascript_open_windows which is no
  longer supported.
2017-06-02 05:55:23 -07:00
Marshall Greenblatt 77097ffab7 Remove the CefSettings.context_safety_implementation option (issue #1853).
The default hash implementation will now always be used.
2017-05-09 15:29:27 -04:00
Marshall Greenblatt dda50912ed macOS: Allow configuration of framework path (issue #1532) 2017-01-26 19:14:56 -05:00
Marshall Greenblatt a834487177 Improve crashpad integration (issue #1995)
- Crash reporting is enabled and configured using a "crash_reporter.cfg"
  file. See comments in include/cef_crash_util.h and tools/crash_server.py
  for usage.
2017-01-10 18:40:31 -05:00
Marshall Greenblatt 12aeeb13f7 Update to Chromium revision 3a87aecc (#433059) 2016-11-29 16:56:29 -05:00
Marshall Greenblatt c6881fe145 Add option to enable/disable net security expiration (issue #1994)
- Net security (CT, HSTS) expiration based on build age is now
  disabled by default.
- Add new enable_net_security_expiration option to CefSettings and
  CefRequestContextSettings.
2016-11-18 16:11:40 -05:00
Marshall Greenblatt a1fc6f1ad0 Add CefRegisterWidevineCdm function and remove component updater support (issue #2009)
Mac: Check in widevinecdmadapter.plugin binary until Widevine GN build errors are resolved (https://crbug.com/626436).
2016-10-17 14:16:31 -04:00
Marshall Greenblatt e7ddc933c9 Update to Chromium revision 6e53600d (#386251)
- Remove |accept_lang| parameter from CefJSDialogHandler::OnJSDialog
  and CefFormatUrlForSecurityDisplay (see https://crbug.com/336973#c36).
- Remove remaining NPAPI-related code including functions from
  cef_web_plugin.h (see https://crbug.com/493212#c55).
- Mac: 10.7+ deployment target is now required for client applications.
- Mac: Remove CefBrowserHost::SetWindowVisibility (issue #1375). No
  replacement is required for windowed rendering. Use WasHidden for
  off-screen rendering.
- Windows: Visual Studio 2015 Update 2 is now required when building
  CEF/Chromium.
2016-04-28 12:57:08 -04:00
Marshall Greenblatt 936e595fe5 - Support runtime configuration of renderer-related preferences (issue #1501).
- Persist modified user preferences including per-host zoom settings when a
  cache_path value is specified and persist_user_preferences is set to true
  via CefSettings or CefRequestContextSettings.
- Avoid the need to duplicate files from chrome/ by having CefBrowserContext
  extend Chrome's Profile class.
2015-10-20 11:12:21 -04:00
Marshall Greenblatt 5780ea8baa Support configuration of preferences during runtime (issue #1709)
- Preferences are now associated with a CefRequestContext instead of
  being stored globally.
- Add methods to CefRequestContext for getting/setting preferences.
2015-10-06 18:14:11 -04:00
Marshall Greenblatt dc3aae19e8 Add plugin placeholder and policy support (issue #1708)
- Default plugin loading policy can be specified using the new
  `--plugin-policy=[allow|block|detect]` command-line flag.
- Move CefRequestHandler::OnBeforePluginLoad to
  CefRequestContextHandler and add a new policy argument that
  supports different actions (allow, block, detect, disable) on a
  per-plugin-instance basis.
- Add CefContextMenuHandler::RunContextMenu for providing a custom
  context menu implementation.
- Add CefResourceBundleHandler::GetDataResourceForScale for
  returning scaled resources (issue #1272).
- Add CefResourceBundle for retrieving resources from the resource
  bundle (*.pak) files loaded by CEF during startup or via the
  CefResourceBundleHandler.
- Linux: Fix Debug build IO access warning with CefGetMimeType.
- cef_unittests: Move the refcounting implementation from TestHandler
  to subclasses in order to support interface inheritance from
  subclasses.
2015-09-22 12:28:46 +03:00
Marshall Greenblatt 3640f81f01 Add Widevine CDM support (issue #1631)
- Windows/Mac: Use `--enable-widevine-cdm` command-line flag to
  enable download of CDM binaries via the component updater.
- Linux: Use `--widevide-cdm-path` and `--widevine-cdm-version`
  command-line flags to load CDM binaries that already exist on
  the system.
- A cache-path value is usually required when CDM is enabled.
2015-09-01 14:04:21 +02:00
Marshall Greenblatt a63d646e3b Update to Chromium revision fc6ad471 (#342568) 2015-08-14 14:42:03 -04:00
Marshall Greenblatt b7a56d9343 Add PDF extension support (issue #1565) 2015-07-23 14:02:03 -04:00
Marshall Greenblatt 6cceb1bd41 Mac: Add `disable-scroll-bounce` command-line flag (issue #1597). 2015-04-08 15:42:50 +02:00
Marshall Greenblatt 2fe1d33239 Add Pepper Flash plugin support (issue #1586).
A system-wide installation of the Pepper Flash plugin is available from Adobe
for Windows and Mac OS X platforms as a separate download. To enable automatic
detection and loading of the system-wide installation pass the
`--enable-system-flash` command-line flag.

The Pepper Flash plugin can also be loaded by specifying the file path and
version via the `--ppapi-flash-path=<path> --ppapi-flash-version=<version>`
command-line flags. The version can be identified by viewing the
manifest.json file in the same directory as the Pepper Flash plugin library.
2015-03-26 17:00:30 -04:00
Marshall Greenblatt 77aa0be191 Add spell checking support (issue #137).
This includes:
- Red underline of misspelled words in html text areas.
- Right-click context menu options to correct the misspelled word.
- New CefBrowser::ReplaceMisspelling method for accepting a word replacement.
- Methods added to CefContextMenuParams for retrieving spelling-related information.
- Uses the unified text checker when auto-correct is not enabled to match Google Chrome behavior.
- On Windows and Linux a hunspell dictionary file will be downloaded to the "<cache_path>/Dictionaries" directory as needed, or used from the <cache_path> directory if the file already exists there. The dictionary file will be downloaded from http://cache.pack.google.com/edgedl/chrome/dict/<LANG>-3-0.bdic where <LANG> is the language abbreviation.
- On OS X the spell checking implementation will use the system NSSpellChecker implementation.

The following command-line flags have been added:
--disable-spell-checking => Disable spell-checking support (no red underline, no dictionary file download, etc).
--enable-spelling-auto-correct => Automatically correct common misspellings while typing (like 'omre' to 'more' on Windows/Linux or 'ehlo' to 'helo' on OS X).
--enable-spelling-service => Enable use of the remote Google spelling service (this requires Google API keys).
--override-spell-check-lang=<LANG> => Use the specified dictionary language <LANG> instead of the language specified in the locales.pak file. To see the default/supported dictionary languages: https://code.google.com/p/chromium/codesearch#search/&q=IDS_SPELLCHECK_DICTIONARY%20xtb&sq=package:chromium


git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1859 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-10-07 20:44:33 +00:00
Marshall Greenblatt cb907f3649 Update to Chromium revision 280796.
- Mac: Remove Carbon interpose library (see http://crbug.com/157130).
- Remove unused LOGSEVERITY_ERROR_REPORT value (see http://crbug.com/352378).
- CefURLRequest in the render process will now always have the UR_FLAG_REPORT_LOAD_TIMING flag set (see http://crbug.com/376025#c15).
- Change CefGeolocationHandler::OnRequestGeolocationPermission return value from void to boolean.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1753 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-07-02 18:25:22 +00:00
Marshall Greenblatt 199a3faafe Update to Chromium revision 261035.
- The CefSettings.release_dcheck_enabled option has been removed. This functionality can be enabled by setting the dcheck_always_on=1 gyp variable before building CEF/Chromium. See http://crbug.com/350462 for details.
- The UR_FLAG_ALLOW_COOKIES option has been removed and the functionality has been merged into UR_FLAG_ALLOW_CACHED_CREDENTIALS.
- Mac: [NSApplication sharedApplication] should no longer be called in the renderer process. See http://crbug.com/306348 for details.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1641 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2014-04-04 16:50:38 +00:00
Marshall Greenblatt ec8b64e88a Add breakpad support (issue #1131).
- General usage instructions are available at https://sites.google.com/a/chromium.org/dev/developers/testing/webkit-layout-tests/using-breakpad-with-content-shell.
- Mac: Generate "Chromium Embedded Framework.framework" using a new cef_framework target (the libcef target is now only used on Windows and Linux). Rename "Libraries/libcef.dylib" to "Chromium Embedded Framework". Distribute Release and Debug builds of the "Chromium Embedded Framework.framework" folder as part of the binary distribution.
- Mac: Fix the Xcode target compiler setting for the binary distribution so that it no longer needs to be set manually.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1524 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-11-21 22:43:36 +00:00
Marshall Greenblatt 7e1fbaca6a Update to Chromium revision 234212
- The CefBrowserSettings.user_style_sheet_location option is no longer supported in Blink.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1516 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-11-11 17:29:52 +00:00
Marshall Greenblatt 133e06c50a Update to Chromium revision 233896.
- The CefBrowserSettings.author_and_user_styles option is now always enabled.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1512 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-11-08 21:28:56 +00:00
Marshall Greenblatt bb6eeee686 Update to Chromium revision 194165.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1221 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-04-15 22:16:01 +00:00
Marshall Greenblatt 63f6b6b09a Add support for x-webkit-speech (issue #758).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1132 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2013-03-08 00:41:26 +00:00