| 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_AUTOCOMPLETE_MATCH_H_ | 5 #ifndef COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ |
| 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ | 6 #define COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void RecordAdditionalInfo(const std::string& property, | 239 void RecordAdditionalInfo(const std::string& property, |
| 240 const std::string& value); | 240 const std::string& value); |
| 241 void RecordAdditionalInfo(const std::string& property, int value); | 241 void RecordAdditionalInfo(const std::string& property, int value); |
| 242 void RecordAdditionalInfo(const std::string& property, | 242 void RecordAdditionalInfo(const std::string& property, |
| 243 const base::Time& value); | 243 const base::Time& value); |
| 244 | 244 |
| 245 // Returns the value recorded for |property| in the |additional_info| | 245 // Returns the value recorded for |property| in the |additional_info| |
| 246 // dictionary. Returns the empty string if no such value exists. | 246 // dictionary. Returns the empty string if no such value exists. |
| 247 std::string GetAdditionalInfo(const std::string& property) const; | 247 std::string GetAdditionalInfo(const std::string& property) const; |
| 248 | 248 |
| 249 // Returns whether this match is a "verbatim" match: a URL navigation directly | |
| 250 // to the user's input, a search for the user's input with the default search | |
| 251 // engine, or a "keyword mode" search for the query portion of the user's | |
| 252 // input. Note that rare or unusual types that could be considered verbatim, | |
| 253 // such as keyword engine matches or extension-provided matches, aren't | |
| 254 // detected by this IsVerbatimType, as the user will not be able to infer | |
| 255 // what will happen when he or she presses enter in those cases if the match | |
| 256 // is not shown. | |
| 257 bool IsVerbatimType() const; | |
| 258 | |
| 259 // Returns whether this match or any duplicate of this match can be deleted. | 249 // Returns whether this match or any duplicate of this match can be deleted. |
| 260 // This is used to decide whether we should call DeleteMatch(). | 250 // This is used to decide whether we should call DeleteMatch(). |
| 261 bool SupportsDeletion() const; | 251 bool SupportsDeletion() const; |
| 262 | 252 |
| 263 // Swaps the contents and description fields, and their associated | 253 // Swaps the contents and description fields, and their associated |
| 264 // classifications, if this is a match for which we should emphasize the | 254 // classifications, if this is a match for which we should emphasize the |
| 265 // title (stored in the description field) over the URL (in the contents | 255 // title (stored in the description field) over the URL (in the contents |
| 266 // field). See the implementation for the conditions under which this is | 256 // field). See the implementation for the conditions under which this is |
| 267 // true. | 257 // true. |
| 268 void PossiblySwapContentsAndDescriptionForURLSuggestion( | 258 void PossiblySwapContentsAndDescriptionForURLSuggestion( |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 const base::string16& text, | 384 const base::string16& text, |
| 395 const ACMatchClassifications& classifications) const; | 385 const ACMatchClassifications& classifications) const; |
| 396 #endif | 386 #endif |
| 397 }; | 387 }; |
| 398 | 388 |
| 399 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; | 389 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; |
| 400 typedef std::vector<ACMatchClassification> ACMatchClassifications; | 390 typedef std::vector<ACMatchClassification> ACMatchClassifications; |
| 401 typedef std::vector<AutocompleteMatch> ACMatches; | 391 typedef std::vector<AutocompleteMatch> ACMatches; |
| 402 | 392 |
| 403 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ | 393 #endif // COMPONENTS_OMNIBOX_AUTOCOMPLETE_MATCH_H_ |
| OLD | NEW |