[Autofill Assistant] Disable tab-switching unless it's necessary.

This change disallows tab-switching unless the experiment
AutofillAssistantChromeEntry is enabled, as Autofill Assistant normally
doesn't need it.

Before this change, it was possible to take Autofill Assistant out of
the Chrome Custom tab by choosing "Open in Chrome". It was possible to
have more than one tab open on Chrome Custom Tab without breaking
Autofill Assistant.

With this change, Autofill Assistant turns itself off when choosing
"Open in Chrome" and enters an error when a new tab is opened in Chrome
Custom Tab, like M73 does.

Bug: 925947, b/125738726
Change-Id: I39fc8aecf4479183d6c115c775b13bb218590f57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1507658
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Reviewed-by: Clemens Arbesser <arbesser@google.com>
Cr-Commit-Position: refs/heads/master@{#638600}
2 files changed