OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 org.chromium.chrome.browser.TabBase; | 7 import org.chromium.chrome.browser.Tab; |
8 import org.chromium.chrome.browser.profiles.Profile; | 8 import org.chromium.chrome.browser.profiles.Profile; |
9 | 9 |
10 /** | 10 /** |
11 * Java bridge to handle conditional prerendering using autocomplete results * a
s the user types | 11 * Java bridge to handle conditional prerendering using autocomplete results * a
s the user types |
12 * into the Omnibox. | 12 * into the Omnibox. |
13 * | 13 * |
14 * OmniboxPrerender takes keystrokes, autocomplete results and navigation action
s then feeds | 14 * OmniboxPrerender takes keystrokes, autocomplete results and navigation action
s then feeds |
15 * them to the (native) AutocompleteActionPredictor. The predictor uses this dat
a to update its | 15 * them to the (native) AutocompleteActionPredictor. The predictor uses this dat
a to update its |
16 * database and returns predictions on what page, if any, to pre-render or pre-c
onnect. | 16 * database and returns predictions on what page, if any, to pre-render or pre-c
onnect. |
17 * | 17 * |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 * a corresponding autocomplete result. This should be invoked everytime the
omnibox changes | 52 * a corresponding autocomplete result. This should be invoked everytime the
omnibox changes |
53 * (e.g. As the user types characters this method should be invoked at least
once per character) | 53 * (e.g. As the user types characters this method should be invoked at least
once per character) |
54 * | 54 * |
55 * @param url url in the omnibox. | 55 * @param url url in the omnibox. |
56 * @param currentUrl url the current tab is displaying. | 56 * @param currentUrl url the current tab is displaying. |
57 * @param nativeAutocompleteResult native pointer to an autocomplete result. | 57 * @param nativeAutocompleteResult native pointer to an autocomplete result. |
58 * @param profile profile instance corresponding to the active profile. | 58 * @param profile profile instance corresponding to the active profile. |
59 * @param tab The tab whose webcontent's to use. | 59 * @param tab The tab whose webcontent's to use. |
60 */ | 60 */ |
61 public void prerenderMaybe(String url, String currentUrl, long nativeAutocom
pleteResult, | 61 public void prerenderMaybe(String url, String currentUrl, long nativeAutocom
pleteResult, |
62 Profile profile, TabBase tab) { | 62 Profile profile, Tab tab) { |
63 nativePrerenderMaybe(mNativeOmniboxPrerender, url, currentUrl, nativeAut
ocompleteResult, | 63 nativePrerenderMaybe(mNativeOmniboxPrerender, url, currentUrl, nativeAut
ocompleteResult, |
64 profile, tab); | 64 profile, tab); |
65 } | 65 } |
66 | 66 |
67 private native long nativeInit(); | 67 private native long nativeInit(); |
68 private native void nativeClear(long nativeOmniboxPrerender, Profile profile
); | 68 private native void nativeClear(long nativeOmniboxPrerender, Profile profile
); |
69 private native void nativeInitializeForProfile( | 69 private native void nativeInitializeForProfile( |
70 long nativeOmniboxPrerender, | 70 long nativeOmniboxPrerender, |
71 Profile profile); | 71 Profile profile); |
72 private native void nativePrerenderMaybe(long nativeOmniboxPrerender, String
url, | 72 private native void nativePrerenderMaybe(long nativeOmniboxPrerender, String
url, |
73 String currentUrl, long nativeAutocompleteResult, Profile profile, | 73 String currentUrl, long nativeAutocompleteResult, Profile profile, |
74 TabBase tab); | 74 Tab tab); |
75 } | 75 } |
OLD | NEW |