| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_COMMON_INSTANT_TYPES_H_ | 5 #ifndef CHROME_COMMON_INSTANT_TYPES_H_ |
| 6 #define CHROME_COMMON_INSTANT_TYPES_H_ | 6 #define CHROME_COMMON_INSTANT_TYPES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "chrome/common/autocomplete_match_type.h" |
| 12 #include "content/public/common/page_transition_types.h" | 13 #include "content/public/common/page_transition_types.h" |
| 13 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
| 14 | 15 |
| 15 // ID used by Instant code to refer to objects (e.g. Autocomplete results, Most | 16 // ID used by Instant code to refer to objects (e.g. Autocomplete results, Most |
| 16 // Visited items) that the Instant page needs access to. | 17 // Visited items) that the Instant page needs access to. |
| 17 typedef int InstantRestrictedID; | 18 typedef int InstantRestrictedID; |
| 18 | 19 |
| 19 // The size of the InstantMostVisitedItem cache. | 20 // The size of the InstantMostVisitedItem cache. |
| 20 const size_t kMaxInstantMostVisitedItemCacheSize = 100; | 21 const size_t kMaxInstantMostVisitedItemCacheSize = 100; |
| 21 | 22 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 // Omnibox dropdown matches provided by the native autocomplete providers. | 78 // Omnibox dropdown matches provided by the native autocomplete providers. |
| 78 struct InstantAutocompleteResult { | 79 struct InstantAutocompleteResult { |
| 79 InstantAutocompleteResult(); | 80 InstantAutocompleteResult(); |
| 80 ~InstantAutocompleteResult(); | 81 ~InstantAutocompleteResult(); |
| 81 | 82 |
| 82 // The provider name, as returned by AutocompleteProvider::GetName(). | 83 // The provider name, as returned by AutocompleteProvider::GetName(). |
| 83 string16 provider; | 84 string16 provider; |
| 84 | 85 |
| 85 // The type of the result, as returned by AutocompleteMatch::TypeToString(). | 86 // The type of the result. |
| 86 string16 type; | 87 AutocompleteMatchType::Type type; |
| 87 | 88 |
| 88 // The description (title), same as AutocompleteMatch::description. | 89 // The description (title), same as AutocompleteMatch::description. |
| 89 string16 description; | 90 string16 description; |
| 90 | 91 |
| 91 // The URL of the match, same as AutocompleteMatch::destination_url. | 92 // The URL of the match, same as AutocompleteMatch::destination_url. |
| 92 string16 destination_url; | 93 string16 destination_url; |
| 93 | 94 |
| 94 // The search query for this match. Only set for matches coming from | 95 // The search query for this match. Only set for matches coming from |
| 95 // SearchProvider. Populated using AutocompleteMatch::contents. | 96 // SearchProvider. Populated using AutocompleteMatch::contents. |
| 96 string16 search_query; | 97 string16 search_query; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 // The title of the Most Visited page. May be empty, in which case the |url| | 182 // The title of the Most Visited page. May be empty, in which case the |url| |
| 182 // is used as the title. | 183 // is used as the title. |
| 183 string16 title; | 184 string16 title; |
| 184 }; | 185 }; |
| 185 | 186 |
| 186 // An InstantMostVisitedItem along with its assigned restricted ID. | 187 // An InstantMostVisitedItem along with its assigned restricted ID. |
| 187 typedef std::pair<InstantRestrictedID, InstantMostVisitedItem> | 188 typedef std::pair<InstantRestrictedID, InstantMostVisitedItem> |
| 188 InstantMostVisitedItemIDPair; | 189 InstantMostVisitedItemIDPair; |
| 189 | 190 |
| 190 #endif // CHROME_COMMON_INSTANT_TYPES_H_ | 191 #endif // CHROME_COMMON_INSTANT_TYPES_H_ |
| OLD | NEW |