Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/AutocompleteController.java

Issue 292073002: [AiS] Bring Answers from C++ to Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.omnibox; 5 package org.chromium.chrome.browser.omnibox;
6 6
7 import android.text.TextUtils; 7 import android.text.TextUtils;
8 8
9 import com.google.common.annotations.VisibleForTesting; 9 import com.google.common.annotations.VisibleForTesting;
10 10
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 208
209 @CalledByNative 209 @CalledByNative
210 private static void addOmniboxSuggestionToList(List<OmniboxSuggestion> sugge stionList, 210 private static void addOmniboxSuggestionToList(List<OmniboxSuggestion> sugge stionList,
211 OmniboxSuggestion suggestion) { 211 OmniboxSuggestion suggestion) {
212 suggestionList.add(suggestion); 212 suggestionList.add(suggestion);
213 } 213 }
214 214
215 @CalledByNative 215 @CalledByNative
216 private static OmniboxSuggestion buildOmniboxSuggestion(int nativeType, int relevance, 216 private static OmniboxSuggestion buildOmniboxSuggestion(int nativeType, int relevance,
217 int transition, String text, String description, String fillIntoEdit , String url, 217 int transition, String text, String description, String answerConten ts,
218 String formattedUrl, boolean isStarred, boolean isDeletable) { 218 String answerType, String fillIntoEdit, String url, String formatted Url,
219 boolean isStarred, boolean isDeletable) {
219 return new OmniboxSuggestion(nativeType, relevance, transition, text, de scription, 220 return new OmniboxSuggestion(nativeType, relevance, transition, text, de scription,
220 fillIntoEdit, url, formattedUrl, isStarred, isDeletable); 221 answerContents, answerType, fillIntoEdit, url, formattedUrl, isS tarred,
222 isDeletable);
221 } 223 }
222 224
223 /** 225 /**
224 * Updates aqs parameters on the selected match that we will navigate to and returns the 226 * Updates aqs parameters on the selected match that we will navigate to and returns the
225 * updated URL. |selected_index| is the position of the selected match and 227 * updated URL. |selected_index| is the position of the selected match and
226 * |elapsed_time_since_input_change| is the time in ms between the first typ ed input and match 228 * |elapsed_time_since_input_change| is the time in ms between the first typ ed input and match
227 * selection. 229 * selection.
228 * 230 *
229 * @param selectedIndex The index of the autocomplete entry selected. 231 * @param selectedIndex The index of the autocomplete entry selected.
230 * @param elapsedTimeSinceInputChange The number of ms between the time the user started 232 * @param elapsedTimeSinceInputChange The number of ms between the time the user started
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 * @param query The query to be expanded into a fully qualified URL if appro priate. 269 * @param query The query to be expanded into a fully qualified URL if appro priate.
268 * @return The fully qualified URL or null. 270 * @return The fully qualified URL or null.
269 */ 271 */
270 public static native String nativeQualifyPartialURLQuery(String query); 272 public static native String nativeQualifyPartialURLQuery(String query);
271 273
272 /** 274 /**
273 * Sends a zero suggest request to the server in order to pre-populate the r esult cache. 275 * Sends a zero suggest request to the server in order to pre-populate the r esult cache.
274 */ 276 */
275 public static native void nativePrefetchZeroSuggestResults(); 277 public static native void nativePrefetchZeroSuggestResults();
276 } 278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698