Commit Graph

206 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 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
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 c49ffa9723 Update libcef_dll_dylib.cc for compiler deduce types 2022-07-08 14:37:58 +03: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
Nik Pavlov 0c6c44ba0b Use nothrow new when allocating memory for zip file data 2022-06-30 07:32:03 +00: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 2b9a06933b Update copyright year in generated files 2022-01-06 13:34:35 -05:00
Marshall Greenblatt 1eb55cbba8 Remove DISALLOW_ macro from libcef_dll/ (see issue #3234)
Also perform related C++ cleanup:
- Use =default instead of {} for default implementations of
  constructors/destructors.
- Replace typedef with using.
2021-12-07 15:02:28 -05:00
Marshall Greenblatt cbc5710801 Replace CefRequestCallback with CefCallback (fixes issue #1861)
CefRequestCallback::Continue(false) was the same as Cancel(), so we can just
use CefCallback instead.
2021-09-27 16:22:27 +03:00
Marshall Greenblatt 5782fdca16 Update to Chromium version 95.0.4638.0 (#920003)
Known issues:
- Windows ARM64 builds are currently failing due to
  https://crbug.com/1242884#c31
2021-09-22 12:08:24 +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 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 ed1840ddb5 wrapper: Convert usage of base::Bind to Once or Repeating (see issue #3140) 2021-06-19 15:35:12 -04:00
Marshall Greenblatt cc2759d07e Add base::OnceClosure support in cef_closure_task.h (see issue #3140) 2021-06-18 14:19:11 -04:00
Marshall Greenblatt 17fc2b3e3b Various fixes related to the C++11/14 update (see issue #3140)
- Convert scoped_ptr to std::unique_ptr from <memory>
- Convert arraysize to base::size from include/base/cef_cxx17_backports.h
- Convert NULL to nullptr
- Include include/base/cef_callback.h instead of include/base/cef_bind.h
- Implicit conversion of CefRefPtr<T> or scoped_refptr<T> to T* is gone;
  use .get() instead

See the issue for additional details.
2021-06-18 13:42:31 -04: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 6d80ec69d7 Replace OVERRIDE with override (see issue #3140) 2021-06-17 16:16:53 -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 34c63a665d Wait for CefBrowserContext initialization (see issue #2969)
With the Chrome runtime, Profile initialization may be asynchronous. Code that
waited on CefBrowserContext creation now needs to wait on CefBrowserContext
initialization instead.
2021-04-14 21:03:44 -04:00
Marshall Greenblatt 119415b8e9 Update copyright year on generated files 2021-01-27 13:36:54 -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 2e94bfafea wrapper: Allow null stream parameter to CefStreamResourceHandler 2020-08-26 16:25:25 -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 8ed39e4ae5 Fix transposed variables in GetRequestInfo (fixes issue #2530) 2020-04-23 14:40:19 -04:00
Marshall Greenblatt 03fd5b15da Add support for media device discovery and messaging (fixes issue #2900)
Chromium supports communication with media devices on the local network via
the Cast and DIAL protocols. This takes two primary forms:

1. Messaging, where strings representing state information are passed between
   the client and a dedicated receiver app on the media device. The receiver
   app communicates directly with an app-specific backend service to retrieve
   and possibly control media playback.
2. Tab/desktop mirroring, where the media contents are streamed directly from
   the browser to a generic streaming app on the media device and playback is
   controlled by the browser.

This change adds support for device discovery and messaging (but not
mirroring) with functionality exposed via the new CefMediaRouter interface.

To test: Navigate to http://tests/media_router in cefclient and follow the
on-screen instructions.
2020-03-27 15:54:39 -04:00
Marshall Greenblatt 97d559982e Update generated files for NULL to nullptr conversion (see issue #2861) 2020-01-15 14:53:19 +01:00
Marshall Greenblatt ea63799c3e libcef: Convert NULL to nullptr (see issue #2861) 2020-01-15 14:49:22 +01:00
Marshall Greenblatt beb005138a Update copyright year 2020-01-06 11:59:05 +02:00
Marshall Greenblatt 1c88c74f86 Convert usage and tests to the new CefResourceHandler API (see issue #2622)
Limited test coverage for the old API is still available by passing the
`--test-old-resource-api` command-line flag to ceftests.
2019-12-31 16:11:29 +02:00
Marshall Greenblatt f8e0797773 Update to Chromium version 78.0.3904.0 (#693954) 2019-10-01 13:55:16 +00:00
Petra Öhlin cc0db5f166 Update to Chromium version 76.0.3809.0 (#665002)
OSR tests will be fixed by a follow-up merge of Viz support (see issue #2575).
2019-07-16 15:34:16 -04:00
Marshall Greenblatt 241941a44a Move message routing from CefBrowser to CefFrame (see issue #2498).
This change moves the SendProcessMessage method from CefBrowser to CefFrame and
adds CefBrowser parameters to OnProcessMessageReceived and
OnDraggableRegionsChanged.

The internal implementation has changed as follows:
- Frame IDs are now a 64-bit combination of the 32-bit render_process_id and
  render_routing_id values that uniquely identify a RenderFrameHost (RFH).
- CefFrameHostImpl objects are now managed by CefBrowserInfo with life span tied
  to RFH expectations. Specifically, a CefFrameHostImpl object representing a
  sub-frame will be created when a RenderFrame is created in the renderer
  process and detached when the associated RenderFrame is deleted or the
  renderer process in which it runs has died.
- The CefFrameHostImpl object representing the main frame will always be valid
  but the underlying RFH (and associated frame ID) may change over time as a
  result of cross-origin navigations. Despite these changes calling LoadURL on
  the main frame object in the browser process will always navigate as expected.
- Speculative RFHs, which may be created as a result of a cross-origin
  navigation and discarded if that navigation is not committed, are now handled
  correctly (e.g. ignored in most cases until they're committed).
- It is less likely, but still possible, to receive a CefFrame object with an
  invalid frame ID (ID < 0). This can happen in cases where a RFH has not yet
  been created for a sub-frame. For example, when OnBeforeBrowse is called
  before initiating navigation in a previously nonexisting sub-frame.

To test: All tests pass with NetworkService enabled and disabled.
2019-05-29 17:44:56 +03:00
cef-ms 473c29a70d Add |extra_info| parameter for browser creation (fixes issue #1088)
The optional |extra_info| parameter provides an opportunity to specify extra
information specific to the created browser that will be passed to
CefRenderProcessHandler::OnBrowserCreated() in the render process.
2019-05-08 12:31:46 -04:00
Marshall Greenblatt a23e845244 Remove methods that modify cookie storage at runtime (see issue #2622).
This change removes cookie and request handler functionality that will not
supported by the NetworkService. Specifically, it is no longer possible to
change cookie storage locations at runime by returning a different
CefCookieManager for an already initialized CefRequestContext. After this change
you will need to use a separate CefRequestContext when creating a CefBrowser if
you require separate cookie storage.

The following methods have been removed:
- CefCookieManager::CreateManager
- CefCookieManager::GetBlockingManager
- CefCookieManager::SetStoragePath
- CefRequestContextHandler::GetCookieManager

The following methods have been renamed:
- CefRequestContext::GetDefaultCookieManager to GetCookieManager.

This change substantially simplifies the network implementation in CEF because
it is no longer necessary to proxy objects that are normally owned by Chromium.
Chromium patches that are no longer necessary will be removed as a follow-up
commit.

To test: Verify that `ceftests --gtest_filter=-PluginTest.*` pass with
NetworkService disabled. Plugin tests will be fixed in a follow-up commit.
2019-03-24 16:45:06 -04:00
Marshall Greenblatt a76f40eb83 Add cef_api_hash.h generated by the translator tool (see issue #2596)
This splits out the API hashes from the cef_version.h file which is generated at
build time. Changes to the cef_api_hash.h file are committed to the repo and
represent potentially breaking API changes. This commit history will be used to
calculate the version number.
2019-03-14 12:44:24 -04:00
Marshall Greenblatt 6bfb5ab33b Remove old approach for debugging leaked wrapper object references (issue #2593) 2019-02-14 17:08:44 -05:00
Marshall Greenblatt 3fe062a5b6 Implement new approach for debugging leaked wrapper object references (issue #2593) 2019-02-14 17:08:43 -05:00
Marshall Greenblatt bac8fb5e61 Update copyright year on generated files 2019-01-10 15:22:19 +01:00
Marshall Greenblatt 6df612a597 Update to Chromium version 72.0.3615.0 (#609159)
- The |category| value for all TRACE calls from CEF client applications is now
  "cef.client" due to https://crrev.com/331266377d.
- The |with_menu_marker| parameter to CreateMenuButton has been removed due to
  https://crrev.com/7f7e382118.
2018-12-04 14:45:37 -05:00
Marshall Greenblatt fcad76b405 macOS: Load the CEF framework using dlopen instead of direct linking (issue #2459)
This is a prerequisite for using the Chromium V2 sandbox.
2018-07-27 17:36:49 -04:00
Marshall Greenblatt 0d12959a50 Disable cfi-icall checks for CEF bindings (issue #2472) 2018-07-12 10:58:29 -07:00
Christopher Cifra 4315f3b724 Add support for V8 ArrayBuffers (issue #244) 2018-04-10 16:05:19 -04:00
Marshall Greenblatt ac86b61139 Remove geolocation API support (issue #2380) 2018-02-12 18:51:11 -05:00
Marshall Greenblatt 1c7391b70a Update generated file copyright year 2018-01-03 15:46:26 -05:00