OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 static const int kScoreForUnvisitedIntranetResult; | 184 static const int kScoreForUnvisitedIntranetResult; |
185 static const int kScoreForWhatYouTypedResult; | 185 static const int kScoreForWhatYouTypedResult; |
186 static const int kBaseScoreForNonInlineableResult; | 186 static const int kBaseScoreForNonInlineableResult; |
187 | 187 |
188 HistoryURLProvider(AutocompleteProviderListener* listener, Profile* profile); | 188 HistoryURLProvider(AutocompleteProviderListener* listener, Profile* profile); |
189 | 189 |
190 // HistoryProvider: | 190 // HistoryProvider: |
191 virtual void Start(const AutocompleteInput& input, | 191 virtual void Start(const AutocompleteInput& input, |
192 bool minimal_changes, | 192 bool minimal_changes, |
193 bool called_due_to_focus) override; | 193 bool called_due_to_focus) override; |
194 virtual void Stop(bool clear_cached_results) override; | 194 virtual void Stop(bool clear_cached_results, |
| 195 bool due_to_user_inactivity) override; |
195 | 196 |
196 // Returns a match representing a navigation to |destination_url| given user | 197 // Returns a match representing a navigation to |destination_url| given user |
197 // input of |text|. |trim_http| controls whether the match's |fill_into_edit| | 198 // input of |text|. |trim_http| controls whether the match's |fill_into_edit| |
198 // and |contents| should have any HTTP scheme stripped off, and should not be | 199 // and |contents| should have any HTTP scheme stripped off, and should not be |
199 // set to true if |text| contains an http prefix. | 200 // set to true if |text| contains an http prefix. |
200 // NOTES: This does not set the relevance of the returned match, as different | 201 // NOTES: This does not set the relevance of the returned match, as different |
201 // callers want different behavior. Callers must set this manually. | 202 // callers want different behavior. Callers must set this manually. |
202 // This function should only be called on the UI thread. | 203 // This function should only be called on the UI thread. |
203 AutocompleteMatch SuggestExactInput(const base::string16& text, | 204 AutocompleteMatch SuggestExactInput(const base::string16& text, |
204 const GURL& destination_url, | 205 const GURL& destination_url, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 // keep this member is so we can set the cancel bit on it. | 328 // keep this member is so we can set the cancel bit on it. |
328 HistoryURLProviderParams* params_; | 329 HistoryURLProviderParams* params_; |
329 | 330 |
330 // Params controlling experimental behavior of this provider. | 331 // Params controlling experimental behavior of this provider. |
331 HUPScoringParams scoring_params_; | 332 HUPScoringParams scoring_params_; |
332 | 333 |
333 DISALLOW_COPY_AND_ASSIGN(HistoryURLProvider); | 334 DISALLOW_COPY_AND_ASSIGN(HistoryURLProvider); |
334 }; | 335 }; |
335 | 336 |
336 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ | 337 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_URL_PROVIDER_H_ |
OLD | NEW |