-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chrome: Support creation of lightweight (Alloy-style) windows and browsers #3681
Comments
Split the Alloy runtime into bootstrap and style components. Support creation of Alloy style browsers and windows with the Chrome runtime. Chrome runtime (`--enable-chrome-runtime`) + Alloy style (`--use-alloy-style`) supports Views (`--use-views`), native parent (`--use-native`) and windowless rendering (`--off-screen-rendering-enabled`). Print preview is supported in all cases except with windowless rendering on all platforms and native parent on MacOS. It is disabled by default with Alloy style for legacy compatibility. Where supported it can be enabled or disabled globally using `--[enable|disable]-print-preview` or configured on a per-RequestContext basis using the `printing.print_preview_disabled` preference. It also behaves as expected when triggered via the PDF viewer print button. Chrome runtime + Alloy style behavior differs from Alloy runtime in the following significant ways: - Supports Chrome error pages by default. - DevTools popups are Chrome style only (cannot be windowless). - The Alloy extension API will not supported. Chrome runtime + Alloy style passes all expected Alloy ceftests except the following: - `DisplayTest.AutoResize` (Alloy extension API not supported) - `DownloadTest.*` (Download API not yet supported) - `ExtensionTest.*` (Alloy extension API not supported) This change also adds Chrome runtime support for CefContextMenuHandler::RunContextMenu (see #3293). This change also explicitly blocks (and doesn't retry) FrameAttached requests from PDF viewer and print preview excluded frames (see #3664). Known issues specific to Chrome runtime + Alloy style: - DevTools popup with windowless rendering doesn't load successfully. Use windowed rendering or remote debugging as a workaround. - Chrome style Window with Alloy style BrowserView (`--use-alloy-style --use-chrome-style-window`) does not show Chrome theme changes. To test: - Run `ceftests --enable-chrome-runtime --use-alloy-style [--use-chrome-style-window] [--use-views|--use-native] --gtest_filter=...` - Run `cefclient --enable-chrome-runtime --use-alloy-style [--use-chrome-style-window] [--use-views|--use-native|--off-screen-rendering-enabled]` - Run `cefsimple --enable-chrome-runtime --use-alloy-style [--use-views]`
Remaining work:
|
Test cases have been updated at https://bitbucket.org/chromiumembedded/cef/wiki/ChromiumUpdate#markdown-header-5-run-cef-tests |
Match the logic in Alloy's CefMimeHandlerViewGuestDelegate.
This change adds minimal tabs API support for Alloy style browsers. Clicking links in PDF documents now navigate as expected.
Behaves the same as Alloy runtime except that CanDownload is not called for invalid protocol schemes.
To test: - Run `cefclient --enable-chrome-runtime --use-alloy-style --use-chrome-style-window [--background-color=green]` - OS and Chrome theme changes behave as expected.
To test: - Run `cefclient --enable-chrome-runtime --use-alloy-style --use-chrome-style-window [--background-color=green]` - OS and Chrome theme changes behave as expected.
It appears that DevTools frontend #initializeTarget never completes ( It looks like BuildTargetInfo is passing the wrong |type| value ("other" vs the expected "page") to AttachedToTarget. With OSR:
Without OSR:
Call stack:
|
The problem is ChromeDevToolsManagerDelegate::GetTargetType. The |
Chrome runtime only supports creation of a Views-hosted DevTools popup in ChromeBrowserDelegate::CreateDevToolsBrowser if the parent is also Views-hosted. To test: - Run `cefclient --use-native` - Right click, select "Show DevTools" - Close both windows and the app should exit
Chrome runtime only supports creation of a Views-hosted DevTools popup in ChromeBrowserDelegate::CreateDevToolsBrowser if the parent is also Views-hosted. To test: - Run `cefclient --use-native` - Right click, select "Show DevTools" - Close both windows and the app should exit
Is your feature request related to a problem? Please describe.
Use of the Chrome or Alloy runtime must currently be configured at app startup and cannot be mixed in a single app instance. Each runtime has its own strengths and weaknesses. For example:
Describe the solution you'd like
Start with the Chrome runtime. Add the ability to create lightweight (Alloy-style) windows and browsers that behave the same as existing Alloy windows/browsers. This would include support for the following:
Additional context
Chrome runtime bootstrap means that all global objects and CefRequestContext (Profile) will be Chrome objects. For Alloy-style we will create Widget and WebContents objects directly (like with current Alloy runtime) and modify the existing Alloy implementations to work with Chrome global objects. This can be done in stages:
The text was updated successfully, but these errors were encountered: