[Omnibox] Zero Suggest Provider

98 views
Skip to first unread message

Oscar Rodriguez

unread,
Oct 1, 2022, 6:35:46 PM10/1/22
to Chromium-dev
Hi  

I'm trying to add new suggestions (coming from an API) right when the user focuses in the omnibox. That works as expected. I can see suggestions populating the address bar when input is empty, and the focus type is "focus". 

The problem that I'm facing is when I enter a query, delete the query and the input is empty. In that case I can see the matches I'm creating in the new provider. It doesn't happen for other providers with a similar zero suggest experience. 

I'm wondering how those work and where this specific case (enter query, delete query) is set. 

Is it somewhere around here? https://source.chromium.org/chromium/chromium/src/+/main:components/omnibox/browser/zero_suggest_provider.cc;bpv=1;bpt=1;l=393?gsn=AllowZeroPrefixSuggestions&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Dc%252B%252B%3Fpath%3Dcomponents%2Fomnibox%2Fbrowser%2Fzero_suggest_provider.h%23_XdstmfKRNYorctb5jcYMbjeXYe63TkNaI4pQdbRjYY&gs=kythe%3A%2F%2Fchromium.googlesource.com%2Fchromium%2Fsrc%3Flang%3Dc%252B%252B%3Fpath%3Dcomponents%2Fomnibox%2Fbrowser%2Fzero_suggest_provider.cc%23t3Fk6sU6PzFzL7t0XTBxS-IJAL_uQNExklH9srfzdZI

Thanks in advance. 
Reply all
Reply to author
Forward
0 new messages