Commit Graph

318 Commits

Author SHA1 Message Date
Marshall Greenblatt ea9bd50fca Fix compile error due to 1669c0af (see issue #123) 2019-07-25 09:17:27 -04:00
Marshall Greenblatt 42b259d124 Fix crash when extensions are disabled (fixes issue #2708, see issue #2622) 2019-07-23 12:20:08 -04: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 3f1ebebde5 Add support for GetAuthCredentials (fixes issue #2718, see issue #2622).
When NetworkService is enabled requests created using CefFrame::CreateURLRequest
will call CefRequestHandler::GetAuthCredentials for the associated browser after
calling CefURLRequestClient::GetAuthCredentials if that call returns false.
2019-07-16 16:33:08 -04:00
Alexander Guettler ac2cc54e13 Add initial Viz implementation for OSR (see issue #2575).
The old shared surface implementation has been removed and will need to be
re-implemented using the Viz code path.
2019-07-16 16:33:08 -04: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 6193d8c554 Update to Chromium version 75.0.3770.0 (#652427) 2019-06-06 18:37:45 +02:00
Marshall Greenblatt ba0e1b5719 Add NetworkService support for CefURLRequest (see issue #2622).
Requests created using CefURLRequest::Create are not associated with a
browser/frame. When originating from the render process these requests cannot be
intercepted and consequently only http(s) and blob requests are supported. To
work around this limitation a new CefFrame::CreateURLRequest method has been
added that allows the request to be associated with that browser/frame for
interception purposes.

This change also fixes an issue with the NetworkService implementation where
redirected requests could result in two parallel requests being sent to the
target server.

To test: URLRequestTest.* tests pass with NetworkService enabled.
2019-05-17 21:42:25 +03:00
Marshall Greenblatt 8b400331c7 Support disabling of cookie load/save via SetSupportedSchemes (see issue #2622).
With this change the CefCookieManager::SetSupportedSchemes method can be used
to disable all loading and saving of cookies for the associated request context.
This matches functionality that was previously available via GetBlockingManager.

This change also fixes a bug where Set-Cookie headers returned for a request
handled via CefSchemeHandlerFactory would be ignored if there was not also a
CefResourceRequestHandler returned for the request.

To test: All CookieTest.* tests pass.
2019-05-02 18:33:10 -04:00
Marshall Greenblatt cef882616b Fix NetworkService cache directory structure (see issue #2622).
To test: When running `cefclient --cache-path=c:\temp\cache` with NetworkService
enabled the the cache directory structure should be "C:\temp\cache\Cache"
instead of "C:\temp\cache\cache\Cache".
2019-05-02 14:51:02 -04:00
Marshall Greenblatt 4592cba19f Fix command-line override of the User-Agent product component (see issue #2622).
When the NetworkService is enabled the U-A string is configured via
SystemNetworkContextManager::CreateDefaultNetworkContextParams, which calls
chrome_content_browser_client.cc GetUserAgent(). This change modifies the Chrome
implementation to match CEF, so that the U-A product component can still be
overridden via the `--product-version` command-line flag.

To test: Verify that chrome://version, navigator.userAgent (JS executed from
DevTools console) and network requests (headers shown in DevTools Network tab)
show the expected User-Agent value in the following cases:
- Running `cefclient --enable-network-service --user-agent="<value>"`
- Running `cefclient --enable-network-service --product-version="<value>"`
2019-05-02 14:06:54 -04:00
Marshall Greenblatt 5ce52bd775 Add NetworkService support for extensions and downloads (see issue #2622).
To test:
- All tests pass with NetworkService disabled. DownloadTest.*, ExtensionTest.*
  and PluginTest.* tests pass with NetworkService enabled.
- The PDF extension displays a file, and the download and print buttons work.
2019-05-01 17:10:52 -04:00
Marshall Greenblatt 8f240861e3 Implement NetworkService request interception/handling (see issue #2622).
Implementation notes:
- Chromium change: CookieMonster::SetCookieableSchemes needs to be called
  immediately after the CookieMonster is created in NetworkContext::
  ApplyContextParamsToBuilder. Add a Profile::GetCookieableSchemes method and
  NetworkContextParams.cookieable_schemes member (set from
  ProfileNetworkContextService::CreateNetworkContextParams) to support that.
- Chromium change: Add a ContentBrowserClient::HandleExternalProtocol variant
  that exposes additional NetworkService request information.
- GetResourceResponseFilter is not yet implemented.

API changes:
- Resource-related callbacks have been moved from CefRequestHandler to a new
  CefResourceRequestHandler interface which is returned via the
  GetResourceRequestHandler method. If the CefRequestHandler declines to handle
  a resource it can optionally be handled by the CefRequestContextHandler, if
  any, associated with the loading context.
- The OnProtocolExecution callback has been moved from CefRequestHandler to
  CefResourceRequestHandler and will be called if a custom scheme request is
  unhandled.
- Cookie send/save permission callbacks have been moved from CefRequestHandler
  and CefResourceHandler to CefResourceRequestHandler.
- New methods added to CefResourceHandler that better match NetworkService
  execution sequence expectations. The old methods are now deprecated.
- New methods added to CefRequest and CefResponse.

Known behavior changes with the NetworkService implementation:
- Modifying the |new_url| parameter in OnResourceRedirect will no longer result
  in the method being called an additional time (likely a bug in the old
  implementation).
- Modifying the request URL in OnResourceResponse would previously cause a
  redirect. This behavior is now deprecated because the NetworkService does not
  support this functionality when using default network loaders. Temporary
  support has been added in combination with CefResourceHandler usage only.
- Other changes to the request object in OnResourceResponse will now cause the
  request to be restarted. This means that OnBeforeResourceLoad, etc, will be
  called an additional time with the new request information.
- CefResponse::GetMimeType will now be empty for non-200 responses.
- Requests using custom schemes can now be handled via CefResourceRequestHandler
  with the same callback behavior as builtin schemes.
- Redirects of custom scheme requests will now be followed as expected.
- Default handling of builtin schemes can now be disabled by setting
  |disable_default_handling| to true in GetResourceRequestHandler.
- Unhandled requests (custom scheme or builtin scheme with default handling
  disabled) will fail with an CefResponse::GetError value of
  ERR_UNKNOWN_URL_SCHEME.
- The CefSchemeHandlerFactory::Create callback will now include cookie headers.

To test:
- Run `cefclient --enable-network-service`. All resources should load
  successfully (this tests the transparent proxy capability).
- All tests pass with NetworkService disabled.
- The following tests pass with NetworkService enabled:
  - CookieTest.*
  - FrameTest.* (excluding .*Nav)
  - NavigationTest.* (excluding .Redirect*)
  - RequestHandlerTest.*
  - RequestContextTest.Basic*
  - RequestContextTest.Popup*
  - RequestTest.*
  - ResourceManagerTest.*
  - ResourceRequestHandlerTest.* (excluding .Filter*)
  - SchemeHandlerTest.*
  - StreamResourceHandlerTest.*
2019-04-23 22:53:28 -04:00
Daniel Nitsche 879911b721 Update to Chromium version 75.0.3749.0 (#645082) 2019-04-16 14:38:48 +00:00
Marshall Greenblatt 941d53ebfd Fix CHECK on startup when running with --trace-startup=mojom (see issue #2622). 2019-03-27 14:44:11 -04:00
Marshall Greenblatt 9b43d265c3 Remove Chromium patches that are no longer required (see issue #2622). 2019-03-24 16:45:07 -04:00
Marshall Greenblatt b3468451f5 Linux: Load additional binaries from DIR_ASSETS (fixes issue #1936)
This adds *.pak, locales/*.pak , chrome-sandbox, libGLESv2.so, libEGL.so and
swiftshader/*.so to the list of binaries that will be loaded from the libcef.so
directory instead of the executable directory by default.
2019-03-20 14:14:49 -04:00
Riku Palomäki e5568118ac Don't create cache directories in incognito mode (fixes issue #2289) 2019-03-18 17:22:52 -04:00
Alexander Guettler 725ed88529 Update to Chromium version 74.0.3729.0 (#638880)
- Windows: 10.0.17763.0 SDK is now required.
- Mac: 10.13 SDK is now required.
- Removed CefRequestContext::ResolveHostCached which is no longer supported by Chromium.
2019-03-13 21:27:37 +00:00
Riku Palomäki 5f615a95bc Add multi-touch support for OSR (issue #1059) 2019-02-26 11:51:33 -05:00
Marshall Greenblatt 3cf50ed942 Trigger CEF Save As dialog from chrome://net-export (issue #2613) 2019-02-25 13:26:38 -05:00
Marshall Greenblatt 5a1c642431 Update to Chromium version 74.0.3706.0 (#632463) 2019-02-25 12:09:54 -05:00
Marshall Greenblatt 406e347d6f Linux: Use existing keycodes_x_export.h file (issue #2587) 2019-02-13 17:46:57 -05:00
Riku Palomäki b5d76b499c Linux: Fixed component build failure due to undefined KeySym functions (issue #2587) 2019-02-13 14:23:10 -05:00
Marshall Greenblatt bf51cd21b6 Update to Chromium version 73.0.3683.0 (#625896) 2019-02-04 11:16:53 -05:00
Marshall Greenblatt 2e7f935b0d Update to Chromium version 73.0.3679.0 (#624510) 2019-02-01 16:42:40 +00:00
Alexander Guettler 1a86240c93 Update to Chromium version 73.0.3665.0 (#620590) 2019-01-18 11:25:51 +01:00
Alexander Guettler 7f08159461 Fix ReleasePump patch, the unique_ptr was moved to the backend 2019-01-11 10:47:34 +01:00
Marshall Greenblatt 28d24e22d6 Update to Chromium version 72.0.3626.0 (#612437)
- Windows: Can now build with either 10.0.17134 or 10.0.17763 SDK.
2018-12-26 19:15:28 +02: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 285dbb1ce6 macOS: Fix crash when scrolling in OSR mode (issue #2540) 2018-11-06 17:27:26 -05:00
Marshall Greenblatt bb5fe57984 macOS: Make the NativeEventProcessor protocol dependency optional (issue #2539) 2018-11-06 13:52:09 -05:00
Marshall Greenblatt a7e997e524 Update to Chromium version 72.0.3599.0 (#604791) 2018-11-05 13:31:55 -05:00
Marshall Greenblatt 315b57e9f7 Update to Chromium version 71.0.3578.0 (#599034) 2018-10-25 12:57:05 -04:00
Marshall Greenblatt da53451f97 Update to Chromium version 71.0.3567.0 (#595360)
- Configuration of OSR VSync interval is currently missing (issue #2517)
- Rename VERSION to VERSION.in to fix libc++ compile error (issue #2518)
2018-10-04 12:17:26 +03:00
Marshall Greenblatt a2bf177a32 macOS: Fix crash when showing a select popup with CefDoMessageLoopWork (issue #2495) 2018-09-28 16:27:32 +02:00
Marshall Greenblatt 8a055593d6 Fix redraw of OSR PDF viewer (issue #2507) 2018-09-27 16:00:45 +02:00
Greg Wessels 713eebcafc Add support for shared texture and external BeginFrame in OSR mode (issue #1006)
- Add CefWindowInfo::shared_texture_enabled and
  CefRenderHandler::OnAcceleratedPaint for shared texture support. Currently
  only supported on Windows (D3D11).
- Add CefWindowInfo::external_begin_frame_enabled and
  CefBrowserHost::SendExternalBeginFrame for external begin frame support.
2018-09-26 13:10:49 +02:00
Marshall Greenblatt 275af5e972 Linux: Add missing use_gtk check (issue #2014) 2018-09-24 15:45:39 +02:00
Marshall Greenblatt 8aa4b7aaae Linux: Add multi-threaded message loop support (issue #2512) 2018-09-20 15:17:35 +02:00
Marshall Greenblatt f97a241126 Remove Singleton patches which are no longer required (issue #2362) 2018-09-06 21:45:49 +02:00
Marshall Greenblatt 0401e6b912 Windows: Fix DCHECKs during shutdown with multi-threaded message loop mode (issue #2362) 2018-09-06 17:32:01 +02:00
Marshall Greenblatt e8e0f1f6c6 Linux: Remove GTK build dependency (issue #2014) 2018-09-06 02:29:45 -07:00
Marshall Greenblatt a64237bcb0 Update to Chromium version 70.0.3538.0 (#587811)
Known issues:
- The CefLoadCRLSetsFile function needs to be re-implemented (see issue #2497).
- Linux: GTK2 support has been removed. The cefclient sample needs to be updated
  to use GTK3 (see issue #2014).
2018-09-05 15:42:42 +02:00
Marshall Greenblatt ea0e213bef Update to Chromium version 70.0.3516.0 (#581409) 2018-08-10 11:31:08 -04:00
Marshall Greenblatt a659b48fd1 Update to Chromium version 70.0.3507.0 (#578961) 2018-08-02 15:15:23 -04:00
Marshall Greenblatt 7f3c21b64a macOS: Add angle and swiftshader libraries to the app bundle (issue #2446)" 2018-07-25 15:18:24 -04:00
Marshall Greenblatt 7d09642925 Update to Chromium version 69.0.3497.0 (#576753) 2018-07-24 12:15:30 -04:00
Alexander Guettler fad6aec5d0 Add MouseWheelPhaseHandler for OSR (issue #2214) 2018-07-13 15:50:16 -04:00
Marshall Greenblatt 96bd993d99 Update to Chromium version 69.0.3489.0 (#574445) 2018-07-13 15:29:39 -04:00