| 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 // This file contains the Search autocomplete provider. This provider is | 5 // This file contains the Search autocomplete provider. This provider is |
| 6 // responsible for all autocomplete entries that start with "Search <engine> | 6 // responsible for all autocomplete entries that start with "Search <engine> |
| 7 // for ...", including searching for the current input string, search | 7 // for ...", including searching for the current input string, search |
| 8 // history, and search suggestions. An instance of it gets created and | 8 // history, and search suggestions. An instance of it gets created and |
| 9 // managed by the autocomplete controller. | 9 // managed by the autocomplete controller. |
| 10 | 10 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 bool prefer_keyword); | 151 bool prefer_keyword); |
| 152 | 152 |
| 153 // A helper function for UpdateAllOldResults(). | 153 // A helper function for UpdateAllOldResults(). |
| 154 static void UpdateOldResults(bool minimal_changes, | 154 static void UpdateOldResults(bool minimal_changes, |
| 155 SearchSuggestionParser::Results* results); | 155 SearchSuggestionParser::Results* results); |
| 156 | 156 |
| 157 // Returns the first match in |matches| which might be chosen as default. | 157 // Returns the first match in |matches| which might be chosen as default. |
| 158 static ACMatches::iterator FindTopMatch(ACMatches* matches); | 158 static ACMatches::iterator FindTopMatch(ACMatches* matches); |
| 159 | 159 |
| 160 // AutocompleteProvider: | 160 // AutocompleteProvider: |
| 161 void Start(const AutocompleteInput& input, bool minimal_changes) override; | 161 void Start(const AutocompleteInput& input, |
| 162 bool minimal_changes, |
| 163 bool on_focus) override; |
| 162 void Stop(bool clear_cached_results) override; | 164 void Stop(bool clear_cached_results) override; |
| 163 | 165 |
| 164 // BaseSearchProvider: | 166 // BaseSearchProvider: |
| 165 const TemplateURL* GetTemplateURL(bool is_keyword) const override; | 167 const TemplateURL* GetTemplateURL(bool is_keyword) const override; |
| 166 const AutocompleteInput GetInput(bool is_keyword) const override; | 168 const AutocompleteInput GetInput(bool is_keyword) const override; |
| 167 bool ShouldAppendExtraParams( | 169 bool ShouldAppendExtraParams( |
| 168 const SearchSuggestionParser::SuggestResult& result) const override; | 170 const SearchSuggestionParser::SuggestResult& result) const override; |
| 169 void RecordDeletionResult(bool success) override; | 171 void RecordDeletionResult(bool success) override; |
| 170 | 172 |
| 171 // net::URLFetcherDelegate: | 173 // net::URLFetcherDelegate: |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 base::TimeTicks token_expiration_time_; | 396 base::TimeTicks token_expiration_time_; |
| 395 | 397 |
| 396 // Answers prefetch management. | 398 // Answers prefetch management. |
| 397 AnswersCache answers_cache_; // Cache for last answers seen. | 399 AnswersCache answers_cache_; // Cache for last answers seen. |
| 398 AnswersQueryData prefetch_data_; // Data to use for query prefetching. | 400 AnswersQueryData prefetch_data_; // Data to use for query prefetching. |
| 399 | 401 |
| 400 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 402 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
| 401 }; | 403 }; |
| 402 | 404 |
| 403 #endif // COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ | 405 #endif // COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ |
| OLD | NEW |