Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
| index 12ecd35ff03162d45aaf18738d8d58d586febec6..860795057b949d4ab9dd1acb83bbd0e01e0b4cd6 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java |
| @@ -9,6 +9,7 @@ import android.text.TextUtils; |
| import org.chromium.base.VisibleForTesting; |
| import org.chromium.base.annotations.CalledByNative; |
| +import org.chromium.chrome.browser.WarmupManager; |
| import org.chromium.chrome.browser.omnibox.OmniboxSuggestion.MatchClassification; |
| import org.chromium.chrome.browser.omnibox.VoiceSuggestionProvider.VoiceResult; |
| import org.chromium.chrome.browser.profiles.Profile; |
| @@ -159,6 +160,12 @@ public class AutocompleteController { |
| public void startZeroSuggest(Profile profile, String omniboxText, String url, |
| boolean focusedFromFakebox) { |
| if (profile == null || TextUtils.isEmpty(url)) return; |
| + |
| + if (!focusedFromFakebox) { |
|
Ted C
2017/07/11 16:21:46
I wonder if this should instead be NewTabPage.isNT
mattcary
2017/07/12 10:39:17
Done.
I tested on a tablet, and using focusedFrom
|
| + // Proactively start up a renderer, to reduce the time to display search results, |
| + // especially if a Service Worker is used. |
| + WarmupManager.getInstance().createSpareRenderProcessHost(profile); |
| + } |
| mNativeAutocompleteControllerAndroid = nativeInit(profile); |
| if (mNativeAutocompleteControllerAndroid != 0) { |
| if (mUseCachedZeroSuggestResults) mWaitingForSuggestionsToCache = true; |