Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 // |suggestion.text|. |input_text| is the text the user input into the edit. | 66 // |suggestion.text|. |input_text| is the text the user input into the edit. |
| 67 // |input_text| differs from |input_.text()| if the input contained | 67 // |input_text| differs from |input_.text()| if the input contained |
| 68 // whitespace. | 68 // whitespace. |
| 69 // | 69 // |
| 70 // This method also marks the search provider as no longer needing to wait for | 70 // This method also marks the search provider as no longer needing to wait for |
| 71 // the instant result. | 71 // the instant result. |
| 72 void FinalizeInstantQuery(const string16& input_text, | 72 void FinalizeInstantQuery(const string16& input_text, |
| 73 const InstantSuggestion& suggestion); | 73 const InstantSuggestion& suggestion); |
| 74 void ClearInstantSuggestion(); | 74 void ClearInstantSuggestion(); |
| 75 | 75 |
| 76 // Sets |match| to be a search for |query|, using the default search provider | |
| 77 // or current keyword provider (based on |is_keyword|). |original_query| and | |
| 78 // |accepted_suggestion| are used to fill in AQS (Assisted Query Stats). | |
| 79 // Returns true if successful (i.e., the |match| was filled in correctly). | |
| 80 bool GetSearchWhatYouTypedMatch(const string16& query, | |
|
Mark P
2013/04/09 23:59:11
I find this somewhat misleading. The match you're
sreeram
2013/04/11 20:37:54
Done.
| |
| 81 const string16& original_query, | |
| 82 int accepted_suggestion, | |
| 83 bool is_keyword, | |
| 84 AutocompleteMatch* match); | |
| 85 | |
| 76 // AutocompleteProvider: | 86 // AutocompleteProvider: |
| 77 virtual void Start(const AutocompleteInput& input, | 87 virtual void Start(const AutocompleteInput& input, |
| 78 bool minimal_changes) OVERRIDE; | 88 bool minimal_changes) OVERRIDE; |
| 79 virtual void Stop(bool clear_cached_results) OVERRIDE; | 89 virtual void Stop(bool clear_cached_results) OVERRIDE; |
| 80 | 90 |
| 81 // Adds search-provider-specific information to omnibox event logs. | 91 // Adds search-provider-specific information to omnibox event logs. |
| 82 virtual void AddProviderInfo(ProvidersInfo* provider_info) const OVERRIDE; | 92 virtual void AddProviderInfo(ProvidersInfo* provider_info) const OVERRIDE; |
| 83 | 93 |
| 84 // Sets |field_trial_triggered_in_session_| to false. | 94 // Sets |field_trial_triggered_in_session_| to false. |
| 85 virtual void ResetSession() OVERRIDE; | 95 virtual void ResetSession() OVERRIDE; |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 468 bool field_trial_triggered_; | 478 bool field_trial_triggered_; |
| 469 | 479 |
| 470 // Same as above except that it is maintained across the current Omnibox | 480 // Same as above except that it is maintained across the current Omnibox |
| 471 // session. | 481 // session. |
| 472 bool field_trial_triggered_in_session_; | 482 bool field_trial_triggered_in_session_; |
| 473 | 483 |
| 474 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 484 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
| 475 }; | 485 }; |
| 476 | 486 |
| 477 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ | 487 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ |
| OLD | NEW |