OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 // | 521 // |
522 // Once Stop() has been called, no more notifications should be sent. | 522 // Once Stop() has been called, no more notifications should be sent. |
523 // | 523 // |
524 // |minimal_changes| is an optimization that lets the provider do less work | 524 // |minimal_changes| is an optimization that lets the provider do less work |
525 // when the |input|'s text hasn't changed. See the body of | 525 // when the |input|'s text hasn't changed. See the body of |
526 // AutocompletePopupModel::StartAutocomplete(). | 526 // AutocompletePopupModel::StartAutocomplete(). |
527 virtual void Start(const AutocompleteInput& input, | 527 virtual void Start(const AutocompleteInput& input, |
528 bool minimal_changes) = 0; | 528 bool minimal_changes) = 0; |
529 | 529 |
530 // Called when a provider must not make any more callbacks for the current | 530 // Called when a provider must not make any more callbacks for the current |
531 // query. | 531 // query. This will be called regardless of whether the provider is already |
| 532 // done. |
532 virtual void Stop() { | 533 virtual void Stop() { |
533 done_ = true; | 534 done_ = true; |
534 } | 535 } |
535 | 536 |
536 // Returns the set of matches for the current query. | 537 // Returns the set of matches for the current query. |
537 const ACMatches& matches() const { return matches_; } | 538 const ACMatches& matches() const { return matches_; } |
538 | 539 |
539 // Returns whether the provider is done processing the query. | 540 // Returns whether the provider is done processing the query. |
540 bool done() const { return done_; } | 541 bool done() const { return done_; } |
541 | 542 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 AutocompleteInput::Type input_type; | 890 AutocompleteInput::Type input_type; |
890 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). | 891 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). |
891 size_t selected_index; | 892 size_t selected_index; |
892 // Inline autocompleted length (if displayed). | 893 // Inline autocompleted length (if displayed). |
893 size_t inline_autocompleted_length; | 894 size_t inline_autocompleted_length; |
894 // Result set. | 895 // Result set. |
895 const AutocompleteResult& result; | 896 const AutocompleteResult& result; |
896 }; | 897 }; |
897 | 898 |
898 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 899 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
OLD | NEW |