| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MATCH_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
| 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 // The relevance of this match. See table in autocomplete.h for scores | 197 // The relevance of this match. See table in autocomplete.h for scores |
| 198 // returned by various providers. This is used to rank matches among all | 198 // returned by various providers. This is used to rank matches among all |
| 199 // responding providers, so different providers must be carefully tuned to | 199 // responding providers, so different providers must be carefully tuned to |
| 200 // supply matches with appropriate relevance. | 200 // supply matches with appropriate relevance. |
| 201 // | 201 // |
| 202 // TODO(pkasting): http://b/1111299 This should be calculated algorithmically, | 202 // TODO(pkasting): http://b/1111299 This should be calculated algorithmically, |
| 203 // rather than being a fairly fixed value defined by the table above. | 203 // rather than being a fairly fixed value defined by the table above. |
| 204 int relevance; | 204 int relevance; |
| 205 | 205 |
| 206 // How many times this result was typed in / selected from the omnibox. |
| 207 // Only set for some providers and result_types. If it is not set, |
| 208 // its value is -1. At the time of writing this comment, it is only |
| 209 // set for matches from HistoryURL and HistoryQuickProvider. |
| 210 int typed_count; |
| 211 |
| 206 // True if the user should be able to delete this match. | 212 // True if the user should be able to delete this match. |
| 207 bool deletable; | 213 bool deletable; |
| 208 | 214 |
| 209 // This string is loaded into the location bar when the item is selected | 215 // This string is loaded into the location bar when the item is selected |
| 210 // by pressing the arrow keys. This may be different than a URL, for example, | 216 // by pressing the arrow keys. This may be different than a URL, for example, |
| 211 // for search suggestions, this would just be the search terms. | 217 // for search suggestions, this would just be the search terms. |
| 212 string16 fill_into_edit; | 218 string16 fill_into_edit; |
| 213 | 219 |
| 214 // The position within fill_into_edit from which we'll display the inline | 220 // The position within fill_into_edit from which we'll display the inline |
| 215 // autocomplete string. This will be string16::npos if this match should | 221 // autocomplete string. This will be string16::npos if this match should |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 void ValidateClassifications( | 282 void ValidateClassifications( |
| 277 const string16& text, | 283 const string16& text, |
| 278 const ACMatchClassifications& classifications) const; | 284 const ACMatchClassifications& classifications) const; |
| 279 #endif | 285 #endif |
| 280 }; | 286 }; |
| 281 | 287 |
| 282 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; | 288 typedef AutocompleteMatch::ACMatchClassification ACMatchClassification; |
| 283 typedef std::vector<ACMatchClassification> ACMatchClassifications; | 289 typedef std::vector<ACMatchClassification> ACMatchClassifications; |
| 284 | 290 |
| 285 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ | 291 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_MATCH_H_ |
| OLD | NEW |