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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 // to explain in the abstract; the practical use case is that after the user | 566 // to explain in the abstract; the practical use case is that after the user |
567 // deletes text in the edit, the HistoryURLProvider should make sure not to | 567 // deletes text in the edit, the HistoryURLProvider should make sure not to |
568 // promote a match requiring inline autocomplete too highly. | 568 // promote a match requiring inline autocomplete too highly. |
569 // | 569 // |
570 // |prefer_keyword| should be true when the keyword UI is onscreen; this will | 570 // |prefer_keyword| should be true when the keyword UI is onscreen; this will |
571 // bias the autocomplete result set toward the keyword provider when the input | 571 // bias the autocomplete result set toward the keyword provider when the input |
572 // string is a bare keyword. | 572 // string is a bare keyword. |
573 // | 573 // |
574 // |allow_exact_keyword_match| should be false when triggering keyword mode on | 574 // |allow_exact_keyword_match| should be false when triggering keyword mode on |
575 // the input string would be surprising or wrong, e.g. when highlighting text | 575 // the input string would be surprising or wrong, e.g. when highlighting text |
576 // in a page and telling the browser to search for it or navigate to it. | 576 // in a page and telling the browser to search for it or navigate to it. This |
| 577 // parameter only applies to substituting keywords. |
577 | 578 |
578 // If |synchronous_only| is true, the controller asks the providers to only | 579 // If |synchronous_only| is true, the controller asks the providers to only |
579 // return matches which are synchronously available, which should mean that | 580 // return matches which are synchronously available, which should mean that |
580 // all providers will be done immediately. | 581 // all providers will be done immediately. |
581 // | 582 // |
582 // The controller will fire | 583 // The controller will fire |
583 // AUTOCOMPLETE_CONTROLLER_SYNCHRONOUS_MATCHES_AVAILABLE from inside this | 584 // AUTOCOMPLETE_CONTROLLER_SYNCHRONOUS_MATCHES_AVAILABLE from inside this |
584 // call, and unless the query is stopped, will fire at least one (and perhaps | 585 // call, and unless the query is stopped, will fire at least one (and perhaps |
585 // more) AUTOCOMPLETE_CONTROLLER_RESULT_UPDATED later as more matches come in | 586 // more) AUTOCOMPLETE_CONTROLLER_RESULT_UPDATED later as more matches come in |
586 // (even if the query completes synchronously). Listeners should use the | 587 // (even if the query completes synchronously). Listeners should use the |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 AutocompleteInput::Type input_type; | 718 AutocompleteInput::Type input_type; |
718 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). | 719 // Selected index (if selected) or -1 (AutocompletePopupModel::kNoMatch). |
719 size_t selected_index; | 720 size_t selected_index; |
720 // Inline autocompleted length (if displayed). | 721 // Inline autocompleted length (if displayed). |
721 size_t inline_autocompleted_length; | 722 size_t inline_autocompleted_length; |
722 // Result set. | 723 // Result set. |
723 const AutocompleteResult& result; | 724 const AutocompleteResult& result; |
724 }; | 725 }; |
725 | 726 |
726 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ | 727 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
OLD | NEW |