Change information
Commit message:
[AIM] Preserve AutocompleteState through tab switch.
AutocompleteState is set to ENABLED in the constructor and reset of
AutocompleteInput. This is convenient for creating new objects to pass
to beginInput(), but is the opposite of what we want to do when
deactivated (unfocus). Now that this is manually overriding the state,
we can trust the state when switching back to a tab. Some location bar
mediator logic needed to be updated to account for not getting ENABLED
states automatically now.
The functional difference is when you tab tab to an existing NTP, it's
correctly tracking the difference between STANDBY and DISABLED.
Bug: 522911537, 529854485, 526655008
Change-Id: I67e8e473271faab56d8cd7fe88d5324922648bf5
Cr-Commit-Position: refs/heads/main@{#1659102}
Files:
- M chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/FuseboxSessionState.java
- M chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/FuseboxSessionStateUnitTest.java
- M chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java
- M chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediatorTest.java
Change size: M
Delta: 4 files changed, 67 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
Code-Review: +1 by Patrick Noland