Descriptioncustomtabs: Pre-create a renderer in mayLaunchUrl().
When the client application indicates that it is likely to navigate to a
URL, we either pre-render it, or starting with this CL, pre-create a
renderer.
Renderer creation is relatively slow on Android, and even when a bound
service is already there, additional initialization is necessary to get
a usable renderer.
This commit makes the "spare" renderer navigate to about:blank, to force
a complete initialization of it. Testing on a Nexus 5 with Android 5.1.1
has shown ~200ms improvement with this change for the time to navigation
commit.
Most of the patch is plumbing to make sure that the "about:blank"
navigation doesn't get registered, so that a back navigation in a Custom
Tab doesn't go to about:blank.
BUG=511280
Committed: https://crrev.com/e8adeb87d8f923c541b93148a8c2149efd07811e
Cr-Commit-Position: refs/heads/master@{#344480}
Patch Set 1 #Patch Set 2 : Add a test (check that about:blank is ignored in the history) #Patch Set 3 : Rebase. #
Total comments: 10
Patch Set 4 : Address comments + rebase. #
Total comments: 2
Patch Set 5 : ... #Patch Set 6 : Rebase. #Messages
Total messages: 25 (7 generated)
|