| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 non-keyword autocomplete entries that start with | 6 // responsible for all non-keyword autocomplete entries that start with |
| 7 // "Search <engine> for ...", including searching for the current input string, | 7 // "Search <engine> for ...", including searching for the current input string, |
| 8 // search history, and search suggestions. An instance of it gets created and | 8 // search 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // the instant result. | 64 // the instant result. |
| 65 void FinalizeInstantQuery(const string16& input_text, | 65 void FinalizeInstantQuery(const string16& input_text, |
| 66 const string16& suggest_text); | 66 const string16& suggest_text); |
| 67 | 67 |
| 68 // AutocompleteProvider | 68 // AutocompleteProvider |
| 69 virtual void Start(const AutocompleteInput& input, | 69 virtual void Start(const AutocompleteInput& input, |
| 70 bool minimal_changes) OVERRIDE; | 70 bool minimal_changes) OVERRIDE; |
| 71 virtual void Stop() OVERRIDE; | 71 virtual void Stop() OVERRIDE; |
| 72 | 72 |
| 73 // content::URLFetcherDelegate | 73 // content::URLFetcherDelegate |
| 74 virtual void OnURLFetchComplete(const content::URLFetcher* source); | 74 virtual void OnURLFetchComplete(const content::URLFetcher* source) OVERRIDE; |
| 75 | 75 |
| 76 // ID used in creating URLFetcher for default provider's suggest results. | 76 // ID used in creating URLFetcher for default provider's suggest results. |
| 77 static const int kDefaultProviderURLFetcherID; | 77 static const int kDefaultProviderURLFetcherID; |
| 78 | 78 |
| 79 // ID used in creating URLFetcher for keyword provider's suggest results. | 79 // ID used in creating URLFetcher for keyword provider's suggest results. |
| 80 static const int kKeywordProviderURLFetcherID; | 80 static const int kKeywordProviderURLFetcherID; |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 virtual ~SearchProvider(); | 83 virtual ~SearchProvider(); |
| 84 | 84 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 // Has FinalizeInstantQuery been invoked since the last |Start|? | 326 // Has FinalizeInstantQuery been invoked since the last |Start|? |
| 327 bool instant_finalized_; | 327 bool instant_finalized_; |
| 328 | 328 |
| 329 // The |suggest_text| parameter passed to FinalizeInstantQuery. | 329 // The |suggest_text| parameter passed to FinalizeInstantQuery. |
| 330 string16 default_provider_suggest_text_; | 330 string16 default_provider_suggest_text_; |
| 331 | 331 |
| 332 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 332 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
| 333 }; | 333 }; |
| 334 | 334 |
| 335 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ | 335 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ |
| OLD | NEW |