If an omnibox suggestion is already opened in another tab, the suggestion should have a way to switch to the opened tab instead of opening the URL in the current Tab, same as what desktop is doing.
Hi gambard@, I looked through your change and noticed that the new IsTabOpenWithURL() method doesn't appear to look at the current profile or incognito level (like the desktop one does.) Am I reading it wrong, or is that not relevant on iOS ?
cheers
Hi krb@, in the current iOS implementation, the autocomplete provider is only checking the tabs opened in the current mode (i.e. it will return true iif the URL is opened in an other tabs in the same mode).
How does it work on desktop?
browser_state is holding the mode. WebState is a representation of a tab (probably the same thing as WebContents?).
Getting the tab model from the BrowserState, gives the TabModel from the current mode, which gives all the tabs for the current mode.
I think it is the same code as on desktop as BrowserList::GetInstance()->GetLastActive(); is the same thing as TabModelList::GetLastActiveTabModelForChromeBrowserState();
We don't have different profiles I think on iOS.
content's BrowserContext == ios' BrowserState
content's WebContents == ios's WebState
AFAIK BrowserState or BrowserContext represent the profile, and on iOS we only support Incognito and Non-Incognito.
Comment 1 by bugdroid1@chromium.org
, Oct 9