[WebLayer] Fix autofill integration
In WebLayer, both TabImpl and ContentView currently hold on to a reference to the AutofillProviderImpl instance that should be used to talk to the Autofill Service. TabImpl updates its reference when an updateFromBrowser() call is received, and ContentView has its reference set to that of the Tab by BrowserViewController on the Tab becoming the active tab. However, this setup is brittle, as if Tab#updateFromBrowser() is called after the Tab becomes the active Tab, ContentView's reference will become stale. Such a call has indeed crept in, as Tab#updateFromBrowser() is now called from BrowserImpl#onFragmentStart(). This means that autofill no longer works in the initial tab. This CL makes this setup more robust by localizing interaction with AutofillProviderImpl inside TabImpl and having ContentView go through TabImpl as necessary. Bug: 1070296 Change-Id: I1c26ab8e5d8e9decfdcc3155e2577b1dbeda32b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149432Reviewed-by:Tobias Sargeant <tobiasjs@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#759232}
Showing
Please register or sign in to comment