Ash <> Browser process focus cycling

11 views
Skip to first unread message

Quan Nguyen

unread,
Aug 14, 2018, 3:50:27 PM8/14/18
to Chromium-dev
Hi all,

I work on the login screen for ChromeOS. In the latest version of login, we have Ash rendering the main parts of the UI, like the shelf buttons and the user views, while the Browser process runs a WebDialogView that shows different screens like the "Add new user" form.

I was wondering if anyone knows a way to implement focus cycling between those two processes? Right now, if the web dialog is showing, we can tab-focus through all the fields/buttons in that webview and it will loop around when it gets to the last element. However, what we want is for the focus to go to the shelf buttons after we tab through all of the web dialog fields. Eventually when we've tabbed through all the Ash views we care about, the focus should then go back to the dialog. Previously the login screen was all done in webui so we didn't have this issue. However, because it's implemented in two different processes now, we need some way of communicating the focus state between the web dialog and Ash.

Thanks for your help!

-Quan

James Cook

unread,
Aug 14, 2018, 5:25:26 PM8/14/18
to qnng...@chromium.org, Xiyuan Xia, Steven Bennetts, Jacob Dufault, chromium-dev
I think we used to have special-case code that handles moving focus from webui to system tray views. Steven/Xiyuan - do you recall?

jdufault might have some thoughts on this. You might need a mojo interface in //ash/public/interfaces to handle passing focus back and forth.

Note that ash and browser are not yet in different processes. They will be, and new code needs to support that case. You can try the out-of-process mode with --enable-features=Mash.

Hope that helps, James

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAGUNCA%3DHDVitzQibCeseZFScLBge0XXUMe-4YcYze%3DP60SZWAA%40mail.gmail.com.

Jacob Dufault

unread,
Aug 14, 2018, 5:51:27 PM8/14/18
to James Cook, qnng...@chromium.org, Xiyuan Xia, Steven Bennetts, Chromium-dev
I'm not aware of any general purpose way to change focus between a widget in chrome and a widget in ash, but we do this already with lock screen apps. See here.

Scott Violet

unread,
Aug 14, 2018, 8:01:28 PM8/14/18
to James Cook, qnng...@chromium.org, Xiyuan Xia, Steven Bennetts, jduf...@chromium.org, chromium-dev

Xiyuan Xia

unread,
Aug 15, 2018, 1:21:01 PM8/15/18
to Scott Violet, James Cook, qnng...@chromium.org, Steven Bennetts, Jacob Dufault, chromium-dev
I don't think we have generic ways to do that. The current WebUILoginView::MoveFocusToSystemTray impl only works when ash is in the browser process. We need to replace it with mojo calls, potentially a totally different way of doing it.
Reply all
Reply to author
Forward
0 new messages