OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 // These are convenience functions for formatting a URL into an abridged form | 211 // These are convenience functions for formatting a URL into an abridged form |
212 // for display within the Omnibox suggestions dropdown. | 212 // for display within the Omnibox suggestions dropdown. |
213 // | 213 // |
214 // The results are explicitly for non-security surfaces. Do not use the | 214 // The results are explicitly for non-security surfaces. Do not use the |
215 // results for anything other than the Omnibox dropdown. | 215 // results for anything other than the Omnibox dropdown. |
216 static base::string16 FormatUrlForSuggestionDisplay( | 216 static base::string16 FormatUrlForSuggestionDisplay( |
217 const GURL& url, | 217 const GURL& url, |
218 bool trim_scheme, | 218 bool trim_scheme, |
219 size_t* offset_for_adjustment); | 219 size_t* offset_for_adjustment); |
220 static base::string16 FormatUrlForSuggestionDisplayWithOffsets( | |
221 const GURL& url, | |
222 bool trim_scheme, | |
223 std::vector<size_t>* offsets_for_adjustment); | |
224 static base::string16 FormatUrlForSuggestionDisplayWithAdjustments( | 220 static base::string16 FormatUrlForSuggestionDisplayWithAdjustments( |
225 const GURL& url, | 221 const GURL& url, |
226 bool trim_scheme, | 222 bool trim_scheme, |
227 base::OffsetAdjuster::Adjustments* adjustments); | 223 base::OffsetAdjuster::Adjustments* adjustments); |
228 | 224 |
229 // Computes the stripped destination URL (via GURLToStrippedGURL()) and | 225 // Computes the stripped destination URL (via GURLToStrippedGURL()) and |
230 // stores the result in |stripped_destination_url|. |input| is used for the | 226 // stores the result in |stripped_destination_url|. |input| is used for the |
231 // same purpose as in GURLToStrippedGURL(). | 227 // same purpose as in GURLToStrippedGURL(). |
232 void ComputeStrippedDestinationURL(const AutocompleteInput& input, | 228 void ComputeStrippedDestinationURL(const AutocompleteInput& input, |
233 TemplateURLService* template_url_service); | 229 TemplateURLService* template_url_service); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 const base::string16& text, | 440 const base::string16& text, |
445 const ACMatchClassifications& classifications) const; | 441 const ACMatchClassifications& classifications) const; |
446 #endif | 442 #endif |
447 }; | 443 }; |
448 | 444 |
449 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; | 445 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; |
450 typedef std::vector<ACMatchClassification> ACMatchClassifications; | 446 typedef std::vector<ACMatchClassification> ACMatchClassifications; |
451 typedef std::vector<AutocompleteMatch> ACMatches; | 447 typedef std::vector<AutocompleteMatch> ACMatches; |
452 | 448 |
453 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ | 449 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ |
OLD | NEW |