Commit Graph

4 Commits

Author SHA1 Message Date
Marshall Greenblatt a02d2ab3e6 libcef: Format with clang-tidy (see #3632) 2024-01-20 19:33:17 -05:00
Marshall Greenblatt 53ef570f57 chrome: Support Chrome and DevTools command execution (fixes #3282, fixes #3600)
Add new CefBrowserHost::[Can]ExecuteChromeCommand methods for executing
arbitrary Chrome commands.

Add support for existing CefBrowserHost::ShowDevTools, CloseDevTools and
HasDevTools methods.

DevTools windows now support the same Views callbacks as normal popup
windows with the new CefLifeSpanHandler::OnBeforeDevToolsPopup callback
as the DevTools-specific equivalent of OnBeforePopup.

Always create DevTools as an undocked window to support use of
ShowDevTools with default Chrome browser windows.

To test:

Run `ceftests --enable-chrome-runtime [--use-views]
     --gtest_filter=V8Test.OnUncaughtExceptionDevTools`

OR:

1. Run `cefclient --enable-chrome-runtime [--use-native]`
2. Select "Show DevTools", "Close DevTools" or "Inspect" from the
   right-click menu.
3. Notice that the DevTools window is Views-hosted (or native-hosted)
   and works as expected.

Add --use-default-popup to get a default styled popup in step 3.
2023-11-14 17:16:43 +00:00
Marshall Greenblatt 39e64d8cc9 chrome: Standardize fullscreen transition behavor/callbacks (fixes #3571)
Use the same code path for all fullscreen transitions so that Chrome UI updates
correctly. All user-initiated fullscreen transitions now result in
CefWindowDelegate::OnWindowFullscreenTransition callbacks.
2023-09-28 17:44:35 -04:00
Marshall Greenblatt 8733cb89c7 chrome: Add Views API integration (see issue #2969)
The Chrome browser can now be hosted in a Views-based application on Windows
and Linux.

To launch a fully-featured Chrome window using cefsimple:
$ cefsimple --enable-chrome-runtime

To launch a minimally-styled Views-hosted window using cefsimple:
$ cefsimple --enable-chrome-runtime --use-views

To launch a fully-styled Views-hosted window using cefclient:
$ cefclient --enable-chrome-runtime --use-views

Views unit tests also now pass with the Chrome runtime enabled:
$ ceftests --gtest_filter=Views* --enable-chrome-runtime

Known issues:
- Popup browsers cannot be intercepted and reparented.
2021-02-21 15:25:10 -05:00