Skip to content
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: Add ability to create Views-hosted DevTools window #3600

Closed
magreenblatt opened this issue Nov 9, 2023 · 2 comments
Closed

chrome: Add ability to create Views-hosted DevTools window #3600

magreenblatt opened this issue Nov 9, 2023 · 2 comments
Labels
chrome Related to the Chrome runtime enhancement Enhancement request views Related to the Views framework

Comments

@magreenblatt
Copy link
Collaborator

magreenblatt commented Nov 9, 2023

Is your feature request related to a problem? Please describe.
After #3282, DevTools windows can be created with default style and a specified CefClient (via CefBrowserProcessHandler::GetDefaultClient). However, it is not currently possible to create a DevTools window hosted in a CefBrowserView.

Additional context
For Alloy, AlloyBrowserHostImpl::Create is called from CefDevToolsFrontend::Show. We need a similar routing to ChromeBrowserHostImpl (in CEF) from DevToolsWindow::CreateDevToolsBrowser (in Chromium).

@magreenblatt magreenblatt added enhancement Enhancement request chrome Related to the Chrome runtime views Related to the Views framework labels Nov 9, 2023
@magreenblatt
Copy link
Collaborator Author

magreenblatt commented Nov 13, 2023

@magreenblatt
Copy link
Collaborator Author

magreenblatt added a commit that referenced this issue Nov 14, 2023
…ixes #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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chrome Related to the Chrome runtime enhancement Enhancement request views Related to the Views framework
Projects
None yet
Development

No branches or pull requests

1 participant