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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // Returns the value recorded for |property| in the |additional_info| | 268 // Returns the value recorded for |property| in the |additional_info| |
269 // dictionary. Returns the empty string if no such value exists. | 269 // dictionary. Returns the empty string if no such value exists. |
270 std::string GetAdditionalInfo(const std::string& property) const; | 270 std::string GetAdditionalInfo(const std::string& property) const; |
271 | 271 |
272 // Returns whether this match is a "verbatim" match: a URL navigation directly | 272 // Returns whether this match is a "verbatim" match: a URL navigation directly |
273 // to the user's input, a search for the user's input with the default search | 273 // to the user's input, a search for the user's input with the default search |
274 // engine, or a "keyword mode" search for the query portion of the user's | 274 // engine, or a "keyword mode" search for the query portion of the user's |
275 // input. Note that rare or unusual types that could be considered verbatim, | 275 // input. Note that rare or unusual types that could be considered verbatim, |
276 // such as keyword engine matches or extension-provided matches, aren't | 276 // such as keyword engine matches or extension-provided matches, aren't |
277 // detected by this IsVerbatimType, as the user will not be able to infer | 277 // detected by this IsVerbatimType, as the user will not be able to infer |
278 // what will happen when he or she presses enter in those cases if the match | 278 // what will happen when they press enter in those cases if the match is not |
279 // is not shown. | 279 // shown. |
280 bool IsVerbatimType() const; | 280 bool IsVerbatimType() const; |
281 | 281 |
282 // Returns whether this match or any duplicate of this match can be deleted. | 282 // Returns whether this match or any duplicate of this match can be deleted. |
283 // This is used to decide whether we should call DeleteMatch(). | 283 // This is used to decide whether we should call DeleteMatch(). |
284 bool SupportsDeletion() const; | 284 bool SupportsDeletion() const; |
285 | 285 |
286 // Swaps the contents and description fields, and their associated | 286 // Swaps the contents and description fields, and their associated |
287 // classifications, if this is a match for which we should emphasize the | 287 // classifications, if this is a match for which we should emphasize the |
288 // title (stored in the description field) over the URL (in the contents | 288 // title (stored in the description field) over the URL (in the contents |
289 // field). Intended to only be used at the UI level before displaying, lest | 289 // field). Intended to only be used at the UI level before displaying, lest |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 const base::string16& text, | 424 const base::string16& text, |
425 const ACMatchClassifications& classifications) const; | 425 const ACMatchClassifications& classifications) const; |
426 #endif | 426 #endif |
427 }; | 427 }; |
428 | 428 |
429 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; | 429 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; |
430 typedef std::vector<ACMatchClassification> ACMatchClassifications; | 430 typedef std::vector<ACMatchClassification> ACMatchClassifications; |
431 typedef std::vector<AutocompleteMatch> ACMatches; | 431 typedef std::vector<AutocompleteMatch> ACMatches; |
432 | 432 |
433 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ | 433 #endif // COMPONENTS_OMNIBOX_BROWSER_AUTOCOMPLETE_MATCH_H_ |
OLD | NEW |