| Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
|
| index 4ba551228cff3f001a6e808f728b4208a1ecc914..afb131757b8bfc19d03061024a1e9c04627595c0 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
|
| @@ -480,8 +480,7 @@ public class ContextualSearchManager implements ContextualSearchManagementDelega
|
| // Note: whether the sprite should be animated or not needs to be set before the call to
|
| // peekPanel(). If the sprite should be animated, the animation will begin after the panel
|
| // finishes peeking. If it should not be animated, the icon will be drawn right away.
|
| - mSearchPanel.setShouldAnimateIconSprite(mPolicy.shouldAnimateSearchProviderIcon(),
|
| - ContextualSearchFieldTrial.areExtraSearchBarAnimationsDisabled());
|
| + mSearchPanel.setShouldAnimateIconSprite(mPolicy.shouldAnimateSearchProviderIcon());
|
|
|
| // Note: now that the contextual search has properly started, set the promo involvement.
|
| if (mPolicy.isPromoAvailable()) {
|
| @@ -653,22 +652,23 @@ public class ContextualSearchManager implements ContextualSearchManagementDelega
|
| * @param selectionEndAdjust A positive number of characters that the end of the existing
|
| * selection should be expanded by.
|
| * @param contextLanguage The language of the original search term, or an empty string.
|
| + * @param thumbnailUrl The URL of the thumbnail to display in our UX.
|
| */
|
| @CalledByNative
|
| public void onSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
|
| final String searchTerm, final String displayText, final String alternateTerm,
|
| final String mid, boolean doPreventPreload, int selectionStartAdjust,
|
| - int selectionEndAdjust, final String contextLanguage) {
|
| + int selectionEndAdjust, final String contextLanguage, final String thumbnailUrl) {
|
| mNetworkCommunicator.handleSearchTermResolutionResponse(isNetworkUnavailable, responseCode,
|
| searchTerm, displayText, alternateTerm, mid, doPreventPreload, selectionStartAdjust,
|
| - selectionEndAdjust, contextLanguage);
|
| + selectionEndAdjust, contextLanguage, thumbnailUrl);
|
| }
|
|
|
| @Override
|
| public void handleSearchTermResolutionResponse(boolean isNetworkUnavailable, int responseCode,
|
| String searchTerm, String displayText, String alternateTerm, String mid,
|
| boolean doPreventPreload, int selectionStartAdjust, int selectionEndAdjust,
|
| - String contextLanguage) {
|
| + String contextLanguage, String thumbnailUrl) {
|
| // Show an appropriate message for what to search for.
|
| String message;
|
| boolean doLiteralSearch = false;
|
| @@ -686,7 +686,9 @@ public class ContextualSearchManager implements ContextualSearchManagementDelega
|
| R.string.contextual_search_error, responseCode);
|
| doLiteralSearch = true;
|
| }
|
| - mSearchPanel.onSearchTermResolved(message);
|
| + thumbnailUrl = ContextualSearchFieldTrial.isNowOnTapBarIntegrationEnabled()
|
| + ? thumbnailUrl : "";
|
| + mSearchPanel.onSearchTermResolved(message, thumbnailUrl);
|
|
|
| // If there was an error, fall back onto a literal search for the selection.
|
| // Since we're showing the panel, there must be a selection.
|
|
|