| 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 #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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // on how many times the URL for the Extension App has been typed and how | 170 // on how many times the URL for the Extension App has been typed and how |
| 171 // many of the letters match. | 171 // many of the letters match. |
| 172 | 172 |
| 173 class AutocompleteController; | 173 class AutocompleteController; |
| 174 class AutocompleteControllerDelegate; | 174 class AutocompleteControllerDelegate; |
| 175 class AutocompleteInput; | 175 class AutocompleteInput; |
| 176 struct AutocompleteMatch; | 176 struct AutocompleteMatch; |
| 177 class AutocompleteProvider; | 177 class AutocompleteProvider; |
| 178 class AutocompleteResult; | 178 class AutocompleteResult; |
| 179 class KeywordProvider; | 179 class KeywordProvider; |
| 180 class OmniboxUIHandler; |
| 180 class Profile; | 181 class Profile; |
| 181 class SearchProvider; | 182 class SearchProvider; |
| 182 class TemplateURL; | 183 class TemplateURL; |
| 183 | 184 |
| 184 typedef std::vector<AutocompleteMatch> ACMatches; | 185 typedef std::vector<AutocompleteMatch> ACMatches; |
| 185 typedef std::vector<AutocompleteProvider*> ACProviders; | 186 typedef std::vector<AutocompleteProvider*> ACProviders; |
| 186 | 187 |
| 187 // AutocompleteInput ---------------------------------------------------------- | 188 // AutocompleteInput ---------------------------------------------------------- |
| 188 | 189 |
| 189 // The user input for an autocomplete query. Allows copying. | 190 // The user input for an autocomplete query. Allows copying. |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 void set_search_provider(SearchProvider* provider) { | 678 void set_search_provider(SearchProvider* provider) { |
| 678 search_provider_ = provider; | 679 search_provider_ = provider; |
| 679 } | 680 } |
| 680 #endif | 681 #endif |
| 681 SearchProvider* search_provider() const { return search_provider_; } | 682 SearchProvider* search_provider() const { return search_provider_; } |
| 682 | 683 |
| 683 // Getters | 684 // Getters |
| 684 const AutocompleteInput& input() const { return input_; } | 685 const AutocompleteInput& input() const { return input_; } |
| 685 const AutocompleteResult& result() const { return result_; } | 686 const AutocompleteResult& result() const { return result_; } |
| 686 bool done() const { return done_; } | 687 bool done() const { return done_; } |
| 688 const ACProviders* providers() const { return &providers_; } |
| 687 | 689 |
| 688 // From AutocompleteProvider::Listener | 690 // From AutocompleteProvider::Listener |
| 689 virtual void OnProviderUpdate(bool updated_matches); | 691 virtual void OnProviderUpdate(bool updated_matches); |
| 690 | 692 |
| 691 private: | 693 private: |
| 692 // Updates |result_| to reflect the current provider state. Resets timers and | 694 // Updates |result_| to reflect the current provider state. Resets timers and |
| 693 // fires notifications as necessary. |is_synchronous_pass| is true only when | 695 // fires notifications as necessary. |is_synchronous_pass| is true only when |
| 694 // Start() is calling this to get the synchronous result. | 696 // Start() is calling this to get the synchronous result. |
| 695 void UpdateResult(bool is_synchronous_pass); | 697 void UpdateResult(bool is_synchronous_pass); |
| 696 | 698 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 // the time the user began typing (this should only happen in | 772 // the time the user began typing (this should only happen in |
| 771 // unit tests), this elapsed time is set to -1 milliseconds. | 773 // unit tests), this elapsed time is set to -1 milliseconds. |
| 772 base::TimeDelta elapsed_time_since_user_first_modified_omnibox; | 774 base::TimeDelta elapsed_time_since_user_first_modified_omnibox; |
| 773 // Inline autocompleted length (if displayed). | 775 // Inline autocompleted length (if displayed). |
| 774 size_t inline_autocompleted_length; | 776 size_t inline_autocompleted_length; |
| 775 // Result set. | 777 // Result set. |
| 776 const AutocompleteResult& result; | 778 const AutocompleteResult& result; |
| 777 }; | 779 }; |
| 778 | 780 |
| 779 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 781 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
| OLD | NEW |