| 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 // Removes any entries that were copied from the last result. This is used by | 667 // Removes any entries that were copied from the last result. This is used by |
| 668 // the popup to ensure it's not showing an out-of-date query. | 668 // the popup to ensure it's not showing an out-of-date query. |
| 669 void ExpireCopiedEntries(); | 669 void ExpireCopiedEntries(); |
| 670 | 670 |
| 671 #ifdef UNIT_TEST | 671 #ifdef UNIT_TEST |
| 672 void set_search_provider(SearchProvider* provider) { | 672 void set_search_provider(SearchProvider* provider) { |
| 673 search_provider_ = provider; | 673 search_provider_ = provider; |
| 674 } | 674 } |
| 675 #endif | 675 #endif |
| 676 SearchProvider* search_provider() const { return search_provider_; } | 676 SearchProvider* search_provider() const { return search_provider_; } |
| 677 KeywordProvider* keyword_provider() const { return keyword_provider_; } |
| 677 | 678 |
| 678 // Getters | 679 // Getters |
| 679 const AutocompleteInput& input() const { return input_; } | 680 const AutocompleteInput& input() const { return input_; } |
| 680 const AutocompleteResult& result() const { return result_; } | 681 const AutocompleteResult& result() const { return result_; } |
| 681 bool done() const { return done_; } | 682 bool done() const { return done_; } |
| 682 | 683 |
| 683 // From AutocompleteProvider::Listener | 684 // From AutocompleteProvider::Listener |
| 684 virtual void OnProviderUpdate(bool updated_matches); | 685 virtual void OnProviderUpdate(bool updated_matches); |
| 685 | 686 |
| 686 private: | 687 private: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 AutocompleteInput::Type input_type; | 757 AutocompleteInput::Type input_type; |
| 757 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). | 758 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). |
| 758 size_t selected_index; | 759 size_t selected_index; |
| 759 // Inline autocompleted length (if displayed). | 760 // Inline autocompleted length (if displayed). |
| 760 size_t inline_autocompleted_length; | 761 size_t inline_autocompleted_length; |
| 761 // Result set. | 762 // Result set. |
| 762 const AutocompleteResult& result; | 763 const AutocompleteResult& result; |
| 763 }; | 764 }; |
| 764 | 765 |
| 765 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 766 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| OLD | NEW |