OLD | NEW |
1 // Copyright 2008, Google Inc. | 1 // Copyright 2008, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 const bool prevent_inline_autocomplete() const { | 211 const bool prevent_inline_autocomplete() const { |
212 return prevent_inline_autocomplete_; | 212 return prevent_inline_autocomplete_; |
213 } | 213 } |
214 | 214 |
215 // operator==() by another name. | 215 // operator==() by another name. |
216 bool Equals(const AutocompleteInput& other) const; | 216 bool Equals(const AutocompleteInput& other) const; |
217 | 217 |
218 // Resets all internal variables to the null-constructed state. | 218 // Resets all internal variables to the null-constructed state. |
219 void Clear(); | 219 void Clear(); |
220 | 220 |
| 221 // Returns parsed URL components. |
| 222 const url_parse::Parsed& parts() const { return parts_; } |
| 223 |
221 private: | 224 private: |
222 std::wstring text_; | 225 std::wstring text_; |
223 Type type_; | 226 Type type_; |
| 227 url_parse::Parsed parts_; |
224 std::wstring scheme_; | 228 std::wstring scheme_; |
225 std::wstring desired_tld_; | 229 std::wstring desired_tld_; |
226 bool prevent_inline_autocomplete_; | 230 bool prevent_inline_autocomplete_; |
227 }; | 231 }; |
228 | 232 |
229 // AutocompleteMatch ---------------------------------------------------------- | 233 // AutocompleteMatch ---------------------------------------------------------- |
230 | 234 |
231 // A single result line with classified spans. The autocomplete popup displays | 235 // A single result line with classified spans. The autocomplete popup displays |
232 // the 'contents' and the 'description' (the description is optional) in the | 236 // the 'contents' and the 'description' (the description is optional) in the |
233 // autocomplete dropdown, and fills in 'fill_into_edit' into the textbox when | 237 // autocomplete dropdown, and fills in 'fill_into_edit' into the textbox when |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 // The user's input text in the omnibox. | 794 // The user's input text in the omnibox. |
791 std::wstring text; | 795 std::wstring text; |
792 // Selected index (if selected) or -1 (AutocompletePopup::kNoMatch). | 796 // Selected index (if selected) or -1 (AutocompletePopup::kNoMatch). |
793 size_t selected_index; | 797 size_t selected_index; |
794 // Inline autocompleted length (if displayed). | 798 // Inline autocompleted length (if displayed). |
795 size_t inline_autocompleted_length; | 799 size_t inline_autocompleted_length; |
796 // Result set. | 800 // Result set. |
797 const AutocompleteResult& result; | 801 const AutocompleteResult& result; |
798 }; | 802 }; |
799 | 803 |
800 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H__ | 804 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_H_ |
OLD | NEW |