| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 static void UpdateOldResults(bool minimal_changes, | 155 static void UpdateOldResults(bool minimal_changes, |
| 156 SearchSuggestionParser::Results* results); | 156 SearchSuggestionParser::Results* results); |
| 157 | 157 |
| 158 // Returns the first match in |matches| which might be chosen as default. | 158 // Returns the first match in |matches| which might be chosen as default. |
| 159 static ACMatches::iterator FindTopMatch(ACMatches* matches); | 159 static ACMatches::iterator FindTopMatch(ACMatches* matches); |
| 160 | 160 |
| 161 // AutocompleteProvider: | 161 // AutocompleteProvider: |
| 162 void Start(const AutocompleteInput& input, | 162 void Start(const AutocompleteInput& input, |
| 163 bool minimal_changes, | 163 bool minimal_changes, |
| 164 bool called_due_to_focus) override; | 164 bool called_due_to_focus) override; |
| 165 void Stop(bool clear_cached_results) override; | 165 void Stop(bool clear_cached_results, |
| 166 bool user_inactivity_timer) override; |
| 166 | 167 |
| 167 // BaseSearchProvider: | 168 // BaseSearchProvider: |
| 168 const TemplateURL* GetTemplateURL(bool is_keyword) const override; | 169 const TemplateURL* GetTemplateURL(bool is_keyword) const override; |
| 169 const AutocompleteInput GetInput(bool is_keyword) const override; | 170 const AutocompleteInput GetInput(bool is_keyword) const override; |
| 170 bool ShouldAppendExtraParams( | 171 bool ShouldAppendExtraParams( |
| 171 const SearchSuggestionParser::SuggestResult& result) const override; | 172 const SearchSuggestionParser::SuggestResult& result) const override; |
| 172 void RecordDeletionResult(bool success) override; | 173 void RecordDeletionResult(bool success) override; |
| 173 | 174 |
| 174 // net::URLFetcherDelegate: | 175 // net::URLFetcherDelegate: |
| 175 void OnURLFetchComplete(const net::URLFetcher* source) override; | 176 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 base::TimeTicks token_expiration_time_; | 398 base::TimeTicks token_expiration_time_; |
| 398 | 399 |
| 399 // Answers prefetch management. | 400 // Answers prefetch management. |
| 400 AnswersCache answers_cache_; // Cache for last answers seen. | 401 AnswersCache answers_cache_; // Cache for last answers seen. |
| 401 AnswersQueryData prefetch_data_; // Data to use for query prefetching. | 402 AnswersQueryData prefetch_data_; // Data to use for query prefetching. |
| 402 | 403 |
| 403 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 404 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
| 404 }; | 405 }; |
| 405 | 406 |
| 406 #endif // COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ | 407 #endif // COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ |
| OLD | NEW |